diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Config')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | 152 |
1 files changed, 150 insertions, 2 deletions
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 8f121a2b..d060311d 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 | |||
@@ -15,8 +15,9 @@ | |||
15 | <li class="tab col s3"><a href="#set2">{% trans %}RSS{% 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> | 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> | 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> | ||
18 | {% if is_granted('ROLE_SUPER_ADMIN') %} | 19 | {% if is_granted('ROLE_SUPER_ADMIN') %} |
19 | <li class="tab col s3"><a href="#set5">{% trans %}Add a user{% endtrans %}</a></li> | 20 | <li class="tab col s3"><a href="#set6">{% trans %}Add a user{% endtrans %}</a></li> |
20 | {% endif %} | 21 | {% endif %} |
21 | </ul> | 22 | </ul> |
22 | </div> | 23 | </div> |
@@ -183,8 +184,155 @@ | |||
183 | </form> | 184 | </form> |
184 | </div> | 185 | </div> |
185 | 186 | ||
186 | {% if is_granted('ROLE_SUPER_ADMIN') %} | ||
187 | <div id="set5" class="col s12"> | 187 | <div id="set5" class="col s12"> |
188 | <div class="row"> | ||
189 | <div class="input-field col s12"> | ||
190 | <ul> | ||
191 | {% for tagging_rule in app.user.config.taggingRules %} | ||
192 | <li> | ||
193 | if « {{ tagging_rule.rule }} » then tag as « {{ tagging_rule.tags|join(', ') }} » | ||
194 | <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{% trans %}Delete{% endtrans %}"> | ||
195 | <i class="tool grey-text delete mdi-action-delete"></i> | ||
196 | </a> | ||
197 | </li> | ||
198 | {% endfor %} | ||
199 | </ul> | ||
200 | </div> | ||
201 | </div> | ||
202 | |||
203 | {{ form_start(form.new_tagging_rule) }} | ||
204 | {{ form_errors(form.new_tagging_rule) }} | ||
205 | |||
206 | <div class="row"> | ||
207 | <div class="input-field col s12"> | ||
208 | {{ form_label(form.new_tagging_rule.rule) }} | ||
209 | {{ form_errors(form.new_tagging_rule.rule) }} | ||
210 | {{ form_widget(form.new_tagging_rule.rule) }} | ||
211 | </div> | ||
212 | </div> | ||
213 | |||
214 | <div class="row"> | ||
215 | <div class="input-field col s12"> | ||
216 | {{ form_label(form.new_tagging_rule.tags) }} | ||
217 | {{ form_errors(form.new_tagging_rule.tags) }} | ||
218 | {{ form_widget(form.new_tagging_rule.tags) }} | ||
219 | </div> | ||
220 | </div> | ||
221 | |||
222 | <div class="hidden">{{ form_rest(form.new_tagging_rule) }}</div> | ||
223 | <button class="btn waves-effect waves-light" type="submit" name="action"> | ||
224 | {% trans %}Save{% endtrans %} | ||
225 | </button> | ||
226 | </form> | ||
227 | |||
228 | <div class="row"> | ||
229 | <div class="input-field col s12"> | ||
230 | <h4>{% trans %}FAQ{% endtrans %}</h4> | ||
231 | |||
232 | <h5>{% trans %}What does « tagging rules » mean?{% endtrans %}</h5> | ||
233 | <p class="help"> | ||
234 | {% trans %} | ||
235 | They are rules used by Wallabag to automatically tag new entries.<br /> | ||
236 | Each time a new entry is added, all the tagging rules will be used to add | ||
237 | the tags you configured, thus saving you the trouble to manually classify | ||
238 | your entries. | ||
239 | {% endtrans %} | ||
240 | </p> | ||
241 | |||
242 | <h5>{% trans %}How do I use them?{% endtrans %}</h5> | ||
243 | <p class="help"> | ||
244 | {% trans %} | ||
245 | Let assume you want to tag new entries as « <i>short reading</i> » when the reading time is inferior to 3 minutes.<br /> | ||
246 | In that case, you should put « readingTime <= 3 » in the <i>Rule</i> field and « <i>short reading</i> » in the <i>Tags</i> | ||
247 | field.<br /> | ||
248 | Several tags can added simultaneously by separating them by a comma: « <i>short reading, must read</i> »<br /> | ||
249 | 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> » | ||
250 | {% endtrans %} | ||
251 | </p> | ||
252 | |||
253 | <h5>{% trans %}Which variables and operators can I use to write rules?{% endtrans %}</h5> | ||
254 | <p class="help"> | ||
255 | {% trans %}The following variables and operators can be used to create tagging rules:{% endtrans %} | ||
256 | |||
257 | <table> | ||
258 | <thead> | ||
259 | <tr> | ||
260 | <th>{% trans %}Variable{% endtrans %}</th> | ||
261 | <th>{% trans %}Meaning{% endtrans %}</th> | ||
262 | <th>{% trans %}Operator{% endtrans %}</th> | ||
263 | <th>{% trans %}Meaning{% endtrans %}</th> | ||
264 | </tr> | ||
265 | </thead> | ||
266 | |||
267 | <tbody> | ||
268 | <tr> | ||
269 | <td>title</td> | ||
270 | <td>{% trans %}Title of the entry{% endtrans %}</td> | ||
271 | <td><=</td> | ||
272 | <td>{% trans %}Less than…{% endtrans %}</td> | ||
273 | </tr> | ||
274 | <tr> | ||
275 | <td>url</td> | ||
276 | <td>{% trans %}URL of the entry{% endtrans %}</td> | ||
277 | <td><</td> | ||
278 | <td>{% trans %}Strictly less than…{% endtrans %}</td> | ||
279 | </tr> | ||
280 | <tr> | ||
281 | <td>isArchived</td> | ||
282 | <td>{% trans %}Whether the entry is archived or not{% endtrans %}</td> | ||
283 | <td>=></td> | ||
284 | <td>{% trans %}Greater than…{% endtrans %}</td> | ||
285 | </tr> | ||
286 | <tr> | ||
287 | <td>isStared</td> | ||
288 | <td>{% trans %}Whether the entry is starred or not{% endtrans %}</td> | ||
289 | <td>></td> | ||
290 | <td>{% trans %}Strictly greater than…{% endtrans %}</td> | ||
291 | </tr> | ||
292 | <tr> | ||
293 | <td>content</td> | ||
294 | <td>{% trans %}The entry's content{% endtrans %}</td> | ||
295 | <td>=</td> | ||
296 | <td>{% trans %}Equal to…{% endtrans %}</td> | ||
297 | </tr> | ||
298 | <tr> | ||
299 | <td>language</td> | ||
300 | <td>{% trans %}The entry's language{% endtrans %}</td> | ||
301 | <td>!=</td> | ||
302 | <td>{% trans %}Not equal to…{% endtrans %}</td> | ||
303 | </tr> | ||
304 | <tr> | ||
305 | <td>mimetype</td> | ||
306 | <td>{% trans %}The entry's mime-type{% endtrans %}</td> | ||
307 | <td>OR</td> | ||
308 | <td>{% trans %}One rule or another{% endtrans %}</td> | ||
309 | </tr> | ||
310 | <tr> | ||
311 | <td>readingTime</td> | ||
312 | <td>{% trans %}The estimated entry's reading time, in minutes{% endtrans %}</td> | ||
313 | <td>AND</td> | ||
314 | <td>{% trans %}One rule and another{% endtrans %}</td> | ||
315 | </tr> | ||
316 | <tr> | ||
317 | <td>domainName</td> | ||
318 | <td>{% trans %}The domain name of the entry{% endtrans %}</td> | ||
319 | <td>matches</td> | ||
320 | <td> | ||
321 | {% trans %} | ||
322 | Tests that a <i>subject</i> is matches a <i>search</i> (case-insensitive).<br /> | ||
323 | Example: <code>title matches "football"</code> | ||
324 | {% endtrans %} | ||
325 | </td> | ||
326 | </tr> | ||
327 | </tbody> | ||
328 | </table> | ||
329 | </p> | ||
330 | </div> | ||
331 | </div> | ||
332 | </div> | ||
333 | |||
334 | {% if is_granted('ROLE_SUPER_ADMIN') %} | ||
335 | <div id="set6" class="col s12"> | ||
188 | {{ form_start(form.new_user) }} | 336 | {{ form_start(form.new_user) }} |
189 | {{ form_errors(form.new_user) }} | 337 | {{ form_errors(form.new_user) }} |
190 | 338 | ||