mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Merge pull request #30 from alphagov/new-nav
Create side navigation for logged in pages
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -63,3 +63,5 @@ app/assets/stylesheets/govuk_template/.sass-cache/
|
||||
.sass-cache/
|
||||
cache/
|
||||
app/static/*
|
||||
app/static/stylesheets/*.css
|
||||
|
||||
|
||||
@@ -44,4 +44,16 @@
|
||||
|
||||
#global-header #logo {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.column-three-quarters {
|
||||
@include grid-column(3/4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
a:visited {
|
||||
color: #005ea5;
|
||||
}
|
||||
23
app/assets/stylesheets/components/navigation.scss
Normal file
23
app/assets/stylesheets/components/navigation.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
#navigation {
|
||||
padding: 50px 0 0 0;
|
||||
}
|
||||
|
||||
#navigation li {
|
||||
@include core-16();
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
#navigation ul {
|
||||
border-bottom: 1px solid #777;
|
||||
margin: 0 20px 0 0;
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#navigation a:link,a:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#navigation a:hover {
|
||||
color: #2e8aca;
|
||||
}
|
||||
@@ -33,6 +33,7 @@
|
||||
@import "components/sms-message";
|
||||
@import "components/submit-form";
|
||||
@import "components/table";
|
||||
@import "components/navigation";
|
||||
|
||||
// TODO: break this up
|
||||
@import "app";
|
||||
|
||||
21
app/templates/main_nav.html
Normal file
21
app/templates/main_nav.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% macro main_nav() %}
|
||||
|
||||
<div id="navigation">
|
||||
<h3><a href="{{ url_for('.dashboard') }}">Service name</a></h3>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.sendsms') }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.sendemail') }}">Send emails</a></li>
|
||||
<li><a href="{{ url_for('.showjobs') }}">Activity</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.apikeys') }}">API keys and documentation</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.manageusers') }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.servicesettings') }}">Service settings</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="/user-profile">Your details</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,20 +1,17 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | API keys and documentation
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">API keys and documentation</h1>
|
||||
|
||||
<p>Here's where developers can access information about the API and access keys</p>
|
||||
|
||||
<p><a href="dashboard">Back to dashboard</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Send email
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Send email</h1>
|
||||
|
||||
<p>This page will be where we check the email messages we're about to send</p>
|
||||
@@ -15,7 +13,6 @@ GOV.UK Notify | Send email
|
||||
<p>
|
||||
<a class="button" href="dashboard" role="button">Send email messages</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
{% from "components/table.html" import table, field %}
|
||||
{% from "components/placeholder.html" import placeholder %}
|
||||
@@ -8,10 +8,9 @@
|
||||
GOV.UK Notify | Send text messages
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Send text messages</h1>
|
||||
|
||||
<h2 class="heading-medium">Check and confirm</h2>
|
||||
@@ -61,7 +60,6 @@
|
||||
url_for(".sendsms")
|
||||
) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Dashboard
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Dashboard</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="{{ url_for('.sendsms') }}">Send text messages</a></li>
|
||||
<li><a href="{{ url_for('.sendemail') }}">Send email messages</a></li>
|
||||
<li><a href="{{ url_for('.showjobs') }}">View notifications activity</a></li>
|
||||
<li><a href="{{ url_for('.userprofile') }}">User profile</a></li>
|
||||
<li><a href="{{ url_for('.manageusers') }}">Manage users</a></li>
|
||||
<li><a href="{{ url_for('.managetemplates')}}">Manage templates</a></li>
|
||||
<li><a href="{{ url_for('.servicesettings') }}">Service settings</a></li>
|
||||
<li><a href="{{ url_for('.apikeys') }}">API keys and documentation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p>Dashboard goes here.</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Edit template
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Edit template</h1>
|
||||
|
||||
<p>Here's where you can edit an exiting template (including delete) or add a new one</p>
|
||||
|
||||
<p><a href="manage-templates">Back to manage templates</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Notifications for a specific job</h1>
|
||||
|
||||
<p>This page will be where we list the notifications for a specific job.</p>
|
||||
@@ -16,7 +14,6 @@ GOV.UK Notify | Notifications activity
|
||||
<li><a href="/jobs/job/notification">view a specific notification</a></li>
|
||||
<li><a href="/jobs">view all the activity for this service</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Notifications activity</h1>
|
||||
|
||||
<p>This page will be where we show the list of jobs that this service has processed</p>
|
||||
@@ -15,7 +13,6 @@ GOV.UK Notify | Notifications activity
|
||||
<p>
|
||||
<a href="jobs/job">view a particular notification job</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Manage templates
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Manage templates</h1>
|
||||
|
||||
<p>Here's where you can view templates, choose to add one, or edit/delete one.</p>
|
||||
@@ -17,7 +16,6 @@ GOV.UK Notify | Manage templates
|
||||
<p>
|
||||
<a class="button" href="edit-template" role="button">Add a new message template</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Manage users
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Manage users</h1>
|
||||
|
||||
<p>Here's where you can add or remove users of a service.</p>
|
||||
|
||||
<p><a href="dashboard">Back to dashboard</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Notifications activity
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">A specific notification</h1>
|
||||
|
||||
<p>This page will be where we show what happened for a specific notification.</p>
|
||||
@@ -15,7 +14,6 @@ GOV.UK Notify | Notifications activity
|
||||
<p>
|
||||
<a href="/jobs/job">View other notifications in this job</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Send email
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Send email</h1>
|
||||
|
||||
<p>This page will be where we construct email messages</p>
|
||||
@@ -15,7 +14,6 @@ GOV.UK Notify | Send email
|
||||
<p>
|
||||
<a class="button" href="check-email" role="button">Continue</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Send text messages
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
|
||||
<h1 class="heading-xlarge">Send text messages</h1>
|
||||
|
||||
@@ -46,8 +44,7 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button" value="Continue" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | Service settings
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">Service settings</h1>
|
||||
|
||||
<p>Here's where users can update their service profile.</p>
|
||||
|
||||
<p><a href="dashboard">Back to dashboard</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
GOV.UK Notify | User settings
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-xlarge">User profile</h1>
|
||||
|
||||
<p>Here's where users can update their profile, password etc.</p>
|
||||
|
||||
<p><a href="dashboard">Back to dashboard</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
15
app/templates/withnav_template.html
Normal file
15
app/templates/withnav_template.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "admin_template.html" %}
|
||||
{% from "main_nav.html" import main_nav with context %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-third">
|
||||
{{ main_nav() }}
|
||||
</div>
|
||||
<div class="column-two-thirds">
|
||||
{% block maincolumn_content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user