|
117 | 117 | <th>{{ _("Similarity") }}, %</th> |
118 | 118 | </tr> |
119 | 119 | {% for first_head in same_parts_of_second %} |
120 | | - {% set second_head = same_parts_of_second[first_head][0].name %} |
121 | | - <tr class="table__row"> |
122 | | - <td rowspan="{{ len(same_parts_of_second[first_head]) }}">{{ first_head }}</td> |
123 | | - <td>{{ second_head }}</td> |
124 | | - {% set head_percent = same_parts_of_second[first_head].pop(0).percent %} |
125 | | - {% if head_percent > threshold %} |
126 | | - <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ head_percent }}</td> |
127 | | - {% else %} |
128 | | - <td>{{ head_percent }}</td> |
129 | | - {% endif %} |
130 | | - </tr> |
131 | | - {% for same_head_info in same_parts_of_second[first_head] %} |
132 | | - <tr class="table__row"> |
133 | | - <td>{{ same_head_info.name }}</td> |
134 | | - {% if same_head_info.percent > threshold %} |
135 | | - <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ same_head_info.percent }}</td> |
136 | | - {% else %} |
137 | | - <td>{{ same_head_info.percent }}</td> |
| 120 | + {% if same_parts_of_second[first_head] %} |
| 121 | + {% set second_head = same_parts_of_second[first_head][0].name %} |
| 122 | + <tr class="table__row"> |
| 123 | + <td rowspan="{{ len(same_parts_of_second[first_head]) }}">{{ first_head }}</td> |
| 124 | + <td>{{ second_head }}</td> |
| 125 | + {% set head_percent = same_parts_of_second[first_head].pop(0).percent %} |
| 126 | + {% if head_percent > threshold %} |
| 127 | + <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ head_percent }}</td> |
| 128 | + {% else %} |
| 129 | + <td>{{ head_percent }}</td> |
| 130 | + {% endif %} |
| 131 | + </tr> |
| 132 | + {% for same_head_info in same_parts_of_second[first_head] %} |
| 133 | + <tr class="table__row"> |
| 134 | + <td>{{ same_head_info.name }}</td> |
| 135 | + {% if same_head_info.percent > threshold %} |
| 136 | + <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ same_head_info.percent }}</td> |
| 137 | + {% else %} |
| 138 | + <td>{{ same_head_info.percent }}</td> |
| 139 | + {% endif %} |
| 140 | + </tr> |
| 141 | + {% endfor %} |
138 | 142 | {% endif %} |
139 | | - </tr> |
140 | | - {% endfor %} |
141 | 143 | {% endfor %} |
142 | 144 | </table> |
143 | 145 | <table align="center" style="display: inline-table;"> |
|
148 | 150 | <th>{{ _("Similarity") }}, %</th> |
149 | 151 | </tr> |
150 | 152 | {% for first_head in same_parts_of_first %} |
151 | | - {% set second_head = same_parts_of_first[first_head][0].name %} |
152 | | - <tr class="table__row"> |
153 | | - <td rowspan="{{ len(same_parts_of_first[first_head]) }}">{{ first_head }}</td> |
154 | | - <td>{{ second_head }}</td> |
155 | | - {% set head_percent = same_parts_of_first[first_head].pop(0).percent %} |
156 | | - {% if head_percent > threshold %} |
157 | | - <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ head_percent }}</td> |
158 | | - {% else %} |
159 | | - <td>{{ head_percent }}</td> |
160 | | - {% endif %} |
161 | | - </tr> |
162 | | - {% for same_head_info in same_parts_of_first[first_head] %} |
163 | | - <tr class="table__row"> |
164 | | - <td>{{ same_head_info.name }}</td> |
165 | | - {% if same_head_info.percent > threshold %} |
166 | | - <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ same_head_info.percent }}</td> |
167 | | - {% else %} |
168 | | - <td>{{ same_head_info.percent }}</td> |
| 153 | + {% if same_parts_of_first[first_head] %} |
| 154 | + {% set second_head = same_parts_of_first[first_head][0].name %} |
| 155 | + <tr class="table__row"> |
| 156 | + <td rowspan="{{ len(same_parts_of_first[first_head]) }}">{{ first_head }}</td> |
| 157 | + <td>{{ second_head }}</td> |
| 158 | + {% set head_percent = same_parts_of_first[first_head].pop(0).percent %} |
| 159 | + {% if head_percent > threshold %} |
| 160 | + <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ head_percent }}</td> |
| 161 | + {% else %} |
| 162 | + <td>{{ head_percent }}</td> |
| 163 | + {% endif %} |
| 164 | + </tr> |
| 165 | + {% for same_head_info in same_parts_of_first[first_head] %} |
| 166 | + <tr class="table__row"> |
| 167 | + <td>{{ same_head_info.name }}</td> |
| 168 | + {% if same_head_info.percent > threshold %} |
| 169 | + <td style="background-color: rgb(255, 200, 200); font-weight: bold;">{{ same_head_info.percent }}</td> |
| 170 | + {% else %} |
| 171 | + <td>{{ same_head_info.percent }}</td> |
| 172 | + {% endif %} |
| 173 | + </tr> |
| 174 | + {% endfor %} |
169 | 175 | {% endif %} |
170 | | - </tr> |
171 | | - {% endfor %} |
172 | 176 | {% endfor %} |
173 | 177 | </table> |
174 | 178 | </div> |
|
0 commit comments