diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes')
7 files changed, 57 insertions, 25 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..20821b6d --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/search_form.html.twig | |||
@@ -0,0 +1,17 @@ | |||
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">×</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 | <input type="hidden" name="currentRoute" value="{{ currentRoute }}" /> | ||
13 | |||
14 | {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'entry.search.placeholder'} }) }} | ||
15 | |||
16 | {{ form_rest(form) }} | ||
17 | </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..07ff8e14 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", {'currentRoute': app.request.attributes.get('_route')})) }} |
37 | <h2>{{ 'menu.left.search'|trans }}</h2> | ||
38 | <a href="javascript: void(null);" id="search-form-close" class="close-button--popup close-button">×</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/common/Entry/_title.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig index 92cabdd9..654c1d2d 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_title.html.twig | |||
@@ -6,8 +6,10 @@ | |||
6 | {{ 'entry.page_titles.archived'|trans }} | 6 | {{ 'entry.page_titles.archived'|trans }} |
7 | {% elseif currentRoute == 'all' %} | 7 | {% elseif currentRoute == 'all' %} |
8 | {{ 'entry.page_titles.filtered'|trans }} | 8 | {{ 'entry.page_titles.filtered'|trans }} |
9 | {% elseif currentRoute == 'search' %} | ||
10 | {{ 'entry.page_titles.filtered_search'|trans }} {{ filter }} | ||
9 | {% elseif currentRoute == 'tag_entries' %} | 11 | {% elseif currentRoute == 'tag_entries' %} |
10 | {{ 'entry.page_titles.filtered_tags'|trans }} {{ currentTag }} | 12 | {{ 'entry.page_titles.filtered_tags'|trans }} {{ filter }} |
11 | {% elseif currentRoute == 'untagged' %} | 13 | {% elseif currentRoute == 'untagged' %} |
12 | {{ 'entry.page_titles.untagged'|trans }} | 14 | {{ 'entry.page_titles.untagged'|trans }} |
13 | {% else %} | 15 | {% else %} |
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> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index f1ef01df..551486e0 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -89,11 +89,11 @@ | |||
89 | <i class="material-icons">add</i> | 89 | <i class="material-icons">add</i> |
90 | </a> | 90 | </a> |
91 | </li> | 91 | </li> |
92 | <!--<li> | 92 | <li> |
93 | <a title="{{ 'menu.top.search'|trans }}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search"> | 93 | <a title="{{ 'menu.top.search'|trans }}" class="waves-effect" href="javascript: void(null);" id="nav-btn-search"> |
94 | <i class="material-icons">search</i> | 94 | <i class="material-icons">search</i> |
95 | </a> | 95 | </a> |
96 | </li>--> | 96 | </li> |
97 | <li id="button_filters"> | 97 | <li id="button_filters"> |
98 | <a class="nav-panel-menu button-collapse-right tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters"> | 98 | <a class="nav-panel-menu button-collapse-right tooltipped" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters"> |
99 | <i class="material-icons">filter_list</i> | 99 | <i class="material-icons">filter_list</i> |
@@ -106,13 +106,11 @@ | |||
106 | </li> | 106 | </li> |
107 | </ul> | 107 | </ul> |
108 | </div> | 108 | </div> |
109 | <form method="get" action="index.php"> | 109 | <div class="input-field nav-panel-search" style="display: none"> |
110 | <div class="input-field nav-panel-search" style="display: none"> | 110 | {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }} |
111 | <input name="search" id="searchfield" type="search" required placeholder="{{ 'menu.search_form.input_label'|trans }}"> | 111 | <label for="search" class="active"><i class="material-icons search">search</i></label> |
112 | <label for="search"><i class="material-icons search">search</i></label> | 112 | <i class="material-icons close">clear</i> |
113 | <i class="material-icons close">clear</i> | 113 | </div> |
114 | </div> | ||
115 | </form> | ||
116 | <div class="input-field nav-panel-add" style="display: none"> | 114 | <div class="input-field nav-panel-add" style="display: none"> |
117 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} | 115 | {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} |
118 | <label for="add" class="active"><i class="material-icons add">add</i></label> | 116 | <label for="add" class="active"><i class="material-icons add">add</i></label> |