From 63e40f2d7c4074aff0be587c828eb511a6b7c878 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 21 Jan 2016 08:53:09 +0100 Subject: Add CraueConfig for internal settings --- .../CoreBundle/Resources/config/services.yml | 4 ++-- .../Resources/translations/messages.fr.yml | 1 + .../views/themes/baggy/Entry/entry.html.twig | 19 ++++++++-------- .../Resources/views/themes/baggy/layout.html.twig | 3 +++ .../views/themes/material/Entry/entry.html.twig | 25 +++++++++++----------- .../views/themes/material/layout.html.twig | 3 +++ 6 files changed, 30 insertions(+), 25 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources') diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 6a1afcc0..813f8a96 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -3,7 +3,7 @@ services: class: Wallabag\CoreBundle\Helper\DetectActiveTheme arguments: - "@security.token_storage" - - %theme% # default theme from parameters.yml + - %wallabag_core.theme% # custom form type wallabag_core.form.type.config: @@ -86,7 +86,7 @@ services: wallabag_core.helper.entries_export: class: Wallabag\CoreBundle\Helper\EntriesExport arguments: - - %wallabag_url% + - "@craue_config" - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png wallabag.operator.array.matches: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 20f4352b..cc814cc4 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -13,6 +13,7 @@ archive: 'Lus' all: 'Tous les articles' tags: 'Tags' config: 'Configuration' +internal settings: 'Configuration interne' import: 'Importer' howto: 'Aide' logout: 'Déconnexion' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index c23d0e27..27a88287 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -11,16 +11,15 @@
  • {% if entry.isArchived == 0 %}{% trans %}Mark as read{% endtrans %}{% else %}{% trans %}Mark as unread{% endtrans %}{% endif %}
  • {% trans %}Toggle favorite{% endtrans %}
  • {% trans %}Delete{% endtrans %}
  • - {% if share_twitter %}
  • {% endif %} - {% if share_mail %}
  • {% endif %} - {% if share_shaarli %}
  • {% trans %}shaarli{% endtrans %}
  • {% endif %} - {% if share_diaspora %}
  • {% trans %}diaspora{% endtrans %}
  • {% endif %} - {# {% if flattr %}{% if flattr.status == flattrable %}
  • {% trans %}flattr{% endtrans %}
  • {% elseif flattr.status == flattred %}
  • Carrot
  • {% endif %} - {% if show_printlink %}
  • {% trans %}Print{% endtrans %}
  • {% endif %} - {% if export_epub %}
  • EPUB
  • {% endif %} - {% if export_mobi %}
  • MOBI
  • {% endif %} - {% if export_pdf %}
  • PDF
  • {% endif %} + {% if craue_setting('share_twitter') %}
  • {% endif %} + {% if craue_setting('share_mail') %}
  • {% endif %} + {% if craue_setting('share_shaarli') %}
  • {% trans %}shaarli{% endtrans %}
  • {% endif %} + {% if craue_setting('share_diaspora') %}
  • {% trans %}diaspora{% endtrans %}
  • {% endif %} + {% if craue_setting('carrot') %}
  • Carrot
  • {% endif %} + {% if craue_setting('show_printlink') %}
  • {% trans %}Print{% endtrans %}
  • {% endif %} + {% if craue_setting('export_epub') %}
  • EPUB
  • {% endif %} + {% if craue_setting('export_mobi') %}
  • MOBI
  • {% endif %} + {% if craue_setting('export_pdf') %}
  • PDF
  • {% endif %}
  • {% trans %}Does this article appear wrong?{% endtrans %}
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig index 3aead497..b630070c 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig @@ -51,6 +51,9 @@
  • {% trans %}config{% endtrans %}
  • + {% if is_granted('ROLE_SUPER_ADMIN') %} +
  • {% trans %}internal settings{% endtrans %}
  • + {% endif %}
  • {% trans %}import{% endtrans %}
  • {% trans %}howto{% endtrans %}
  • {% trans %}about{% endtrans %}
  • diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 31963ae8..dad96187 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -97,12 +97,11 @@
    @@ -114,13 +113,13 @@
    diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index a8b6dc3f..dff9e612 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -45,6 +45,9 @@
  • {% trans %}all{% endtrans %}
  • {% trans %}tags{% endtrans %}
  • {% trans %}config{% endtrans %}
  • + {% if is_granted('ROLE_SUPER_ADMIN') %} +
  • {% trans %}internal settings{% endtrans %}
  • + {% endif %}
  • {% trans %}import{% endtrans %}
  • {% trans %}howto{% endtrans %}
  • {% trans %}logout{% endtrans %}
  • -- cgit v1.2.3