]>
Commit | Line | Data |
---|---|---|
53e12188 AD |
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | ||
4f0dfac6 | 3 | {% block title %}{% trans %}config{% endtrans %}{% endblock %} |
53e12188 AD |
4 | |
5 | {% block content %} | |
6 | ||
7 | <div class="row"> | |
8 | <div class="col s12"> | |
9948d899 | 9 | <div class="card-panel settings"> |
53e12188 AD |
10 | |
11 | <div class="row"> | |
9948d899 | 12 | <div class="div_tabs col s12"> |
53e12188 | 13 | <ul class="tabs"> |
26975877 JB |
14 | <li class="tab col s3"><a class="active" href="#set1">{% trans %}Settings{% endtrans %}</a></li> |
15 | <li class="tab col s3"><a href="#set2">{% trans %}RSS{% endtrans %}</a></li> | |
16 | <li class="tab col s3"><a href="#set3">{% trans %}User information{% endtrans %}</a></li> | |
17 | <li class="tab col s3"><a href="#set4">{% trans %}Password{% endtrans %}</a></li> | |
18 | <li class="tab col s3"><a href="#set5">{% trans %}Tagging rules{% endtrans %}</a></li> | |
19 | {% if is_granted('ROLE_SUPER_ADMIN') %} | |
20 | <li class="tab col s3"><a href="#set6">{% trans %}Add a user{% endtrans %}</a></li> | |
21 | {% endif %} | |
53e12188 AD |
22 | </ul> |
23 | </div> | |
24 | ||
53e12188 | 25 | <div id="set1" class="col s12"> |
33fe61f9 | 26 | {{ form_start(form.config) }} |
53e12188 AD |
27 | {{ form_errors(form.config) }} |
28 | ||
29 | <div class="row"> | |
30 | <div class="input-field col s12"> | |
31 | {{ form_errors(form.config.theme) }} | |
32 | {{ form_widget(form.config.theme) }} | |
33 | <label class="required">{% trans %}Theme{% endtrans %}</label> | |
34 | </div> | |
35 | </div> | |
36 | ||
37 | <div class="row"> | |
38 | <div class="input-field col s12"> | |
39 | {{ form_label(form.config.items_per_page) }} | |
40 | {{ form_errors(form.config.items_per_page) }} | |
41 | {{ form_widget(form.config.items_per_page) }} | |
42 | </div> | |
43 | </div> | |
44 | ||
bca54859 NL |
45 | <div class="row"> |
46 | <div class="input-field col s12"> | |
47 | {{ form_label(form.config.reading_speed) }} | |
48 | {{ form_errors(form.config.reading_speed) }} | |
49 | {{ form_widget(form.config.reading_speed) }} | |
50 | </div> | |
51 | </div> | |
52 | ||
53e12188 AD |
53 | <div class="row"> |
54 | <div class="input-field col s12"> | |
55 | {{ form_label(form.config.language) }} | |
56 | {{ form_errors(form.config.language) }} | |
57 | {{ form_widget(form.config.language) }} | |
58 | </div> | |
59 | </div> | |
60 | ||
61 | <div class="hidden">{{ form_rest(form.config) }}</div> | |
62 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
43e6f47d | 63 | {% trans %}Save{% endtrans %} |
53e12188 AD |
64 | </button> |
65 | </form> | |
66 | </div> | |
67 | ||
53e12188 | 68 | <div id="set2" class="col s12"> |
33fe61f9 | 69 | {{ form_start(form.rss) }} |
53e12188 AD |
70 | {{ form_errors(form.rss) }} |
71 | ||
72 | <div class="row"> | |
73 | <div class="input-field col s12"> | |
4f0dfac6 NL |
74 | {% trans %}RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader. You need to generate a token first.{% endtrans %} |
75 | </div> | |
76 | </div> | |
77 | ||
78 | <div class="row"> | |
79 | <div class="input-field col s12"> | |
80 | <label>{% trans %}RSS token{% endtrans %}</label> | |
83aaf841 JB |
81 | <div> |
82 | {% if rss.token %} | |
83 | {{ rss.token }} | |
84 | {% else %} | |
4f0dfac6 | 85 | <em>{% trans %}No token{% endtrans %}</em> |
83aaf841 | 86 | {% endif %} |
4f0dfac6 | 87 | – <a href="{{ path('generate_token') }}">{% if rss.token %}{% trans %}Reset your token{% endtrans %}{% else %}{% trans %}Create your token{% endtrans %}{% endif %}</a> |
83aaf841 | 88 | </div> |
53e12188 AD |
89 | </div> |
90 | </div> | |
4f0dfac6 | 91 | {% if rss.token %} |
53e12188 AD |
92 | <div class="row"> |
93 | <div class="input-field col s12"> | |
4f0dfac6 | 94 | <label>{% trans %}RSS links{% endtrans %}</label> |
53e12188 | 95 | <ul> |
4f0dfac6 NL |
96 | <li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}unread{% endtrans %}</a></li> |
97 | <li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}starred{% endtrans %}</a></li> | |
98 | <li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{% trans %}archive{% endtrans %}</a></li> | |
53e12188 | 99 | </ul> |
4f0dfac6 | 100 | |
53e12188 AD |
101 | </div> |
102 | </div> | |
4f0dfac6 | 103 | {% endif %} |
53e12188 AD |
104 | |
105 | <div class="row"> | |
106 | <div class="input-field col s12"> | |
107 | {{ form_label(form.rss.rss_limit) }} | |
108 | {{ form_errors(form.rss.rss_limit) }} | |
109 | {{ form_widget(form.rss.rss_limit) }} | |
110 | </div> | |
111 | </div> | |
112 | ||
113 | <div class="hidden">{{ form_rest(form.rss) }}</div> | |
114 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
43e6f47d | 115 | {% trans %}Save{% endtrans %} |
53e12188 AD |
116 | </button> |
117 | ||
118 | </form> | |
119 | </div> | |
120 | ||
53e12188 | 121 | <div id="set3" class="col s12"> |
33fe61f9 | 122 | {{ form_start(form.user) }} |
53e12188 AD |
123 | {{ form_errors(form.user) }} |
124 | ||
125 | <div class="row"> | |
126 | <div class="input-field col s12"> | |
127 | {{ form_label(form.user.name) }} | |
128 | {{ form_errors(form.user.name) }} | |
129 | {{ form_widget(form.user.name) }} | |
130 | </div> | |
131 | </div> | |
132 | ||
133 | <div class="row"> | |
134 | <div class="input-field col s12"> | |
135 | {{ form_label(form.user.email) }} | |
136 | {{ form_errors(form.user.email) }} | |
137 | {{ form_widget(form.user.email) }} | |
138 | </div> | |
139 | </div> | |
140 | ||
18cf594f | 141 | {% if twofactor_auth %} |
23ff8d36 JB |
142 | <div class="row"> |
143 | <div class="input-field col s12"> | |
144 | {% trans %}Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion{% endtrans %} | |
145 | </div> | |
146 | </div> | |
147 | ||
2db616b5 NL |
148 | <div class="row"> |
149 | <div class="input-field col s12"> | |
150 | {{ form_widget(form.user.twoFactorAuthentication) }} | |
151 | {{ form_label(form.user.twoFactorAuthentication) }} | |
152 | {{ form_errors(form.user.twoFactorAuthentication) }} | |
153 | </div> | |
154 | </div> | |
18cf594f | 155 | {% endif %} |
2db616b5 | 156 | |
53e12188 AD |
157 | <div class="hidden">{{ form_rest(form.user) }}</div> |
158 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
43e6f47d | 159 | {% trans %}Save{% endtrans %} |
53e12188 AD |
160 | </button> |
161 | ||
162 | </form> | |
163 | </div> | |
164 | ||
53e12188 | 165 | <div id="set4" class="col s12"> |
33fe61f9 | 166 | {{ form_start(form.pwd) }} |
53e12188 AD |
167 | {{ form_errors(form.pwd) }} |
168 | ||
169 | <div class="row"> | |
170 | <div class="input-field col s12"> | |
171 | {{ form_label(form.pwd.old_password) }} | |
172 | {{ form_errors(form.pwd.old_password) }} | |
173 | {{ form_widget(form.pwd.old_password) }} | |
174 | </div> | |
175 | </div> | |
176 | ||
177 | <div class="row"> | |
178 | <div class="input-field col s12"> | |
179 | {{ form_label(form.pwd.new_password.first) }} | |
180 | {{ form_errors(form.pwd.new_password.first) }} | |
181 | {{ form_widget(form.pwd.new_password.first) }} | |
182 | </div> | |
183 | </div> | |
184 | ||
185 | <div class="row"> | |
186 | <div class="input-field col s12"> | |
187 | {{ form_label(form.pwd.new_password.second) }} | |
188 | {{ form_errors(form.pwd.new_password.second) }} | |
189 | {{ form_widget(form.pwd.new_password.second) }} | |
190 | </div> | |
191 | </div> | |
192 | ||
193 | <div class="hidden">{{ form_rest(form.pwd) }}</div> | |
194 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
4aafa7f0 | 195 | {% trans %}Save{% endtrans %} |
53e12188 AD |
196 | </button> |
197 | ||
198 | </form> | |
199 | </div> | |
200 | ||
f19f9f62 | 201 | <div id="set5" class="col s12"> |
981cacf7 KG |
202 | <div class="row"> |
203 | <div class="input-field col s12"> | |
204 | <ul> | |
205 | {% for tagging_rule in app.user.config.taggingRules %} | |
206 | <li> | |
207 | if « {{ tagging_rule.rule }} » then tag as « {{ tagging_rule.tags|join(', ') }} » | |
52e423f3 KG |
208 | <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{% trans %}Delete{% endtrans %}"> |
209 | <i class="tool grey-text delete mdi-action-delete"></i> | |
210 | </a> | |
981cacf7 KG |
211 | </li> |
212 | {% endfor %} | |
213 | </ul> | |
214 | </div> | |
215 | </div> | |
216 | ||
c13eda46 | 217 | {{ form_start(form.new_tagging_rule) }} |
9b88658c | 218 | {{ form_errors(form.new_tagging_rule) }} |
f19f9f62 KG |
219 | |
220 | <div class="row"> | |
221 | <div class="input-field col s12"> | |
222 | {{ form_label(form.new_tagging_rule.rule) }} | |
223 | {{ form_errors(form.new_tagging_rule.rule) }} | |
224 | {{ form_widget(form.new_tagging_rule.rule) }} | |
225 | </div> | |
226 | </div> | |
227 | ||
228 | <div class="row"> | |
229 | <div class="input-field col s12"> | |
230 | {{ form_label(form.new_tagging_rule.tags) }} | |
231 | {{ form_errors(form.new_tagging_rule.tags) }} | |
232 | {{ form_widget(form.new_tagging_rule.tags) }} | |
233 | </div> | |
234 | </div> | |
235 | ||
236 | <div class="hidden">{{ form_rest(form.new_tagging_rule) }}</div> | |
237 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
238 | {% trans %}Save{% endtrans %} | |
239 | </button> | |
f19f9f62 | 240 | </form> |
e9fbd2d1 KG |
241 | |
242 | <div class="row"> | |
243 | <div class="input-field col s12"> | |
5c514b0b KG |
244 | <h4>{% trans %}FAQ{% endtrans %}</h4> |
245 | ||
246 | <h5>{% trans %}What does « tagging rules » mean?{% endtrans %}</h5> | |
247 | <p class="help"> | |
248 | {% trans %} | |
4c07a83b | 249 | They are rules used by Wallabag to automatically tag new entries.<br />Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries. |
5c514b0b KG |
250 | {% endtrans %} |
251 | </p> | |
252 | ||
253 | <h5>{% trans %}How do I use them?{% endtrans %}</h5> | |
254 | <p class="help"> | |
255 | {% trans %} | |
4c07a83b | 256 | Let assume you want to tag new entries as « <i>short reading</i> » when the reading time is inferior to 3 minutes.<br />In that case, you should put « readingTime <= 3 » in the <i>Rule</i> field and « <i>short reading</i> » in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: « <i>short reading, must read</i> »<br />Complex rules can be written by using predefined operators: if « <i>readingTime >= 5 AND domainName = "github.com"</i> » then tag as « <i>long reading, github </i> » |
5c514b0b KG |
257 | {% endtrans %} |
258 | </p> | |
259 | ||
260 | <h5>{% trans %}Which variables and operators can I use to write rules?{% endtrans %}</h5> | |
e9fbd2d1 | 261 | <p class="help"> |
5c514b0b | 262 | {% trans %}The following variables and operators can be used to create tagging rules:{% endtrans %} |
e9fbd2d1 KG |
263 | |
264 | <table> | |
265 | <thead> | |
266 | <tr> | |
5c514b0b KG |
267 | <th>{% trans %}Variable{% endtrans %}</th> |
268 | <th>{% trans %}Meaning{% endtrans %}</th> | |
269 | <th>{% trans %}Operator{% endtrans %}</th> | |
270 | <th>{% trans %}Meaning{% endtrans %}</th> | |
e9fbd2d1 KG |
271 | </tr> |
272 | </thead> | |
273 | ||
274 | <tbody> | |
275 | <tr> | |
276 | <td>title</td> | |
277 | <td>{% trans %}Title of the entry{% endtrans %}</td> | |
5c514b0b KG |
278 | <td><=</td> |
279 | <td>{% trans %}Less than…{% endtrans %}</td> | |
e9fbd2d1 KG |
280 | </tr> |
281 | <tr> | |
282 | <td>url</td> | |
283 | <td>{% trans %}URL of the entry{% endtrans %}</td> | |
5c514b0b KG |
284 | <td><</td> |
285 | <td>{% trans %}Strictly less than…{% endtrans %}</td> | |
e9fbd2d1 KG |
286 | </tr> |
287 | <tr> | |
288 | <td>isArchived</td> | |
289 | <td>{% trans %}Whether the entry is archived or not{% endtrans %}</td> | |
5c514b0b KG |
290 | <td>=></td> |
291 | <td>{% trans %}Greater than…{% endtrans %}</td> | |
e9fbd2d1 KG |
292 | </tr> |
293 | <tr> | |
4c07a83b | 294 | <td>isStarred</td> |
e9fbd2d1 | 295 | <td>{% trans %}Whether the entry is starred or not{% endtrans %}</td> |
5c514b0b KG |
296 | <td>></td> |
297 | <td>{% trans %}Strictly greater than…{% endtrans %}</td> | |
e9fbd2d1 KG |
298 | </tr> |
299 | <tr> | |
300 | <td>content</td> | |
301 | <td>{% trans %}The entry's content{% endtrans %}</td> | |
5c514b0b KG |
302 | <td>=</td> |
303 | <td>{% trans %}Equal to…{% endtrans %}</td> | |
e9fbd2d1 KG |
304 | </tr> |
305 | <tr> | |
306 | <td>language</td> | |
307 | <td>{% trans %}The entry's language{% endtrans %}</td> | |
5c514b0b KG |
308 | <td>!=</td> |
309 | <td>{% trans %}Not equal to…{% endtrans %}</td> | |
e9fbd2d1 KG |
310 | </tr> |
311 | <tr> | |
312 | <td>mimetype</td> | |
313 | <td>{% trans %}The entry's mime-type{% endtrans %}</td> | |
5c514b0b KG |
314 | <td>OR</td> |
315 | <td>{% trans %}One rule or another{% endtrans %}</td> | |
e9fbd2d1 KG |
316 | </tr> |
317 | <tr> | |
318 | <td>readingTime</td> | |
319 | <td>{% trans %}The estimated entry's reading time, in minutes{% endtrans %}</td> | |
5c514b0b KG |
320 | <td>AND</td> |
321 | <td>{% trans %}One rule and another{% endtrans %}</td> | |
e9fbd2d1 KG |
322 | </tr> |
323 | <tr> | |
324 | <td>domainName</td> | |
325 | <td>{% trans %}The domain name of the entry{% endtrans %}</td> | |
aeff8aa7 KG |
326 | <td>matches</td> |
327 | <td> | |
328 | {% trans %} | |
4c07a83b | 329 | Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br />Example: <code>title matches "football"</code> |
aeff8aa7 KG |
330 | {% endtrans %} |
331 | </td> | |
e9fbd2d1 KG |
332 | </tr> |
333 | </tbody> | |
334 | </table> | |
335 | </p> | |
336 | </div> | |
337 | </div> | |
f19f9f62 KG |
338 | </div> |
339 | ||
fcb1fba5 | 340 | {% if is_granted('ROLE_SUPER_ADMIN') %} |
c13eda46 | 341 | <div id="set6" class="col s12"> |
33fe61f9 | 342 | {{ form_start(form.new_user) }} |
53e12188 AD |
343 | {{ form_errors(form.new_user) }} |
344 | ||
345 | <div class="row"> | |
346 | <div class="input-field col s12"> | |
347 | {{ form_label(form.new_user.username) }} | |
348 | {{ form_errors(form.new_user.username) }} | |
349 | {{ form_widget(form.new_user.username) }} | |
350 | </div> | |
351 | </div> | |
352 | ||
353 | <div class="row"> | |
354 | <div class="input-field col s12"> | |
fcb1fba5 NL |
355 | {{ form_label(form.new_user.plainPassword.first) }} |
356 | {{ form_errors(form.new_user.plainPassword.first) }} | |
357 | {{ form_widget(form.new_user.plainPassword.first) }} | |
358 | </div> | |
359 | </div> | |
360 | ||
361 | <div class="row"> | |
362 | <div class="input-field col s12"> | |
363 | {{ form_label(form.new_user.plainPassword.second) }} | |
364 | {{ form_errors(form.new_user.plainPassword.second) }} | |
365 | {{ form_widget(form.new_user.plainPassword.second) }} | |
53e12188 AD |
366 | </div> |
367 | </div> | |
368 | ||
369 | <div class="row"> | |
370 | <div class="input-field col s12"> | |
371 | {{ form_label(form.new_user.email) }} | |
372 | {{ form_errors(form.new_user.email) }} | |
373 | {{ form_widget(form.new_user.email) }} | |
374 | </div> | |
375 | </div> | |
376 | ||
377 | <div class="hidden">{{ form_rest(form.new_user) }}</div> | |
378 | <button class="btn waves-effect waves-light" type="submit" name="action"> | |
43e6f47d | 379 | {% trans %}Add a user{% endtrans %} |
53e12188 AD |
380 | </button> |
381 | ||
382 | </form> | |
383 | </div> | |
fcb1fba5 | 384 | {% endif %} |
53e12188 AD |
385 | </div> |
386 | ||
387 | </div> | |
388 | </div> | |
389 | </div> | |
53e12188 | 390 | {% endblock %} |