]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Resources / views / Pocket / index.html.twig
index 8aa5da9714cb79d842a9c6db8cb1c61f0354a8bd..536e3d1aee341bc961a109980518b5c9599cbb98 100644 (file)
@@ -1,26 +1,34 @@
 {% extends "WallabagCoreBundle::layout.html.twig" %}
-{% block title %}{% trans %}Import > Pocket{% endtrans %}{% endblock %}
+
+{% block title %}{{ 'import.pocket.page_title'|trans }}{% endblock %}
 
 {% block content %}
 <div class="row">
     <div class="col s12">
         <div class="card-panel settings">
+            {% include 'WallabagImportBundle:Import:_information.html.twig' %}
+
             {% if not has_consumer_key %}
-                <div class="card-panel red darken-1">
-                    {% trans %}Pocket import isn't configured.{% endtrans %}
-                    {% if is_granted('ROLE_SUPER_ADMIN') %}
-                        {% trans with {'%keyurls%': '<a href="' ~ path('craue_config_settings_modify') ~ '#set-import">', '%keyurle%':'</a>'} %}You need to define %keyurls% a pocket_consumer_key %keyurle%.{% endtrans %}
-                    {% else %}
-                        {% trans %}Your server admin needs to define an API Key for Pocket.{% endtrans %}
-                    {% endif %}
+                <div class="card-panel red white-text">
+                    {{ 'import.pocket.config_missing.description'|trans }}
+
+                    {{ 'import.pocket.config_missing.admin_message'|trans({'%keyurls%': '<a href="' ~ path('config') ~ '">', '%keyurle%':'</a>'})|raw }}
                 </div>
             {% endif %}
 
             <blockquote>{{ import.description|trans }}</blockquote>
-            <p>{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %}</p>
+            <p>{{ 'import.pocket.authorize_message'|trans }}</p>
+
             <form method="post" action="{{ path('import_pocket_auth') }}">
-                <button class="btn waves-effect waves-light" type="submit" name="action">
-                    {% trans %}Connect to Pocket and import data{% endtrans %}
+                <div class="row">
+                    <div class="input-field col s6 with-checkbox">
+                        <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6>
+                        {{ form_widget(form.mark_as_read) }}
+                        {{ form_label(form.mark_as_read) }}
+                    </div>
+                </div>
+                <button class="btn waves-effect waves-light" type="submit" name="action" {% if not has_consumer_key %}disabled="disabled"{% endif %}>
+                    {{ 'import.pocket.connect_to_pocket'|trans }}
                 </button>
             </form>
         </div>