diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-19 20:42:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-19 20:42:27 +0100 |
commit | 6f85bed294d6dd9f2dd9c945544074cbde38e191 (patch) | |
tree | 1ac2c526e54ddaf1678184f93d4e10a7a015349c /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry | |
parent | 27dce581caba158a8ffffa5bc30648a21f47da12 (diff) | |
parent | 995c204428dd6be04d2bff1d5e17f3e95268f44d (diff) | |
download | wallabag-6f85bed294d6dd9f2dd9c945544074cbde38e191.tar.gz wallabag-6f85bed294d6dd9f2dd9c945544074cbde38e191.tar.zst wallabag-6f85bed294d6dd9f2dd9c945544074cbde38e191.zip |
Merge pull request #2543 from wallabag/search-engine
Added a simple search engine
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 9 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig | 15 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index 160dbf3d..00e8bf63 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | |||
@@ -1,11 +1,14 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %} | 3 | {% block title %} |
4 | {% set currentTag = '' %} | 4 | {% set filter = '' %} |
5 | {% if tag is defined %} | 5 | {% if tag is defined %} |
6 | {% set currentTag = tag %} | 6 | {% set filter = tag %} |
7 | {% endif %} | ||
8 | {% if searchTerm is defined and searchTerm is not empty %} | ||
9 | {% set filter = searchTerm %} | ||
7 | {% endif %} | 10 | {% endif %} |
8 | {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'currentTag': currentTag} %} | 11 | {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %} |
9 | {% endblock %} | 12 | {% endblock %} |
10 | 13 | ||
11 | {% block content %} | 14 | {% block content %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig new file mode 100644 index 00000000..f25de94d --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig | |||
@@ -0,0 +1,15 @@ | |||
1 | <form name="search" method="GET" action="{{ path('search')}}"> | ||
2 | {% if form_errors(form) %} | ||
3 | <span class="black-text">{{ form_errors(form) }}</span> | ||
4 | {% endif %} | ||
5 | |||
6 | {% if form_errors(form.term) %} | ||
7 | <span class="black-text">{{ form_errors(form.term) }}</span> | ||
8 | {% endif %} | ||
9 | |||
10 | <input type="hidden" name="currentRoute" value="{{ currentRoute }}" /> | ||
11 | |||
12 | {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }} | ||
13 | |||
14 | {{ form_rest(form) }} | ||
15 | </form> | ||