]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
Add a table explaining the available variables
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Config / index.html.twig
index 8f121a2b756c594bee8e0da6b21af560fac22e03..885718f8274ce762bac096178606de6b04ca2017 100644 (file)
@@ -15,8 +15,9 @@
                         <li class="tab col s3"><a href="#set2">{% trans %}RSS{% endtrans %}</a></li>
                         <li class="tab col s3"><a href="#set3">{% trans %}User information{% endtrans %}</a></li>
                         <li class="tab col s3"><a href="#set4">{% trans %}Password{% endtrans %}</a></li>
+                        <li class="tab col s3"><a href="#set5">{% trans %}Tags{% endtrans %}</a></li>
                         {% if is_granted('ROLE_SUPER_ADMIN') %}
-                        <li class="tab col s3"><a href="#set5">{% trans %}Add a user{% endtrans %}</a></li>
+                        <li class="tab col s3"><a href="#set6">{% trans %}Add a user{% endtrans %}</a></li>
                         {% endif %}
                         </ul>
                     </div>
                         </form>
                     </div>
 
+                    <div id="set5" class="col s12">
+                        <div class="row">
+                            <div class="input-field col s12">
+                                <ul>
+                                    {% for tagging_rule in app.user.config.taggingRules %}
+                                    <li>
+                                        if « {{ tagging_rule.rule }} » then tag as « {{ tagging_rule.tags|join(', ') }} »
+                                    </li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
+
+                        <form action="{{ path('config') }}#set5" method="post" {{ form_enctype(form.pwd) }}>
+                            {{ form_errors(form.pwd) }}
+
+                            <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>
+
+                            <div class="hidden">{{ form_rest(form.new_tagging_rule) }}</div>
+                            <button class="btn waves-effect waves-light" type="submit" name="action">
+                                {% trans %}Save{% endtrans %}
+                            </button>
+                        </form>
+
+                        <div class="row">
+                            <div class="input-field col s12">
+                                <p class="help">
+                                    {% trans %}The following variables can be used to create tagging rules:{% endtrans %}
+
+                                    <table>
+                                        <thead>
+                                            <tr>
+                                                <th>Variable</th>
+                                                <th>Meaning</th>
+                                            </tr>
+                                        </thead>
+
+                                        <tbody>
+                                            <tr>
+                                                <td>title</td>
+                                                <td>{% trans %}Title of the entry{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>url</td>
+                                                <td>{% trans %}URL of the entry{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>isArchived</td>
+                                                <td>{% trans %}Whether the entry is archived or not{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>isStared</td>
+                                                <td>{% trans %}Whether the entry is starred or not{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>content</td>
+                                                <td>{% trans %}The entry's content{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>language</td>
+                                                <td>{% trans %}The entry's language{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>mimetype</td>
+                                                <td>{% trans %}The entry's mime-type{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>readingTime</td>
+                                                <td>{% trans %}The estimated entry's reading time, in minutes{% endtrans %}</td>
+                                            </tr>
+                                            <tr>
+                                                <td>domainName</td>
+                                                <td>{% trans %}The domain name of the entry{% endtrans %}</td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </p>
+                            </div>
+                        </div>
+                    </div>
+
                     {% if is_granted('ROLE_SUPER_ADMIN') %}
                     <div id="set5" class="col s12">
                         {{ form_start(form.new_user) }}