Download:
child 290:a08915486c39
parent 288:4c4a141c33b1
289:622eaacee683
Anton Shestakov <av6@dwimlabs.net>, Sat, 16 Sep 2017 17:37:38 +0800
viewer: move check-log block to a separate template file

2 файлов изменено, 17 вставок(+), 16 удалений(-) [+]
templates/check.html file | annotate | diff | comparison | revisions
templates/ui/check-log.html file | annotate | diff | comparison | revisions
--- a/templates/check.html Thu Sep 14 17:59:05 2017 +0800
+++ b/templates/check.html Sat Sep 16 17:37:38 2017 +0800
@@ -46,21 +46,6 @@
</dl>
</div>
</div>
- <pre class="check-log">{#
- #}{% for number, line in enumerate(lines, 1) %}{#
- #}<div id="l{{ number }}"{% if 'task' in line %} data-task="{{ line['task'] }}"{% end %}{% if 'cls' in line %} class="{{ line['cls'] }}"{% end %}>{#
- #}<a href="#l{{ number }}" class="lineno" data-line-number="{{ number }}"></a>{#
- #}{% if 'link' in line %}{#
- #}{{ line['text'][:line['link_start']] }}{#
- #}<a href="{{ line['link'] }}" class="filelink">{#
- #}{{ line['text'][line['link_start']:line['link_end']] }}{#
- #}</a>{#
- #}{{ line['text'][line['link_end']:] }}{#
- #}{% else %}{#
- #}{{ line['text'] }}{#
- #}{% end %}{#
- #}</div>{#
- #}{% end %}{#
- #}</pre>
+ {% include ui/check-log.html %}
</div>
{% end %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/ui/check-log.html Sat Sep 16 17:37:38 2017 +0800
@@ -0,0 +1,16 @@
+ <pre class="check-log">{#
+ #}{% for number, line in enumerate(lines, 1) %}{#
+ #}<div id="l{{ number }}"{% if 'task' in line %} data-task="{{ line['task'] }}"{% end %}{% if 'cls' in line %} class="{{ line['cls'] }}"{% end %}>{#
+ #}<a href="#l{{ number }}" class="lineno" data-line-number="{{ number }}"></a>{#
+ #}{% if 'link' in line %}{#
+ #}{{ line['text'][:line['link_start']] }}{#
+ #}<a href="{{ line['link'] }}" class="filelink">{#
+ #}{{ line['text'][line['link_start']:line['link_end']] }}{#
+ #}</a>{#
+ #}{{ line['text'][line['link_end']:] }}{#
+ #}{% else %}{#
+ #}{{ line['text'] }}{#
+ #}{% end %}{#
+ #}</div>{#
+ #}{% end %}{#
+#}</pre>