|
9 | 9 | {% block content %}
|
10 | 10 | <link href="{% static 'css/prism.css' %}" rel="stylesheet" />
|
11 | 11 | <style type="text/css">
|
12 |
| -/* OVERRIDE STYLES OF PRIMSM |
13 |
| -.line-highlight { left: 15px;} |
14 |
| -FIXES STYLES OF PRIMSM */ |
15 |
| -code, pre { font-size: 12px; } |
16 |
| -code[class*="language-"], |
17 |
| -pre[class*="language-"]{ -moz-tab-size: 2; -o-tab-size: 2; tab-size: 2;} |
18 |
| -.line-highlight:before, .line-highlight[data-end]:after { |
19 |
| - border-radius: 0; |
20 |
| - left: 0; |
21 |
| - min-height: 20px; |
22 |
| - min-width: 30px; |
23 |
| - padding: 0; |
24 |
| - top: 0; |
25 |
| -} |
26 |
| - |
27 | 12 | .tab_add_ticket:hover { background-color: #51A351 !important; }
|
28 | 13 | </style>
|
29 | 14 |
|
@@ -149,7 +134,7 @@ <h3>{% trans 'Notices' %}:</h3>
|
149 | 134 | {# xml analyzed and with annotations #}
|
150 | 135 |
|
151 | 136 | <span class="badge badge-important">
|
152 |
| - {{ xml_data.validation_errors.error_lines|length }} |
| 137 | + {{ xml_data.validation_errors.results|length }} |
153 | 138 | </span>
|
154 | 139 | {% endif %}
|
155 | 140 | </a>
|
@@ -201,52 +186,7 @@ <h3>{% trans 'Notices' %}:</h3>
|
201 | 186 | </div>
|
202 | 187 | <div class="tab-pane" id="annotations">
|
203 | 188 | {# annotations #}
|
204 |
| - {% if not xml_data.can_be_analyzed.0 %} |
205 |
| - {# could not be analyzed #} |
206 |
| - <div class="alert alert-warning"> |
207 |
| - <h4><i class="icon-minus-sign"></i> {% trans "The XML could not be analyzed" %}</h4> |
208 |
| - <p>{{ xml_data.can_be_analyzed.1 }}</p> |
209 |
| - </div> |
210 |
| - {% elif not xml_data.annotations %} |
211 |
| - {# xml without annotations #} |
212 |
| - <div class="alert alert-success"> |
213 |
| - <i class="icon-ok"></i> {% trans "The XML has no errors" %} |
214 |
| - </div> |
215 |
| - {% else %} |
216 |
| - {# xml analyzed and with annotations #} |
217 |
| - <div class="alert alert-block alert-error"> |
218 |
| - <h4 class="alert-heading"> {% trans "The XML have some errors" %}:</h4> |
219 |
| - </div> |
220 |
| - {% if xml_data.validation_errors %} |
221 |
| - <table class="table table-striped table-condensed"> |
222 |
| - <thead> |
223 |
| - <tr> |
224 |
| - <th>{% trans "Level" %}:</th> |
225 |
| - <th>{% trans "Line" %}:</th> |
226 |
| - <th>{% trans "Column" %}:</th> |
227 |
| - <th>{% trans "Message" %}:</th> |
228 |
| - </tr> |
229 |
| - </thead> |
230 |
| - <tbody> |
231 |
| - {% for error in xml_data.validation_errors.results %} |
232 |
| - <tr> |
233 |
| - <td><span class="label label-{% trans_status error.level to_label='True' %}">{{ error.level }}</span></td> |
234 |
| - <td>{{ error.line }}</td> |
235 |
| - <td>{{ error.column }}</td> |
236 |
| - <td>{{ error.message }}</td> |
237 |
| - </tr> |
238 |
| - {% endfor %} |
239 |
| - </tbody> |
240 |
| - </table> |
241 |
| - {% endif %} |
242 |
| - {# XML ANNOTATED #} |
243 |
| - <pre |
244 |
| - class="line-numbers language-markup pre-scrollable" |
245 |
| - {% if xml_data.validation_errors %} |
246 |
| - data-line='{{ xml_data.validation_errors.error_lines }}' |
247 |
| - {% endif %} |
248 |
| - ><code class="language-markup">{{ xml_data.annotations }}</code></pre> |
249 |
| - {% endif %} |
| 189 | + {% include "validator/includes/xml_annotated.html" %} |
250 | 190 | {# /annotations #}
|
251 | 191 | </div>
|
252 | 192 | </div>
|
@@ -432,7 +372,6 @@ <h3>{% trans "Reject this Check-in?" %}</h3>
|
432 | 372 | {% endblock %}
|
433 | 373 |
|
434 | 374 | {% block extrafooter %}
|
435 |
| - <script type="text/javascript" src="{% static 'js/prism.js' %}"></script> |
436 | 375 | <script type="text/javascript">
|
437 | 376 | $(document).ready(function(){
|
438 | 377 | var fail_msg = '<i class="icon-warning-sign"></i> {% trans "Unable to communicate with the file server. Please try again later." %}';
|
|
0 commit comments