From ca08d02f2f17c0e4ec0152a701c540f62713a428 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 3 Nov 2016 15:59:18 +0100 Subject: Add warning message for import + download images When import isn't async and downloading images is enabled, we warn the user that import can fail. Also, added missing translations --- .../ImportBundle/Resources/views/Chrome/index.html.twig | 2 ++ .../ImportBundle/Resources/views/Firefox/index.html.twig | 2 ++ .../Resources/views/Import/_information.html.twig | 15 +++++++++++++++ .../Resources/views/Import/_workerEnabled.html.twig | 8 -------- .../ImportBundle/Resources/views/Import/index.html.twig | 2 ++ .../Resources/views/Instapaper/index.html.twig | 2 +- .../ImportBundle/Resources/views/Pocket/index.html.twig | 2 +- .../Resources/views/Readability/index.html.twig | 2 +- .../Resources/views/WallabagV1/index.html.twig | 2 +- 9 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig delete mode 100644 src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig (limited to 'src/Wallabag/ImportBundle') diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig index ead828c6..93b08540 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig @@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %} +
{{ import.description|trans|raw }}

{{ 'import.chrome.how_to'|trans }}

diff --git a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig index f975da3f..ced3f008 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig @@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %} +
{{ import.description|trans|raw }}

{{ 'import.firefox.how_to'|trans }}

diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig new file mode 100644 index 00000000..48bbcfe7 --- /dev/null +++ b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig @@ -0,0 +1,15 @@ +{% set redis = craue_setting('import_with_redis') %} +{% set rabbit = craue_setting('import_with_rabbitmq') %} +{% set downloadImages = craue_setting('download_images_enabled') %} + +{% if redis or rabbit %} +
+ {{ 'import.worker.enabled'|trans }} {% if rabbit %}RabbitMQ{% elseif redis %}Redis{% endif %} +
+{% endif %} + +{% if not redis and not rabbit and downloadImages %} +
+ {{ 'import.worker.download_images_warning'|trans|raw }} +
+{% endif %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig deleted file mode 100644 index 2390a41f..00000000 --- a/src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig +++ /dev/null @@ -1,8 +0,0 @@ -{% set redis = craue_setting('import_with_redis') %} -{% set rabbit = craue_setting('import_with_rabbitmq') %} - -{% if redis or rabbit %} -
- {{ 'import.worker.enabled'|trans }} {% if rabbit %}RabbitMQ{% elseif redis %}Redis{% endif %} -
-{% endif %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig index 6ea5e0f4..b1ec40a6 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig @@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %} + {{ 'import.page_description'|trans }}
    {% for import in imports %} diff --git a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig index 5789361f..28165d19 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig @@ -6,7 +6,7 @@
    - {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %} + {% include 'WallabagImportBundle:Import:_information.html.twig' %}
    {{ import.description|trans }}
    diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig index 6195fa07..536e3d1a 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig @@ -6,7 +6,7 @@
    - {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %} + {% include 'WallabagImportBundle:Import:_information.html.twig' %} {% if not has_consumer_key %}
    diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig index 74653b0f..737b0adf 100644 --- a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig @@ -6,7 +6,7 @@
    - {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %} + {% include 'WallabagImportBundle:Import:_information.html.twig' %}
    {{ import.description|trans }}
    diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig index 0b19bc34..974b2c73 100644 --- a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig +++ b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig @@ -6,7 +6,7 @@
    - {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %} + {% include 'WallabagImportBundle:Import:_information.html.twig' %}
    {{ import.description|trans }}
    -- cgit v1.2.3