Refactor to reuse search box HTML

This commit is contained in:
Chris Hill-Scott
2017-10-15 14:17:23 +01:00
parent 91cdc9ffcb
commit 05513c6fa7
3 changed files with 12 additions and 20 deletions

View File

@@ -0,0 +1,10 @@
{% if show_search_box %}
<div data-module="autofocus">
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
{{ textbox(
search_form.search,
width='1-1'
) }}
</div>
</div>
{% endif %}

View File

@@ -28,16 +28,7 @@
{% else %}
{% if show_search_box %}
<div data-module="autofocus">
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
{{ textbox(
search_form.search,
width='1-1'
) }}
</div>
</div>
{% endif %}
{% include "views/templates/_search-box.html" %}
<nav class="grid-row" id=template-list>
{% for template in templates %}

View File

@@ -54,16 +54,7 @@
</div>
{% endif %}
{% if show_search_box %}
<div data-module="autofocus">
<div class="live-search" data-module="live-search" data-targets="#template-list .column-whole">
{{ textbox(
search_form.search,
width='1-1'
) }}
</div>
</div>
{% endif %}
{% include "views/templates/_search-box.html" %}
<nav class="grid-row" id=template-list>
{% for template in templates %}