Merge pull request #100 from alphagov/restricted-mode-banner

Add restricted mode warning
This commit is contained in:
Adam Shimali
2016-01-22 11:27:18 +00:00
3 changed files with 21 additions and 11 deletions

View File

@@ -28,6 +28,12 @@
}
.banner-info {
@extend .banner;
background: $govuk-blue;
color: $white;
}
.banner-dangerous {
@extend .banner;

View File

@@ -1,5 +1,5 @@
{% macro banner(body, with_tick=False) %}
<div class='banner{% if with_tick %}-with-tick{% endif %}'>
{% macro banner(body, type=None, with_tick=False) %}
<div class='banner{% if type %}-{{ type }}{% endif %}{% if with_tick %}-with-tick{% endif %}'>
{{ body }}
</div>
{% endmacro %}

View File

@@ -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 %}
<div class="grid-row">
<div class="column-one-quarter">
{% include "main_nav.html" %}
</div>
<div class="column-three-quarters">
{% block maincolumn_content %}{% endblock %}
</div>
</div>
<div class="grid-row">
<div class="column-one-quarter">
{% include "main_nav.html" %}
</div>
<div class="column-three-quarters">
{{ banner(
'You are in restricted mode. You can only send notifications to yourself.',
'info'
) }}
{% block maincolumn_content %}{% endblock %}
</div>
</div>
{% endblock %}