aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig139
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig55
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig17
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig18
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig11
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig83
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig158
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig63
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig14
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig17
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig11
13 files changed, 400 insertions, 199 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index bcc57dac..4ef6ab3c 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -86,8 +86,7 @@
86 <br/> 86 <br/>
87 <img id="androidQrcode" /> 87 <img id="androidQrcode" />
88 <script> 88 <script>
89 const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); 89 document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');
90 document.getElementById('androidQrcode').src = imgBase64;
91 </script> 90 </script>
92 </div> 91 </div>
93 </fieldset> 92 </fieldset>
@@ -95,43 +94,43 @@
95 {{ form_rest(form.config) }} 94 {{ form_rest(form.config) }}
96 </form> 95 </form>
97 96
98 <h2>{{ 'config.tab_menu.rss'|trans }}</h2> 97 <h2>{{ 'config.tab_menu.feed'|trans }}</h2>
99 98
100 {{ form_start(form.rss) }} 99 {{ form_start(form.feed) }}
101 {{ form_errors(form.rss) }} 100 {{ form_errors(form.feed) }}
102 101
103 <div class="row"> 102 <div class="row">
104 {{ 'config.form_rss.description'|trans }} 103 {{ 'config.form_feed.description'|trans }}
105 </div> 104 </div>
106 105
107 <fieldset class="w500p inline"> 106 <fieldset class="w500p inline">
108 <div class="row"> 107 <div class="row">
109 <label>{{ 'config.form_rss.token_label'|trans }}</label> 108 <label>{{ 'config.form_feed.token_label'|trans }}</label>
110 {% if rss.token %} 109 {% if feed.token %}
111 {{ rss.token }} 110 {{ feed.token }}
112 {% else %} 111 {% else %}
113 <em>{{ 'config.form_rss.no_token'|trans }}</em> 112 <em>{{ 'config.form_feed.no_token'|trans }}</em>
114 {% endif %} 113 {% endif %}
115 114
116 <a href="{{ path('generate_token') }}"> 115 <a href="{{ path('generate_token') }}">
117 {% if rss.token %} 116 {% if feed.token %}
118 {{ 'config.form_rss.token_reset'|trans }} 117 {{ 'config.form_feed.token_reset'|trans }}
119 {% else %} 118 {% else %}
120 {{ 'config.form_rss.token_create'|trans }} 119 {{ 'config.form_feed.token_create'|trans }}
121 {% endif %} 120 {% endif %}
122 </a> 121 </a>
123 </div> 122 </div>
124 </fieldset> 123 </fieldset>
125 124
126 {% if rss.token %} 125 {% if feed.token %}
127 <fieldset class="w500p inline"> 126 <fieldset class="w500p inline">
128 <div class="row"> 127 <div class="row">
129 <label>{{ 'config.form_rss.rss_links'|trans }}</label> 128 <label>{{ 'config.form_feed.feed_links'|trans }}</label>
130 <ul> 129 <ul>
131 <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li> 130 <li><a href="{{ path('unread_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.unread'|trans }}</a></li>
132 <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li> 131 <li><a href="{{ path('starred_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.starred'|trans }}</a></li>
133 <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li> 132 <li><a href="{{ path('archive_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.archive'|trans }}</a></li>
134 <li><a href="{{ path('all_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.all'|trans }}</a></li> 133 <li><a href="{{ path('all_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.all'|trans }}</a></li>
135 </ul> 134 </ul>
136 </div> 135 </div>
137 </fieldset> 136 </fieldset>
@@ -139,13 +138,13 @@
139 138
140 <fieldset class="w500p inline"> 139 <fieldset class="w500p inline">
141 <div class="row"> 140 <div class="row">
142 {{ form_label(form.rss.rss_limit) }} 141 {{ form_label(form.feed.feed_limit) }}
143 {{ form_errors(form.rss.rss_limit) }} 142 {{ form_errors(form.feed.feed_limit) }}
144 {{ form_widget(form.rss.rss_limit) }} 143 {{ form_widget(form.feed.feed_limit) }}
145 </div> 144 </div>
146 </fieldset> 145 </fieldset>
147 146
148 {{ form_rest(form.rss) }} 147 {{ form_rest(form.feed) }}
149 </form> 148 </form>
150 149
151 <h2>{{ 'config.tab_menu.user_info'|trans }}</h2> 150 <h2>{{ 'config.tab_menu.user_info'|trans }}</h2>
@@ -169,52 +168,41 @@
169 </div> 168 </div>
170 </fieldset> 169 </fieldset>
171 170
171 {{ form_widget(form.user.save) }}
172
172 {% if twofactor_auth %} 173 {% if twofactor_auth %}
174 <h5>{{ 'config.otp.page_title'|trans }}</h5>
175
173 <div class="row"> 176 <div class="row">
174 {{ 'config.form_user.two_factor_description'|trans }} 177 {{ 'config.form_user.two_factor_description'|trans }}
175 </div> 178 </div>
176 179
177 <fieldset class="w500p inline"> 180 <table>
178 <div class="row"> 181 <thead>
179 {{ form_label(form.user.twoFactorAuthentication) }} 182 <tr>
180 {{ form_errors(form.user.twoFactorAuthentication) }} 183 <th>{{ 'config.form_user.two_factor.table_method'|trans }}</th>
181 {{ form_widget(form.user.twoFactorAuthentication) }} 184 <th>{{ 'config.form_user.two_factor.table_state'|trans }}</th>
182 </div> 185 <th>{{ 'config.form_user.two_factor.table_action'|trans }}</th>
183 <a href="#" title="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> 186 </tr>
184 <i class="material-icons">live_help</i> 187 </thead>
185 </a>
186 </fieldset>
187 {% endif %}
188 188
189 <h2>{{ 'config.reset.title'|trans }}</h2> 189 <tbody>
190 <fieldset class="w500p inline"> 190 <tr>
191 <p>{{ 'config.reset.description'|trans }}</p> 191 <td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td>
192 <ul> 192 <td>{% if app.user.isEmailTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
193 <li> 193 <td><a href="{{ path('config_otp_email') }}" class="waves-effect waves-light btn{% if app.user.isEmailTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_email'|trans }}</a></td>
194 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> 194 </tr>
195 {{ 'config.reset.annotations'|trans }} 195 <tr>
196 </a> 196 <td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td>
197 </li> 197 <td>{% if app.user.isGoogleTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
198 <li> 198 <td><a href="{{ path('config_otp_app') }}" class="waves-effect waves-light btn{% if app.user.isGoogleTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_app'|trans }}</a></td>
199 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red"> 199 </tr>
200 {{ 'config.reset.tags'|trans }} 200 </tbody>
201 </a> 201 </table>
202 </li> 202
203 <li> 203 {% endif %}
204 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
205 {{ 'config.reset.archived'|trans }}
206 </a>
207 </li>
208 <li>
209 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
210 {{ 'config.reset.entries'|trans }}
211 </a>
212 </li>
213 </ul>
214 </fieldset>
215 204
216 {{ form_widget(form.user._token) }} 205 {{ form_widget(form.user._token) }}
217 {{ form_widget(form.user.save) }}
218 </form> 206 </form>
219 207
220 {% if enabled_users > 1 %} 208 {% if enabled_users > 1 %}
@@ -277,7 +265,7 @@
277 {% endfor %} 265 {% endfor %}
278 </ul> 266 </ul>
279 267
280 {{ form_start(form.new_tagging_rule) }} 268 {{ form_start(form.new_tagging_rule) }}
281 {{ form_errors(form.new_tagging_rule) }} 269 {{ form_errors(form.new_tagging_rule) }}
282 270
283 <fieldset class="w500p inline"> 271 <fieldset class="w500p inline">
@@ -382,4 +370,31 @@
382 </table> 370 </table>
383 </div> 371 </div>
384 </div> 372 </div>
373
374 <h2>{{ 'config.reset.title'|trans }}</h2>
375 <fieldset class="w500p inline">
376 <p>{{ 'config.reset.description'|trans }}</p>
377 <ul>
378 <li>
379 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
380 {{ 'config.reset.annotations'|trans }}
381 </a>
382 </li>
383 <li>
384 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
385 {{ 'config.reset.tags'|trans }}
386 </a>
387 </li>
388 <li>
389 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
390 {{ 'config.reset.archived'|trans }}
391 </a>
392 </li>
393 <li>
394 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
395 {{ 'config.reset.entries'|trans }}
396 </a>
397 </li>
398 </ul>
399 </fieldset>
385{% endblock %} 400{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig
new file mode 100644
index 00000000..0919646e
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/otp_app.html.twig
@@ -0,0 +1,55 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'config.page_title'|trans }} > {{ 'config.otp.page_title'|trans }}{% endblock %}
4
5{% block content %}
6 <h5>{{ 'config.otp.page_title'|trans }}</h5>
7
8 <ol>
9 <li>
10 <p>{{ 'config.otp.app.two_factor_code_description_1'|trans }}</p>
11 <p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p>
12
13 <p>
14 <img id="2faQrcode" class="hide-on-med-and-down" />
15 <script>
16 document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code }}');
17 </script>
18 </p>
19 </li>
20 <li>
21 <p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p>
22
23 <p><strong>{{ backupCodes|join("\n")|nl2br }}</strong></p>
24 </li>
25 <li>
26 <p>{{ 'config.otp.app.two_factor_code_description_4'|trans }}</p>
27
28 {% for flashMessage in app.session.flashbag.get("two_factor") %}
29 <div class="card-panel red darken-1 black-text">
30 {{ flashMessage|trans }}
31 </div>
32 {% endfor %}
33
34 <form class="form" action="{{ path("config_otp_app_check") }}" method="post">
35 <div class="card-content">
36 <div class="row">
37 <div class="input-field col s12">
38 <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label>
39 <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" />
40 </div>
41 </div>
42 </div>
43 <div class="card-action">
44 <a href="{{ path('config_otp_app_cancel') }}" class="waves-effect waves-light grey btn">
45 {{ 'config.otp.app.cancel'|trans }}
46 </a>
47 <button class="btn waves-effect waves-light" type="submit" name="send">
48 {{ 'config.otp.app.enable'|trans }}
49 <i class="material-icons right">send</i>
50 </button>
51 </div>
52 </form>
53 </li>
54 </ol>
55{% endblock %}
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 832112be..6c5d2601 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
@@ -2,8 +2,8 @@
2 2
3{% block head %} 3{% block head %}
4 {{ parent() }} 4 {{ parent() }}
5 {% if tag is defined and app.user.config.rssToken %} 5 {% if tag is defined and app.user.config.feedToken %}
6 <link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" /> 6 <link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
7 {% endif %} 7 {% endif %}
8{% endblock %} 8{% endblock %}
9 9
@@ -20,13 +20,19 @@
20 20
21{% block content %} 21{% block content %}
22 {% set currentRoute = app.request.attributes.get('_route') %} 22 {% set currentRoute = app.request.attributes.get('_route') %}
23 {% if currentRoute == 'homepage' %}
24 {% set currentRoute = 'unread' %}
25 {% endif %}
23 {% set listMode = app.user.config.listMode %} 26 {% set listMode = app.user.config.listMode %}
24 <div class="results"> 27 <div class="results">
25 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> 28 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
26 <div class="pagination"> 29 <div class="pagination">
27 <a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-24">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a> 30 <a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-24">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
28 {% if app.user.config.rssToken %} 31 {% if app.user.config.feedToken %}
29 {% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %} 32 {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %}
33 {% endif %}
34 {% if currentRoute in ['unread', 'starred', 'archive', 'untagged', 'all'] %}
35 <a href="{{ path('random_entry', { 'type': currentRoute }) }}"><i class="btn-clickable material-icons md-24 js-random-action">casino</i></a>
30 {% endif %} 36 {% endif %}
31 <i class="btn-clickable download-btn material-icons md-24 js-export-action">file_download</i> 37 <i class="btn-clickable download-btn material-icons md-24 js-export-action">file_download</i>
32 <i class="btn-clickable filter-btn material-icons md-24 js-filters-action">filter_list</i> 38 <i class="btn-clickable filter-btn material-icons md-24 js-filters-action">filter_list</i>
@@ -90,9 +96,6 @@
90 {% if tag is defined %} 96 {% if tag is defined %}
91 {% set currentTag = tag %} 97 {% set currentTag = tag %}
92 {% endif %} 98 {% endif %}
93 {% if currentRoute == 'homepage' %}
94 {% set currentRoute = 'unread' %}
95 {% endif %}
96 <h2>{{ 'entry.list.export_title'|trans }}</h2> 99 <h2>{{ 'entry.list.export_title'|trans }}</h2>
97 <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">&times;</a> 100 <a href="javascript: void(null);" id="download-form-close" class="close-button--popup close-button">&times;</a>
98 <ul> 101 <ul>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
index 070d5629..ae8403bd 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
@@ -10,10 +10,22 @@
10 <ul> 10 <ul>
11 {% for tag in tags %} 11 {% for tag in tags %}
12 <li id="tag-{{ tag.id|e }}"> 12 <li id="tag-{{ tag.id|e }}">
13 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{tag.label}} ({{ tag.nbEntries }})</a> 13 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}" data-handle="tag-link">{{ tag.label }}&nbsp;({{ tag.nbEntries }})</a>
14 <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"> 14
15 <i class="material-icons md-24">rss_feed</i> 15 {% if renameForms is defined and renameForms[tag.id] is defined %}
16 <form class="card-tag-form hidden" data-handle="tag-rename-form" action="{{ path('tag_rename', {'slug': tag.slug})}}" method="POST">
17 {{ form_widget(renameForms[tag.id].label, {'attr': {'value': tag.label}}) }}
18 {{ form_rest(renameForms[tag.id]) }}
19 </form>
20 <a class="card-tag-rename" data-handler="tag-rename" href="javascript:void(0);">
21 <i class="material-icons">mode_edit</i>
16 </a> 22 </a>
23 {% endif %}
24 {% if app.user.config.feedToken %}
25 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right">
26 <i class="material-icons md-24">rss_feed</i>
27 </a>
28 {% endif %}
17 </li> 29 </li>
18 {% endfor %} 30 {% endfor %}
19 </ul> 31 </ul>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig
new file mode 100644
index 00000000..6df4c160
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_feed_link.html.twig
@@ -0,0 +1,11 @@
1{% if tag is defined %}
2 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
3{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
4 {% set feedRoute = currentRoute %}
5 {% if currentRoute == 'homepage' %}
6 {% set feedRoute = 'unread' %}
7 {% endif %}
8 {% set feedRoute = feedRoute ~ '_feed' %}
9
10 <a rel="alternate" type="application/atom+xml" href="{{ path(feedRoute, {'username': app.user.username, 'token': app.user.config.feedToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
11{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig
deleted file mode 100644
index eb26054c..00000000
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/_rss_link.html.twig
+++ /dev/null
@@ -1,11 +0,0 @@
1{% if tag is defined %}
2 <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
3{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
4 {% set rssRoute = currentRoute %}
5 {% if currentRoute == 'homepage' %}
6 {% set rssRoute = 'unread' %}
7 {% endif %}
8 {% set rssRoute = rssRoute ~ '_rss' %}
9
10 <a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
11{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
index 25d09ec3..cf6f6571 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/entries.xml.twig
@@ -1,34 +1,53 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"> 2<feed xmlns="http://www.w3.org/2005/Atom">
3 <channel> 3 {% if type != 'tag' %}
4 <title>wallabag - {{ type }} feed</title> 4 <title>wallabag — {{type}} feed</title>
5 <link>{{ url_html }}</link> 5 <subtitle type="html">Atom feed for {{ type }} entries</subtitle>
6 <link rel="self" href="{{ app.request.uri }}"/> 6 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}</id>
7 {% if entries.hasPreviousPage -%} 7 <link rel="alternate" type="text/html" href="{{ url(type) }}"/>
8 <link rel="previous" href="{{ url }}?page={{ entries.previousPage }}"/> 8 {% else %}
9 {% endif -%} 9 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}:{{ tag }}</id>
10 {% if entries.hasNextPage -%} 10 <link rel="alternate" type="text/html" href="{{ url('tag_entries', {'slug': tag}) }}"/>
11 <link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/> 11 <title>wallabag — {{type}} {{ tag }} feed</title>
12 {% endif -%} 12 <subtitle type="html">Atom feed for entries tagged with {{ tag }}</subtitle>
13 <link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/> 13 {% endif %}
14 <pubDate>{{ "now"|date(constant('DATE_RSS')) }}</pubDate> 14 {% if entries | length > 0 %}
15 <generator>wallabag</generator> 15 <updated>{{ (entries | first).createdAt | date('c') }}</updated> {# Indicates the last time the feed was modified in a significant way. #}
16 <description>wallabag {{ type }} elements</description> 16 {% endif %}
17 17 <link rel="self" type="application/atom+xml" href="{{ app.request.uri }}"/>
18 {% for entry in entries %} 18 {% if entries.hasPreviousPage %}
19 19 <link rel="previous" href="{{ url }}/{{ entries.previousPage }}"/>
20 <item> 20 {% endif -%}
21 <title><![CDATA[{{ entry.title|e }}]]></title> 21 {% if entries.hasNextPage %}
22 <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source> 22 <link rel="next" href="{{ url }}/{{ entries.nextPage }}"/>
23 <link>{{ entry.url }}</link> 23 {% endif -%}
24 <guid>{{ entry.url }}</guid> 24 <link rel="last" href="{{ url }}/{{ entries.nbPages }}"/>
25 <pubDate>{{ entry.createdAt|date(constant('DATE_RSS')) }}</pubDate> 25 <generator uri="https://wallabag.org" version="{{ version }}">wallabag</generator>
26 <description> 26 <author>
27 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]> 27 <name>{{ user }}</name>
28 </description> 28 </author>
29 </item> 29 <icon>{{ asset('favicon.ico') }}</icon>
30 30 <logo>{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}</logo>
31 {% for entry in entries %}
32 <entry>
33 <title><![CDATA[{{ entry.title|e }}]]></title>
34 <link rel="alternate" type="text/html"
35 href="{{ url('view', {'id': entry.id}) }}"/>
36 <link rel="via">{{ entry.url }}</link>
37 <id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:entry:{{ entry.id }}</id>
38 <updated>{{ entry.updatedAt|date('c') }}</updated>
39 <published>{{ entry.createdAt|date('c') }}</published>
40 {% for tag in entry.tags %}
41 <category term="{{ tag.slug }}" label="{{ tag.label }}" />
31 {% endfor %} 42 {% endfor %}
32 43 {% for author in entry.publishedBy %}
33 </channel> 44 <author>
34</rss> 45 <name>{{ author }}</name>
46 </author>
47 {% endfor %}
48 <content type="html" {% if entry.language %}xml:lang="{{ entry.language[:2] }}"{% endif %}>
49 <![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
50 </content>
51 </entry>
52 {% endfor %}
53</feed>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig
index 4580813c..521b3eea 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Static/quickstart.html.twig
@@ -21,7 +21,7 @@
21 <div class="card-action"> 21 <div class="card-action">
22 <ul> 22 <ul>
23 <li><a href="{{ path('config') }}">{{ 'quickstart.configure.language'|trans }}</a></li> 23 <li><a href="{{ path('config') }}">{{ 'quickstart.configure.language'|trans }}</a></li>
24 <li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.rss'|trans }}</a></li> 24 <li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.feed'|trans }}</a></li>
25 <li><a href="{{ path('config') }}#set5">{{ 'quickstart.more'|trans }}</a></li> 25 <li><a href="{{ path('config') }}#set5">{{ 'quickstart.more'|trans }}</a></li>
26 </ul> 26 </ul>
27 </div> 27 </div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index f896fe2d..818fc4e7 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -12,10 +12,11 @@
12 <div class="div_tabs col s12"> 12 <div class="div_tabs col s12">
13 <ul class="tabs"> 13 <ul class="tabs">
14 <li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li> 14 <li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li>
15 <li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.rss'|trans }}</a></li> 15 <li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.feed'|trans }}</a></li>
16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li> 16 <li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li> 17 <li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li> 18 <li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
19 <li class="tab col s12 m6 l3"><a href="#set6">{{ 'config.tab_menu.reset'|trans }}</a></li>
19 </ul> 20 </ul>
20 </div> 21 </div>
21 22
@@ -111,8 +112,7 @@
111 <img id="androidQrcode" class="hide-on-med-and-down" /> 112 <img id="androidQrcode" class="hide-on-med-and-down" />
112 </div> 113 </div>
113 <script> 114 <script>
114 const imgBase64 = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}'); 115 document.getElementById('androidQrcode').src = jrQrcode.getQrBase64('wallabag://{{ app.user.username }}@{{ wallabag_url }}');
115 document.getElementById('androidQrcode').src = imgBase64;
116 </script> 116 </script>
117 </div> 117 </div>
118 118
@@ -122,42 +122,42 @@
122 </div> 122 </div>
123 123
124 <div id="set2" class="col s12"> 124 <div id="set2" class="col s12">
125 {{ form_start(form.rss) }} 125 {{ form_start(form.feed) }}
126 {{ form_errors(form.rss) }} 126 {{ form_errors(form.feed) }}
127 127
128 <div class="row"> 128 <div class="row">
129 <div class="input-field col s12"> 129 <div class="input-field col s12">
130 {{ 'config.form_rss.description'|trans }} 130 {{ 'config.form_feed.description'|trans }}
131 </div> 131 </div>
132 </div> 132 </div>
133 133
134 <div class="row"> 134 <div class="row">
135 <div class="col s12"> 135 <div class="col s12">
136 <h6 class="grey-text">{{ 'config.form_rss.token_label'|trans }}</h6> 136 <h6 class="grey-text">{{ 'config.form_feed.token_label'|trans }}</h6>
137 <div> 137 <div>
138 {% if rss.token %} 138 {% if feed.token %}
139 {{ rss.token }} 139 {{ feed.token }}
140 {% else %} 140 {% else %}
141 <em>{{ 'config.form_rss.no_token'|trans }}</em> 141 <em>{{ 'config.form_feed.no_token'|trans }}</em>
142 {% endif %} 142 {% endif %}
143 – <a href="{{ path('generate_token') }}"> 143 – <a href="{{ path('generate_token') }}">
144 {% if rss.token %} 144 {% if feed.token %}
145 {{ 'config.form_rss.token_reset'|trans }} 145 {{ 'config.form_feed.token_reset'|trans }}
146 {% else %} 146 {% else %}
147 {{ 'config.form_rss.token_create'|trans }} 147 {{ 'config.form_feed.token_create'|trans }}
148 {% endif %}</a> 148 {% endif %}</a>
149 </div> 149 </div>
150 </div> 150 </div>
151 </div> 151 </div>
152 {% if rss.token %} 152 {% if feed.token %}
153 <div class="row"> 153 <div class="row">
154 <div class="col s12"> 154 <div class="col s12">
155 <h6 class="grey-text">{{ 'config.form_rss.rss_links'|trans }}</h6> 155 <h6 class="grey-text">{{ 'config.form_feed.feed_links'|trans }}</h6>
156 <ul> 156 <ul>
157 <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li> 157 <li><a href="{{ path('unread_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.unread'|trans }}</a></li>
158 <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li> 158 <li><a href="{{ path('starred_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.starred'|trans }}</a></li>
159 <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li> 159 <li><a href="{{ path('archive_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.archive'|trans }}</a></li>
160 <li><a href="{{ path('all_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.all'|trans }}</a></li> 160 <li><a href="{{ path('all_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.all'|trans }}</a></li>
161 </ul> 161 </ul>
162 </div> 162 </div>
163 </div> 163 </div>
@@ -165,14 +165,14 @@
165 165
166 <div class="row"> 166 <div class="row">
167 <div class="input-field col s12"> 167 <div class="input-field col s12">
168 {{ form_label(form.rss.rss_limit) }} 168 {{ form_label(form.feed.feed_limit) }}
169 {{ form_errors(form.rss.rss_limit) }} 169 {{ form_errors(form.feed.feed_limit) }}
170 {{ form_widget(form.rss.rss_limit) }} 170 {{ form_widget(form.feed.feed_limit) }}
171 </div> 171 </div>
172 </div> 172 </div>
173 173
174 {{ form_widget(form.rss.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} 174 {{ form_widget(form.feed.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
175 {{ form_rest(form.rss) }} 175 {{ form_rest(form.feed) }}
176 </form> 176 </form>
177 </div> 177 </div>
178 178
@@ -196,59 +196,42 @@
196 </div> 196 </div>
197 </div> 197 </div>
198 198
199 {% if twofactor_auth %} 199 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
200 <div class="row">
201 <div class="input-field col s11">
202 {{ 'config.form_user.two_factor_description'|trans }}
203
204 <br />
205 200
206 {{ form_widget(form.user.twoFactorAuthentication) }} 201 {% if twofactor_auth %}
207 {{ form_label(form.user.twoFactorAuthentication) }} 202 <br/>
208 {{ form_errors(form.user.twoFactorAuthentication) }} 203 <br/>
209 </div> 204 <div class="row">
210 <div class="input-field col s1"> 205 <h5>{{ 'config.otp.page_title'|trans }}</h5>
211 <a href="#" class="tooltipped" data-position="left" data-delay="50" data-tooltip="{{ 'config.form_user.help_twoFactorAuthentication'|trans }}"> 206
212 <i class="material-icons">live_help</i> 207 <p>{{ 'config.form_user.two_factor_description'|trans }}</p>
213 </a> 208
209 <table>
210 <thead>
211 <tr>
212 <th>{{ 'config.form_user.two_factor.table_method'|trans }}</th>
213 <th>{{ 'config.form_user.two_factor.table_state'|trans }}</th>
214 <th>{{ 'config.form_user.two_factor.table_action'|trans }}</th>
215 </tr>
216 </thead>
217
218 <tbody>
219 <tr>
220 <td>{{ 'config.form_user.two_factor.emailTwoFactor_label'|trans }}</td>
221 <td>{% if app.user.isEmailTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
222 <td><a href="{{ path('config_otp_email') }}" class="waves-effect waves-light btn{% if app.user.isEmailTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_email'|trans }}</a></td>
223 </tr>
224 <tr>
225 <td>{{ 'config.form_user.two_factor.googleTwoFactor_label'|trans }}</td>
226 <td>{% if app.user.isGoogleTwoFactor %}<b>{{ 'config.form_user.two_factor.state_enabled'|trans }}</b>{% else %}{{ 'config.form_user.two_factor.state_disabled'|trans }}{% endif %}</td>
227 <td><a href="{{ path('config_otp_app') }}" class="waves-effect waves-light btn{% if app.user.isGoogleTwoFactor %} disabled{% endif %}">{{ 'config.form_user.two_factor.action_app'|trans }}</a></td>
228 </tr>
229 </tbody>
230 </table>
214 </div> 231 </div>
215 </div>
216 {% endif %} 232 {% endif %}
217
218 {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
219 {{ form_widget(form.user._token) }} 233 {{ form_widget(form.user._token) }}
220 </form> 234 </form>
221
222 <br /><hr /><br />
223
224 <div class="row">
225 <h5>{{ 'config.reset.title'|trans }}</h5>
226 <p>{{ 'config.reset.description'|trans }}</p>
227 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
228 {{ 'config.reset.annotations'|trans }}
229 </a>
230 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
231 {{ 'config.reset.tags'|trans }}
232 </a>
233 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
234 {{ 'config.reset.archived'|trans }}
235 </a>
236 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
237 {{ 'config.reset.entries'|trans }}
238 </a>
239 </div>
240
241 {% if enabled_users > 1 %}
242 <br /><hr /><br />
243
244 <div class="row">
245 <h5>{{ 'config.form_user.delete.title'|trans }}</h5>
246 <p>{{ 'config.form_user.delete.description'|trans }}</p>
247 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
248 {{ 'config.form_user.delete.button'|trans }}
249 </a>
250 </div>
251 {% endif %}
252 </div> 235 </div>
253 236
254 <div id="set4" class="col s12"> 237 <div id="set4" class="col s12">
@@ -422,6 +405,37 @@
422 </div> 405 </div>
423 </div> 406 </div>
424 </div> 407 </div>
408
409 <div id="set6" class="col s12">
410 <div class="row">
411 <h5>{{ 'config.reset.title'|trans }}</h5>
412 <p>{{ 'config.reset.description'|trans }}</p>
413 <a href="{{ path('config_reset', { type: 'annotations'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
414 {{ 'config.reset.annotations'|trans }}
415 </a>
416 <a href="{{ path('config_reset', { type: 'tags'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
417 {{ 'config.reset.tags'|trans }}
418 </a>
419 <a href="{{ path('config_reset', { type: 'archived'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
420 {{ 'config.reset.archived'|trans }}
421 </a>
422 <a href="{{ path('config_reset', { type: 'entries'}) }}" onclick="return confirm('{{ 'config.reset.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red">
423 {{ 'config.reset.entries'|trans }}
424 </a>
425 </div>
426
427 {% if enabled_users > 1 %}
428 <br /><hr /><br />
429
430 <div class="row">
431 <h5>{{ 'config.form_user.delete.title'|trans }}</h5>
432 <p>{{ 'config.form_user.delete.description'|trans }}</p>
433 <a href="{{ path('delete_account') }}" onclick="return confirm('{{ 'config.form_user.delete.confirm'|trans|escape('js') }}')" class="waves-effect waves-light btn red delete-account">
434 {{ 'config.form_user.delete.button'|trans }}
435 </a>
436 </div>
437 {% endif %}
438 </div>
425 </div> 439 </div>
426 440
427 </div> 441 </div>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig
new file mode 100644
index 00000000..7875d787
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/otp_app.html.twig
@@ -0,0 +1,63 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'config.page_title'|trans }} > {{ 'config.otp.page_title'|trans }}{% endblock %}
4
5{% block content %}
6 <div class="row">
7 <div class="col s12">
8 <div class="card-panel settings">
9 <div class="row">
10 <h5>{{ 'config.otp.page_title'|trans }}</h5>
11
12 <ol>
13 <li>
14 <p>{{ 'config.otp.app.two_factor_code_description_1'|trans }}</p>
15 <p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p>
16
17 <p>
18 <img id="2faQrcode" class="hide-on-med-and-down" />
19 <script>
20 document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code }}');
21 </script>
22 </p>
23 </li>
24 <li>
25 <p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p>
26
27 <p><strong>{{ backupCodes|join("\n")|nl2br }}</strong></p>
28 </li>
29 <li>
30 <p>{{ 'config.otp.app.two_factor_code_description_4'|trans }}</p>
31
32 {% for flashMessage in app.session.flashbag.get("two_factor") %}
33 <div class="card-panel red darken-1 black-text">
34 {{ flashMessage|trans }}
35 </div>
36 {% endfor %}
37
38 <form class="form" action="{{ path("config_otp_app_check") }}" method="post">
39 <div class="card-content">
40 <div class="row">
41 <div class="input-field col s12">
42 <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label>
43 <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" />
44 </div>
45 </div>
46 </div>
47 <div class="card-action">
48 <a href="{{ path('config_otp_app_cancel') }}" class="waves-effect waves-light grey btn">
49 {{ 'config.otp.app.cancel'|trans }}
50 </a>
51 <button class="btn waves-effect waves-light" type="submit" name="send">
52 {{ 'config.otp.app.enable'|trans }}
53 <i class="material-icons right">send</i>
54 </button>
55 </div>
56 </form>
57 </li>
58 </ol>
59 </div>
60 </div>
61 </div>
62 </div>
63{% endblock %}
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 742dd330..476d7403 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
@@ -2,8 +2,8 @@
2 2
3{% block head %} 3{% block head %}
4 {{ parent() }} 4 {{ parent() }}
5 {% if tag is defined and app.user.config.rssToken %} 5 {% if tag is defined and app.user.config.feedToken %}
6 <link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" /> 6 <link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
7 {% endif %} 7 {% endif %}
8{% endblock %} 8{% endblock %}
9 9
@@ -21,12 +21,15 @@
21{% block content %} 21{% block content %}
22 {% set listMode = app.user.config.listMode %} 22 {% set listMode = app.user.config.listMode %}
23 {% set currentRoute = app.request.attributes.get('_route') %} 23 {% set currentRoute = app.request.attributes.get('_route') %}
24 {% if currentRoute == 'homepage' %}
25 {% set currentRoute = 'unread' %}
26 {% endif %}
24 <div class="results"> 27 <div class="results">
25 <div class="nb-results"> 28 <div class="nb-results">
26 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} 29 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
27 <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a> 30 <a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
28 {% if app.user.config.rssToken %} 31 {% if app.user.config.feedToken %}
29 {% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %} 32 {% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %}
30 {% endif %} 33 {% endif %}
31 </div> 34 </div>
32 {% if entries.getNbPages > 1 %} 35 {% if entries.getNbPages > 1 %}
@@ -60,9 +63,6 @@
60 {% if tag is defined %} 63 {% if tag is defined %}
61 {% set currentTag = tag.slug %} 64 {% set currentTag = tag.slug %}
62 {% endif %} 65 {% endif %}
63 {% if currentRoute == 'homepage' %}
64 {% set currentRoute = 'unread' %}
65 {% endif %}
66 <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4> 66 <h4 class="center">{{ 'entry.list.export_title'|trans }}</h4>
67 <ul> 67 <ul>
68 {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag }) }}">EPUB</a></li>{% endif %} 68 {% if craue_setting('export_epub') %}<li class="bold"><a class="waves-effect" href="{{ path('export_entries', { 'category': currentRoute, 'format': 'epub', 'tag' : currentTag }) }}">EPUB</a></li>{% endif %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
index c15b5146..79907bbb 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig
@@ -13,9 +13,20 @@
13 <ul class="card-tag-labels"> 13 <ul class="card-tag-labels">
14 {% for tag in tags %} 14 {% for tag in tags %}
15 <li title="{{tag.label}} ({{ tag.nbEntries }})" id="tag-{{ tag.id }}"> 15 <li title="{{tag.label}} ({{ tag.nbEntries }})" id="tag-{{ tag.id }}">
16 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}" class="card-tag-link">{{tag.label}} ({{ tag.nbEntries }})</a> 16 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}" class="card-tag-link" data-handle="tag-link">
17 {% if app.user.config.rssToken %} 17 {{ tag.label }}&nbsp;({{ tag.nbEntries }})
18 <a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a> 18 </a>
19 {% if renameForms is defined and renameForms[tag.id] is defined %}
20 <form class="card-tag-form hidden" data-handle="tag-rename-form" action="{{ path('tag_rename', {'slug': tag.slug})}}" method="POST">
21 {{ form_widget(renameForms[tag.id].label, {'attr': {'value': tag.label}}) }}
22 {{ form_rest(renameForms[tag.id]) }}
23 </form>
24 <a class="card-tag-rename" data-handler="tag-rename" href="javascript:void(0);">
25 <i class="material-icons">mode_edit</i>
26 </a>
27 {% endif %}
28 {% if app.user.config.feedToken %}
29 <a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a>
19 {% endif %} 30 {% endif %}
20 </li> 31 </li>
21 {% endfor %} 32 {% endfor %}
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 052a8c01..b9c45567 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -46,6 +46,8 @@
46 {% set activeRoute = 'starred' %} 46 {% set activeRoute = 'starred' %}
47 {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %} 47 {% elseif currentRoute == 'unread' or currentRoute == 'homepage' or currentRouteFromQueryParams == 'unread' %}
48 {% set activeRoute = 'unread' %} 48 {% set activeRoute = 'unread' %}
49 {% elseif currentRoute == 'untagged' %}
50 {% set activeRoute = 'untagged' %}
49 {% endif %} 51 {% endif %}
50 52
51 <li class="bold {% if activeRoute == 'unread' %}active{% endif %}"> 53 <li class="bold {% if activeRoute == 'unread' %}active{% endif %}">
@@ -113,6 +115,13 @@
113 <i class="material-icons">search</i> 115 <i class="material-icons">search</i>
114 </a> 116 </a>
115 </li> 117 </li>
118 {% if activeRoute %}
119 <li id="button_random">
120 <a class="waves-effect tooltipped js-random-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.random_entry'|trans }}" href="{{ path('random_entry', { 'type': activeRoute }) }}">
121 <i class="material-icons">casino</i>
122 </a>
123 </li>
124 {% endif %}
116 <li id="button_filters"> 125 <li id="button_filters">
117 <a class="nav-panel-menu button-collapse-right tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters"> 126 <a class="nav-panel-menu button-collapse-right tooltipped js-filters-action" data-position="bottom" data-delay="50" data-tooltip="{{ 'menu.top.filter_entries'|trans }}" href="#" data-activates="filters">
118 <i class="material-icons">filter_list</i> 127 <i class="material-icons">filter_list</i>
@@ -125,7 +134,7 @@
125 </li> 134 </li>
126 </ul> 135 </ul>
127 </div> 136 </div>
128 {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }} 137 {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': currentRoute})) }}
129 {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }} 138 {{ render(controller("WallabagCoreBundle:Entry:addEntryForm")) }}
130 </div> 139 </div>
131 </nav> 140 </nav>