]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Config / index.html.twig
index 5a90f2273ad2a5d2b952bca863ef3c2de786c246..b53ae2fef48be6eabc2b43146f01000443db9cc6 100644 (file)
                 <div class="row">
                     <div class="div_tabs col s12">
                         <ul class="tabs">
-                            <li class="tab col s3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li>
-                            <li class="tab col s3"><a href="#set2">{{ 'config.tab_menu.rss'|trans }}</a></li>
-                            <li class="tab col s3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
-                            <li class="tab col s3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
-                            <li class="tab col s3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
-                            {% if is_granted('ROLE_SUPER_ADMIN') %}
-                            <li class="tab col s3"><a href="#set6">{{ 'config.tab_menu.new_user'|trans }}</a></li>
-                            {% endif %}
+                            <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>
                         </ul>
                     </div>
 
                                 </div>
                             </div>
 
+                            <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>
+                                        &raquo;
+                                        <a href="https://getpocket.com/developer/docs/authentication">https://getpocket.com/developer/docs/authentication</a>
+                                    </p>
+                                </div>
+                            </div>
+
                             {{ form_widget(form.config.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
                             {{ form_rest(form.config) }}
                         </form>
                             <div class="row">
                                 <div class="input-field col s12">
                                     {{ 'config.form_user.two_factor_description'|trans }}
-                                </div>
-                            </div>
 
-                            <div class="row">
-                                <div class="input-field col s12">
+                                    <br />
+
                                     {{ form_widget(form.user.twoFactorAuthentication) }}
                                     {{ form_label(form.user.twoFactorAuthentication) }}
                                     {{ form_errors(form.user.twoFactorAuthentication) }}
                             {% endif %}
 
                             {{ form_widget(form.user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
-                            {{ form_rest(form.user) }}
+                            {{ form_widget(form.user._token) }}
                         </form>
+
+                        <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>
+
+                        {% if enabled_users > 1 %}
+                            <br /><hr /><br />
+
+                            <div class="row">
+                                <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 }}
+                                </a>
+                            </div>
+                        {% endif %}
                     </div>
 
                     <div id="set4" class="col s12">
                     </div>
 
                     <div id="set5" class="col s12">
+                        {% if app.user.config.taggingRules is not empty %}
                         <div class="row">
                             <div class="input-field col s12">
                                 <ul>
                                         « {{ tagging_rule.rule }} »
                                         {{ 'config.form_rules.then_tag_as_label'|trans }}
                                         « {{ tagging_rule.tags|join(', ') }} »
+                                        <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>
                                         <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}">
-                                            <i class="tool grey-text delete mdi-action-delete"></i>
+                                            <i class="tool grey-text delete material-icons">delete</i>
                                         </a>
                                     </li>
                                     {% endfor %}
                                 </ul>
                             </div>
                         </div>
+                        {% endif %}
 
                         {{ form_start(form.new_tagging_rule) }}
                             {{ form_errors(form.new_tagging_rule) }}
                             </div>
                         </div>
                     </div>
-
-                    {% if is_granted('ROLE_SUPER_ADMIN') %}
-                    <div id="set6" class="col s12">
-                        {{ form_start(form.new_user) }}
-                            {{ form_errors(form.new_user) }}
-
-                            <div class="row">
-                                <div class="input-field col s12">
-                                    {{ form_label(form.new_user.username) }}
-                                    {{ form_errors(form.new_user.username) }}
-                                    {{ form_widget(form.new_user.username) }}
-                                </div>
-                            </div>
-
-                            <div class="row">
-                                <div class="input-field col s12">
-                                    {{ form_label(form.new_user.plainPassword.first) }}
-                                    {{ form_errors(form.new_user.plainPassword.first) }}
-                                    {{ form_widget(form.new_user.plainPassword.first) }}
-                                </div>
-                            </div>
-
-                            <div class="row">
-                                <div class="input-field col s12">
-                                    {{ form_label(form.new_user.plainPassword.second) }}
-                                    {{ form_errors(form.new_user.plainPassword.second) }}
-                                    {{ form_widget(form.new_user.plainPassword.second) }}
-                                </div>
-                            </div>
-
-                            <div class="row">
-                                <div class="input-field col s12">
-                                    {{ form_label(form.new_user.email) }}
-                                    {{ form_errors(form.new_user.email) }}
-                                    {{ form_widget(form.new_user.email) }}
-                                </div>
-                            </div>
-
-                            {{ form_widget(form.new_user.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
-                            {{ form_rest(form.new_user) }}
-                        </form>
-                    </div>
-                    {% endif %}
                 </div>
 
             </div>