From fdab81e910f65babd1945e67c74b8bb541bcbfb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 19 Aug 2015 16:00:15 +0200 Subject: [PATCH] warning bar: add parameter to dis/enable it --- app/config/config.yml | 1 + app/config/parameters.yml.dist | 4 ++++ src/Wallabag/CoreBundle/Resources/views/base.html.twig | 6 +++++- .../Resources/views/themes/material/public/css/main.css | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 1f5f7441..5b26b06f 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -45,6 +45,7 @@ twig: export_mobi: %export_mobi% export_pdf: %export_pdf% version: %app.version% + warning_message: %warning_message% paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" flattr_url: "https://flattr.com/thing/1265480" form: diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index 97933ec3..b3947207 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -22,6 +22,10 @@ parameters: # wallabag misc app.version: 2.0.0-alpha + # message to display at the bottom of the page + warning_message: > + You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to our issues list and open a new if necessary + download_pictures: false # if true, pictures will be stored into data/assets for each article # Entry view diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index a6cba6ce..e27aceae 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig @@ -113,6 +113,10 @@

{% trans %}powered by{% endtrans %} wallabag

{% endblock %} -
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to our issues list and open a new if necessary.
+ {% if warning_message %} +
+ {{ warning_message | raw }} +
+ {% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css index c812ed6f..52a2be80 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css @@ -26,7 +26,7 @@ body { background: #f0f0f0; } -#alphabar { +#warning_message { position: fixed; background-color: #ff6347; z-index: 1000; @@ -36,7 +36,7 @@ body { color: #000; } -#alphabar a { +#warning_message a { color: #555; } -- 2.41.0