From 6f1f514b2b97107de4f0f875ead5de914f834919 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 22 Jan 2016 10:57:49 +0000 Subject: [PATCH] Add restricted mode warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For the hack day, we should only let developers use the platform in restricted mode. This commit adds a banner telling them this. Can’t get the app running locally, so fingers crossed it actually looks how I imagine it’s going to look… --- app/assets/stylesheets/components/banner.scss | 6 +++++ app/templates/components/banner.html | 4 ++-- app/templates/withnav_template.html | 22 +++++++++++-------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index 0e709f9b1..f6c08fba9 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -28,6 +28,12 @@ } +.banner-info { + @extend .banner; + background: $govuk-blue; + color: $white; +} + .banner-dangerous { @extend .banner; diff --git a/app/templates/components/banner.html b/app/templates/components/banner.html index a03d2cb0a..39e0a1e5f 100644 --- a/app/templates/components/banner.html +++ b/app/templates/components/banner.html @@ -1,5 +1,5 @@ -{% macro banner(body, with_tick=False) %} -
+{% macro banner(body, type=None, with_tick=False) %} +
{{ body }}
{% endmacro %} diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index 732ba75ba..f01a527c6 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -1,13 +1,17 @@ {% extends "admin_template.html" %} -{% from "main_nav.html" import main_nav with context %} +{% from "components/banner.html" import banner %} {% block fullwidth_content %} -
-
- {% include "main_nav.html" %} -
-
- {% block maincolumn_content %}{% endblock %} -
-
+
+
+ {% include "main_nav.html" %} +
+
+ {{ banner( + 'You are in restricted mode. You can only send notifications to yourself.', + 'info' + ) }} + {% block maincolumn_content %}{% endblock %} +
+
{% endblock %}