diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-04 23:24:43 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-19 19:17:30 +0100 |
commit | ee122a7528f55dfb5f02e351c509d00b756fedaa (patch) | |
tree | b4b134dc00dda3394a1ab01408369803c8b0b889 /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry | |
parent | 27dce581caba158a8ffffa5bc30648a21f47da12 (diff) | |
download | wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.tar.gz wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.tar.zst wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.zip |
Added a simple search engine
Fix #18
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 | 14 |
2 files changed, 20 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..ff555055 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 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..9b8ac86d --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig | |||
@@ -0,0 +1,14 @@ | |||
1 | <form name="search | ||
2 | " method="GET" action="{{ path('search')}}"> | ||
3 | {% if form_errors(form) %} | ||
4 | <span class="black-text">{{ form_errors(form) }}</span> | ||
5 | {% endif %} | ||
6 | |||
7 | {% if form_errors(form.term) %} | ||
8 | <span class="black-text">{{ form_errors(form.term) }}</span> | ||
9 | {% endif %} | ||
10 | |||
11 | {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }} | ||
12 | |||
13 | {{ form_rest(form) }} | ||
14 | </form> | ||