2015-08-04 14:18:15 +00:00
{% extends "WallabagCoreBundle::layout.html.twig" %}
2016-03-09 07:59:08 +00:00
{% block title %} {{ 'config.page_title' | trans }} {% endblock %}
2015-08-04 14:18:15 +00:00
{% block content %}
<div class="row">
<div class="col s12">
2015-08-04 16:39:26 +00:00
<div class="card-panel settings">
2015-08-04 14:18:15 +00:00
<div class="row">
2015-08-04 16:39:26 +00:00
<div class="div_tabs col s12">
2015-08-04 14:18:15 +00:00
<ul class="tabs">
2016-10-15 17:26:38 +00:00
<li class="tab col s12 m6 l3"><a class="active" href="#set1"> {{ 'config.tab_menu.settings' | trans }} </a></li>
<li class="tab col s12 m6 l3"><a href="#set2"> {{ 'config.tab_menu.rss' | trans }} </a></li>
<li class="tab col s12 m6 l3"><a href="#set3"> {{ 'config.tab_menu.user_info' | trans }} </a></li>
<li class="tab col s12 m6 l3"><a href="#set4"> {{ 'config.tab_menu.password' | trans }} </a></li>
<li class="tab col s12 m6 l3"><a href="#set5"> {{ 'config.tab_menu.rules' | trans }} </a></li>
2015-08-04 14:18:15 +00:00
</ul>
</div>
<div id="set1" class="col s12">
2015-11-06 23:18:06 +00:00
{{ form_start ( form .config ) }}
2015-08-04 14:18:15 +00:00
{{ form_errors ( form .config ) }}
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
{{ form_label ( form .config .theme ) }}
2015-08-04 14:18:15 +00:00
{{ form_errors ( form .config .theme ) }}
{{ form_widget ( form .config .theme ) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .config .items_per_page ) }}
{{ form_errors ( form .config .items_per_page ) }}
{{ form_widget ( form .config .items_per_page ) }}
</div>
</div>
2016-03-08 15:44:25 +00:00
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .config .reading_speed ) }}
{{ form_errors ( form .config .reading_speed ) }}
{{ form_widget ( form .config .reading_speed ) }}
2016-03-20 21:09:00 +00:00
<p>
{{ 'config.form_settings.reading_speed.help_message' | trans }}
<a href="http://www.myreadspeed.com/calculate/">myreadspeed</a>
</p>
2016-03-08 15:44:25 +00:00
</div>
</div>
2015-08-04 14:18:15 +00:00
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .config .language ) }}
{{ form_errors ( form .config .language ) }}
{{ form_widget ( form .config .language ) }}
</div>
</div>
2016-09-16 20:22:25 +00:00
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .config .pocket_consumer_key ) }}
{{ form_errors ( form .config .pocket_consumer_key ) }}
{{ form_widget ( form .config .pocket_consumer_key ) }}
<p>
»
<a href="https://getpocket.com/developer/docs/authentication">https://getpocket.com/developer/docs/authentication</a>
</p>
</div>
</div>
2016-10-31 15:16:41 +00:00
<div class="row">
<div class="input-field col s12">
<h5>Configure your Android application</h5>
<a href="wallabag:// {{ app .user .username }} @ {{ wallabag_url }} " class="waves-effect waves-light btn hide-on-large-only">Touch here to prefill your Android application</a>
<img id="androidQrcode" class="hide-on-med-and-down" />
</div>
<script>
var imgBase64 = jrQrcode.getQrBase64('wallabag:// {{ app .user .username }} @ {{ wallabag_url }} ');
document.getElementById('androidQrcode').src=imgBase64;
</script>
</div>
2016-03-09 07:59:08 +00:00
{{ form_widget ( form .config .save , { 'attr' : { 'class' : 'btn waves-effect waves-light' }} ) }}
{{ form_rest ( form .config ) }}
2015-08-04 14:18:15 +00:00
</form>
</div>
<div id="set2" class="col s12">
2015-11-06 23:18:06 +00:00
{{ form_start ( form .rss ) }}
2015-08-04 14:18:15 +00:00
{{ form_errors ( form .rss ) }}
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
{{ 'config.form_rss.description' | trans }}
2015-09-30 06:36:30 +00:00
</div>
</div>
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
<label> {{ 'config.form_rss.token_label' | trans }} </label>
2015-08-22 10:28:56 +00:00
<div>
{% if rss .token %}
{{ rss .token }}
{% else %}
2016-03-09 07:59:08 +00:00
<em> {{ 'config.form_rss.no_token' | trans }} </em>
2015-08-22 10:28:56 +00:00
{% endif %}
2016-03-09 07:59:08 +00:00
– <a href=" {{ path ( 'generate_token' ) }} ">
{% if rss .token %}
{{ 'config.form_rss.token_reset' | trans }}
{% else %}
{{ 'config.form_rss.token_create' | trans }}
{% endif %} </a>
2015-08-22 10:28:56 +00:00
</div>
2015-08-04 14:18:15 +00:00
</div>
</div>
2015-09-30 06:36:30 +00:00
{% if rss .token %}
2015-08-04 14:18:15 +00:00
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
<label> {{ 'config.form_rss.rss_links' | trans }} </label>
<ul>
<li><a href=" {{ path ( 'unread_rss' , { 'username' : rss .username , 'token' : rss .token } ) }} "> {{ 'config.form_rss.rss_link.unread' | trans }} </a></li>
<li><a href=" {{ path ( 'starred_rss' , { 'username' : rss .username , 'token' : rss .token } ) }} "> {{ 'config.form_rss.rss_link.starred' | trans }} </a></li>
<li><a href=" {{ path ( 'archive_rss' , { 'username' : rss .username , 'token' : rss .token } ) }} "> {{ 'config.form_rss.rss_link.archive' | trans }} </a></li>
</ul>
2015-08-04 14:18:15 +00:00
</div>
</div>
2015-09-30 06:36:30 +00:00
{% endif %}
2015-08-04 14:18:15 +00:00
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .rss .rss_limit ) }}
{{ form_errors ( form .rss .rss_limit ) }}
{{ form_widget ( form .rss .rss_limit ) }}
</div>
</div>
2016-03-09 07:59:08 +00:00
{{ form_widget ( form .rss .save , { 'attr' : { 'class' : 'btn waves-effect waves-light' }} ) }}
{{ form_rest ( form .rss ) }}
2015-08-04 14:18:15 +00:00
</form>
</div>
<div id="set3" class="col s12">
2015-11-06 23:18:06 +00:00
{{ form_start ( form .user ) }}
2015-08-04 14:18:15 +00:00
{{ form_errors ( form .user ) }}
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .user .name ) }}
{{ form_errors ( form .user .name ) }}
{{ form_widget ( form .user .name ) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .user .email ) }}
{{ form_errors ( form .user .email ) }}
{{ form_widget ( form .user .email ) }}
</div>
</div>
2015-10-15 11:17:21 +00:00
{% if twofactor_auth %}
2015-12-29 08:59:46 +00:00
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
{{ 'config.form_user.two_factor_description' | trans }}
2015-12-29 08:59:46 +00:00
2016-09-30 18:09:06 +00:00
<br />
2015-10-13 20:43:15 +00:00
{{ form_widget ( form .user .twoFactorAuthentication ) }}
{{ form_label ( form .user .twoFactorAuthentication ) }}
{{ form_errors ( form .user .twoFactorAuthentication ) }}
</div>
</div>
2015-10-15 11:17:21 +00:00
{% endif %}
2015-10-13 20:43:15 +00:00
2016-03-09 07:59:08 +00:00
{{ form_widget ( form .user .save , { 'attr' : { 'class' : 'btn waves-effect waves-light' }} ) }}
2016-05-18 13:02:00 +00:00
{{ form_widget ( form .user ._token ) }}
2015-08-04 14:18:15 +00:00
</form>
2016-09-08 12:07:36 +00:00
2016-10-01 07:26:32 +00:00
<br /><hr /><br />
<div class="row">
<h5> {{ 'config.reset.title' | trans }} </h5>
<p> {{ 'config.reset.description' | trans }} </p>
<a href=" {{ path ( 'config_reset' , { type : 'annotations' } ) }} " onclick="return confirm(' {{ 'config.reset.confirm' | trans | escape ( 'js' ) }} ')" class="waves-effect waves-light btn red">
{{ 'config.reset.annotations' | trans }}
</a>
<a href=" {{ path ( 'config_reset' , { type : 'tags' } ) }} " onclick="return confirm(' {{ 'config.reset.confirm' | trans | escape ( 'js' ) }} ')" class="waves-effect waves-light btn red">
{{ 'config.reset.tags' | trans }}
</a>
<a href=" {{ path ( 'config_reset' , { type : 'entries' } ) }} " onclick="return confirm(' {{ 'config.reset.confirm' | trans | escape ( 'js' ) }} ')" class="waves-effect waves-light btn red">
{{ 'config.reset.entries' | trans }}
</a>
</div>
2016-09-08 12:07:36 +00:00
{% if enabled_users > 1 %}
2016-10-08 17:39:12 +00:00
<br /><hr /><br />
<div class="row">
2016-10-08 17:39:50 +00:00
<h5> {{ 'config.form_user.delete.title' | trans }} </h5>
<p> {{ 'config.form_user.delete.description' | trans }} </p>
<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">
{{ 'config.form_user.delete.button' | trans }}
2016-10-08 17:39:12 +00:00
</a>
</div>
2016-09-08 12:07:36 +00:00
{% endif %}
2015-08-04 14:18:15 +00:00
</div>
<div id="set4" class="col s12">
2015-11-06 23:18:06 +00:00
{{ form_start ( form .pwd ) }}
2015-08-04 14:18:15 +00:00
{{ form_errors ( form .pwd ) }}
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .pwd .old_password ) }}
{{ form_errors ( form .pwd .old_password ) }}
{{ form_widget ( form .pwd .old_password ) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .pwd .new_password .first ) }}
{{ form_errors ( form .pwd .new_password .first ) }}
{{ form_widget ( form .pwd .new_password .first ) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .pwd .new_password .second ) }}
{{ form_errors ( form .pwd .new_password .second ) }}
{{ form_widget ( form .pwd .new_password .second ) }}
</div>
</div>
2016-03-09 07:59:08 +00:00
{{ form_widget ( form .pwd .save , { 'attr' : { 'class' : 'btn waves-effect waves-light' }} ) }}
{{ form_rest ( form .pwd ) }}
2015-08-04 14:18:15 +00:00
</form>
</div>
2015-10-11 15:30:58 +00:00
<div id="set5" class="col s12">
2016-09-02 08:53:22 +00:00
{% if app .user .config .taggingRules is not empty %}
2015-10-11 15:37:19 +00:00
<div class="row">
<div class="input-field col s12">
<ul>
{% for tagging_rule in app .user .config .taggingRules %}
<li>
2016-03-09 07:59:08 +00:00
{{ 'config.form_rules.if_label' | trans }}
« {{ tagging_rule .rule }} »
{{ 'config.form_rules.then_tag_as_label' | trans }}
« {{ tagging_rule .tags | join ( ', ' ) }} »
2016-10-01 14:47:48 +00:00
<a href=" {{ path ( 'edit_tagging_rule' , { id : tagging_rule .id } ) }} " title=" {{ 'config.form_rules.edit_rule_label' | trans }} ">
<i class="tool grey-text mode_edit material-icons">mode_edit</i>
</a>
2016-03-09 07:59:08 +00:00
<a href=" {{ path ( 'delete_tagging_rule' , { id : tagging_rule .id } ) }} " title=" {{ 'config.form_rules.delete_rule_label' | trans }} ">
2016-03-08 16:02:34 +00:00
<i class="tool grey-text delete material-icons">delete</i>
2015-10-25 09:45:15 +00:00
</a>
2015-10-11 15:37:19 +00:00
</li>
{% endfor %}
</ul>
</div>
</div>
2016-09-02 08:53:22 +00:00
{% endif %}
2015-10-11 15:37:19 +00:00
2015-11-16 13:01:43 +00:00
{{ form_start ( form .new_tagging_rule ) }}
2015-10-25 13:34:43 +00:00
{{ form_errors ( form .new_tagging_rule ) }}
2015-10-11 15:30:58 +00:00
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .new_tagging_rule .rule ) }}
{{ form_errors ( form .new_tagging_rule .rule ) }}
{{ form_widget ( form .new_tagging_rule .rule ) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label ( form .new_tagging_rule .tags ) }}
{{ form_errors ( form .new_tagging_rule .tags ) }}
{{ form_widget ( form .new_tagging_rule .tags ) }}
</div>
</div>
2016-03-09 07:59:08 +00:00
{{ form_widget ( form .new_tagging_rule .save , { 'attr' : { 'class' : 'btn waves-effect waves-light' }} ) }}
{{ form_rest ( form .new_tagging_rule ) }}
2015-10-11 15:30:58 +00:00
</form>
2015-10-11 15:46:53 +00:00
<div class="row">
<div class="input-field col s12">
2016-03-09 07:59:08 +00:00
<h4> {{ 'config.form_rules.faq.title' | trans }} </h4>
2015-11-11 16:06:36 +00:00
2016-03-09 07:59:08 +00:00
<h5> {{ 'config.form_rules.faq.tagging_rules_definition_title' | trans }} </h5>
<p class="help"> {{ 'config.form_rules.faq.tagging_rules_definition_description' | trans | raw }} </p>
2015-11-11 16:06:36 +00:00
2016-03-09 07:59:08 +00:00
<h5> {{ 'config.form_rules.faq.how_to_use_them_title' | trans }} </h5>
<p class="help"> {{ 'config.form_rules.faq.how_to_use_them_description' | trans | raw }} </p>
2015-11-11 16:06:36 +00:00
2016-03-09 07:59:08 +00:00
<h5> {{ 'config.form_rules.faq.variables_available_title' | trans }} </h5>
2015-10-11 15:46:53 +00:00
<p class="help">
2016-03-09 07:59:08 +00:00
{{ 'config.form_rules.faq.variables_available_description' | trans }}
2015-10-11 15:46:53 +00:00
</p>
2016-04-05 20:29:47 +00:00
<table class="bordered">
<thead>
<tr>
<th> {{ 'config.form_rules.faq.variable_description.label' | trans }} </th>
<th> {{ 'config.form_rules.faq.meaning' | trans }} </th>
<th> {{ 'config.form_rules.faq.operator_description.label' | trans }} </th>
<th> {{ 'config.form_rules.faq.meaning' | trans }} </th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td> {{ 'config.form_rules.faq.variable_description.title' | trans }} </td>
<td><=</td>
<td> {{ 'config.form_rules.faq.operator_description.less_than' | trans }} </td>
</tr>
<tr>
<td>url</td>
<td> {{ 'config.form_rules.faq.variable_description.url' | trans }} </td>
<td><</td>
<td> {{ 'config.form_rules.faq.operator_description.strictly_less_than' | trans }} </td>
</tr>
<tr>
<td>isArchived</td>
<td> {{ 'config.form_rules.faq.variable_description.isArchived' | trans }} </td>
2016-04-09 12:04:43 +00:00
<td>>=</td>
2016-04-05 20:29:47 +00:00
<td> {{ 'config.form_rules.faq.operator_description.greater_than' | trans }} </td>
</tr>
<tr>
<td>isStarred</td>
<td> {{ 'config.form_rules.faq.variable_description.isStarred' | trans }} </td>
<td>></td>
<td> {{ 'config.form_rules.faq.operator_description.strictly_greater_than' | trans }} </td>
</tr>
<tr>
<td>content</td>
<td> {{ 'config.form_rules.faq.variable_description.content' | trans }} </td>
<td>=</td>
<td> {{ 'config.form_rules.faq.operator_description.equal_to' | trans }} </td>
</tr>
<tr>
<td>language</td>
<td> {{ 'config.form_rules.faq.variable_description.language' | trans }} </td>
<td>!=</td>
<td> {{ 'config.form_rules.faq.operator_description.not_equal_to' | trans }} </td>
</tr>
<tr>
<td>mimetype</td>
<td> {{ 'config.form_rules.faq.variable_description.mimetype' | trans }} </td>
<td>OR</td>
<td> {{ 'config.form_rules.faq.operator_description.or' | trans }} </td>
</tr>
<tr>
<td>readingTime</td>
<td> {{ 'config.form_rules.faq.variable_description.readingTime' | trans }} </td>
<td>AND</td>
<td> {{ 'config.form_rules.faq.operator_description.and' | trans }} </td>
</tr>
<tr>
<td>domainName</td>
<td> {{ 'config.form_rules.faq.variable_description.domainName' | trans }} </td>
<td>matches</td>
<td> {{ 'config.form_rules.faq.operator_description.matches' | trans | raw }} </td>
</tr>
</tbody>
</table>
2015-10-11 15:46:53 +00:00
</div>
</div>
2015-10-11 15:30:58 +00:00
</div>
2015-08-04 14:18:15 +00:00
</div>
</div>
</div>
</div>
{% endblock %}