mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Merge pull request #112 from alphagov/post-hack-day
Show all links in side navigation again
This commit is contained in:
@@ -72,19 +72,13 @@
|
||||
<main id="content" role="main" class="page-container">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<ul class="banner-dangerous">
|
||||
{% for category, message in messages %}
|
||||
<li class="flash-message">
|
||||
{{ message }}
|
||||
{% if 'delete' == category %}
|
||||
<form method='post'>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" name="delete" value="Yes, delete this template" />
|
||||
</form>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for category, message in messages %}
|
||||
{{ banner(
|
||||
message,
|
||||
'default' if category == 'default' else 'dangerous',
|
||||
delete_button="Yes, delete this template" if 'delete' == category else None
|
||||
)}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block fullwidth_content %}{% endblock %}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{% macro banner(body, type=None, with_tick=False) %}
|
||||
{% macro banner(body, type=None, with_tick=False, delete_button=None) %}
|
||||
<div class='banner{% if type %}-{{ type }}{% endif %}{% if with_tick %}-with-tick{% endif %}'>
|
||||
{{ body }}
|
||||
{% if delete_button %}
|
||||
<form method='post'>
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" name="delete" value="{{ delete_button }}" />
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<li><a href="{{ url_for('.service_dashboard', service_id=service_id) }}">Dashboard</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<!--<li><a href="{{ url_for('.send_sms', service_id=service_id) }}">Send text messages</a></li>-->
|
||||
<!--<li><a href="{{ url_for('.send_email', service_id=service_id) }}">Send emails</a></li>-->
|
||||
<!--<li><a href="{{ url_for('.view_jobs', service_id=service_id) }}">Activity</a></li>-->
|
||||
<li><a href="{{ url_for('.send_sms', service_id=service_id) }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.send_email', service_id=service_id) }}">Send emails</a></li>
|
||||
<li><a href="{{ url_for('.view_jobs', service_id=service_id) }}">Activity</a></li>
|
||||
<li><a href="{{ url_for('.manage_service_templates', service_id=service_id) }}">Templates</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
@@ -13,7 +13,7 @@
|
||||
<li><a href="{{ url_for('.api_keys', service_id=service_id) }}">API keys</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<!--<li><a href="{{ url_for('.manage_users', service_id=service_id) }}">Manage users</a></li>-->
|
||||
<li><a href="{{ url_for('.manage_users', service_id=service_id) }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.service_settings', service_id=service_id) }}">Service settings</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -22,14 +22,25 @@
|
||||
<p><a href="https://github.com/alphagov/notifications-admin/blob/master/app/templates/views/styleguide.html">View source</a></p>
|
||||
|
||||
<h2 class="heading-large">Banner</h2>
|
||||
<p>Used to show the result of a user’s action.</p>
|
||||
{{ banner("This is a banner", with_tick=True) }}
|
||||
<p>Used to show the status of a thing or action.</p>
|
||||
|
||||
{{ banner("You sent 1,234 text messages", with_tick=True) }}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-one-third">
|
||||
{{ banner("Delivered 10:20") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ banner(
|
||||
'Your service is in restricted mode. You can only send notifications to yourself.',
|
||||
'info'
|
||||
) }}
|
||||
|
||||
{{ banner('You’re not allowed to do this', 'dangerous')}}
|
||||
|
||||
{{ banner('Are you sure you want to delete?', 'dangerous', delete_button="Yes, delete this thing")}}
|
||||
|
||||
<h2 class="heading-large">Big number</h2>
|
||||
|
||||
<p>Used to show some important statistics.</p>
|
||||
|
||||
Reference in New Issue
Block a user