aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-05 15:24:42 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-19 19:17:30 +0100
commit398de40517356981a9fe1b9185f5f9e5e498c346 (patch)
tree469fad8e65b041d04f9a303d653b830015e0fb73 /src/Wallabag
parentee122a7528f55dfb5f02e351c509d00b756fedaa (diff)
downloadwallabag-398de40517356981a9fe1b9185f5f9e5e498c346.tar.gz
wallabag-398de40517356981a9fe1b9185f5f9e5e498c346.tar.zst
wallabag-398de40517356981a9fe1b9185f5f9e5e498c346.zip
Added search engine in baggy theme
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig9
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig15
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig12
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/search_form.html.twig3
5 files changed, 26 insertions, 15 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
index d1baa283..a13fe903 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/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/baggy/Entry/search_form.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig
new file mode 100644
index 00000000..818513f3
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig
@@ -0,0 +1,15 @@
1<form name="search" method="GET" action="{{ path('search')}}">
2 <h2>{{ 'menu.left.search'|trans }}</h2>
3 <a href="javascript: void(null);" id="search-form-close" class="close-button--popup close-button">&times;</a>
4 {% if form_errors(form) %}
5 <span class="black-text">{{ form_errors(form) }}</span>
6 {% endif %}
7
8 {% if form_errors(form.term) %}
9 <span class="black-text">{{ form_errors(form.term) }}</span>
10 {% endif %}
11
12 {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }}
13
14 {{ form_rest(form) }}
15</form>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
index cd4ed3fa..fc024aff 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
@@ -31,17 +31,11 @@
31 <li class="menu all"><a href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }}</a></li> 31 <li class="menu all"><a href="{{ path('all') }}">{{ 'menu.left.all_articles'|trans }}</a></li>
32 <li class="menu tag"><a href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a></li> 32 <li class="menu tag"><a href="{{ path('tag') }}">{{ 'menu.left.tags'|trans }}</a></li>
33 <li class="menu new"><a href="{{ path('new') }}">{{ 'menu.left.save_link'|trans }}</a></li> 33 <li class="menu new"><a href="{{ path('new') }}">{{ 'menu.left.save_link'|trans }}</a></li>
34 <!--<li style="position: relative;"><a href="javascript: void(null);" id="search">{{ 'menu.left.search'|trans }}</a> 34 <li style="position: relative;"><a href="javascript: void(null);" id="search">{{ 'menu.left.search'|trans }}</a>
35 <div id="search-form" class="messages info popup-form"> 35 <div id="search-form" class="messages info popup-form">
36 <form method="get" action="index.php"> 36 {{ render(controller("WallabagCoreBundle:Entry:searchForm")) }}
37 <h2>{{ 'menu.left.search'|trans }}</h2>
38 <a href="javascript: void(null);" id="search-form-close" class="close-button--popup close-button">&times;</a>
39 <input type="hidden" name="view" value="search">
40 <input required placeholder="{{ 'menu.search_form.input_label'|trans }}" type="text" name="search" id="searchfield"><br>
41 <input id="submit-search" type="submit" value="{{ 'menu.left.search'|trans }}">
42 </form>
43 </div> 37 </div>
44 </li>--> 38 </li>
45 <li class="menu config"><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li> 39 <li class="menu config"><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li>
46 {% if is_granted('ROLE_SUPER_ADMIN') %} 40 {% if is_granted('ROLE_SUPER_ADMIN') %}
47 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li> 41 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li>
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 ff555055..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
@@ -5,7 +5,7 @@
5 {% if tag is defined %} 5 {% if tag is defined %}
6 {% set filter = tag %} 6 {% set filter = tag %}
7 {% endif %} 7 {% endif %}
8 {% if searchTerm is not empty %} 8 {% if searchTerm is defined and searchTerm is not empty %}
9 {% set filter = searchTerm %} 9 {% set filter = searchTerm %}
10 {% endif %} 10 {% endif %}
11 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %} 11 {% include "@WallabagCore/themes/common/Entry/_title.html.twig" with {'filter': filter} %}
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
index 9b8ac86d..bba6adb1 100644
--- 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
@@ -1,5 +1,4 @@
1<form name="search 1<form name="search" method="GET" action="{{ path('search')}}">
2" method="GET" action="{{ path('search')}}">
3 {% if form_errors(form) %} 2 {% if form_errors(form) %}
4 <span class="black-text">{{ form_errors(form) }}</span> 3 <span class="black-text">{{ form_errors(form) }}</span>
5 {% endif %} 4 {% endif %}