From ec020a42f40d0b483249e14b8214e1dcaf495a5a Mon Sep 17 00:00:00 2001 From: Chris Heathcote Date: Mon, 14 Dec 2015 16:37:15 +0000 Subject: [PATCH 1/7] Initial nav & implementation on dashboard --- .gitignore | 2 ++ app/assets/stylesheets/app.scss | 32 +++++++++++++++++++ .../stylesheets/components/navigation.scss | 23 +++++++++++++ app/assets/stylesheets/main.scss | 1 + app/templates/main_nav.html | 19 +++++++++++ app/templates/views/dashboard.html | 26 +++++++-------- app/templates/withnav_template.html | 15 +++++++++ 7 files changed, 104 insertions(+), 14 deletions(-) create mode 100644 app/assets/stylesheets/components/navigation.scss create mode 100644 app/templates/main_nav.html create mode 100644 app/templates/withnav_template.html diff --git a/.gitignore b/.gitignore index aca6ef03d..0a21cad9f 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,5 @@ app/assets/stylesheets/govuk_template/.sass-cache/ .sass-cache/ cache/ app/static/* +app/static/stylesheets/*.css + diff --git a/app/assets/stylesheets/app.scss b/app/assets/stylesheets/app.scss index 50c9ec702..d7689cbd6 100644 --- a/app/assets/stylesheets/app.scss +++ b/app/assets/stylesheets/app.scss @@ -44,4 +44,36 @@ #global-header #logo { white-space: nowrap; +} + + + +#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; +} + + + +a:visited { + color: #005ea5; } \ No newline at end of file diff --git a/app/assets/stylesheets/components/navigation.scss b/app/assets/stylesheets/components/navigation.scss new file mode 100644 index 000000000..f11e2c541 --- /dev/null +++ b/app/assets/stylesheets/components/navigation.scss @@ -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; +} \ No newline at end of file diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index e0591db04..e2b93d0c5 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -33,6 +33,7 @@ @import "components/sms-message"; @import "components/submit-form"; @import "components/table"; +@import "components/navigation"; // TODO: break this up @import "app"; diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html new file mode 100644 index 000000000..8ee24ff6a --- /dev/null +++ b/app/templates/main_nav.html @@ -0,0 +1,19 @@ +{% macro main_nav() %} + + +{% endmacro %} \ No newline at end of file diff --git a/app/templates/views/dashboard.html b/app/templates/views/dashboard.html index a8d5e6e31..147a069c6 100644 --- a/app/templates/views/dashboard.html +++ b/app/templates/views/dashboard.html @@ -1,26 +1,24 @@ -{% extends "admin_template.html" %} +{% extends "withnav_template.html" %} + {% block page_title %} GOV.UK Notify | Dashboard {% endblock %} -{% block content %} +{% block maincolumn_content %} -
- -
+ {% endblock %} diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html new file mode 100644 index 000000000..b0bd19960 --- /dev/null +++ b/app/templates/withnav_template.html @@ -0,0 +1,15 @@ +{% extends "admin_template.html" %} +{% from "main_nav.html" import main_nav with context %} + +{% block content %} + +
+
+ {{ main_nav() }} +
+
+ {% block maincolumn_content %}{% endblock %} +
+
+ +{% endblock %} \ No newline at end of file From 15c9269a80220cda500390b30e3bc860e3a12de1 Mon Sep 17 00:00:00 2001 From: Chris Heathcote Date: Mon, 14 Dec 2015 16:53:07 +0000 Subject: [PATCH 2/7] Added main nav to logged in pages --- app/templates/views/api-keys.html | 9 +++------ app/templates/views/check-email.html | 9 +++------ app/templates/views/check-sms.html | 10 ++++------ app/templates/views/dashboard.html | 11 +---------- app/templates/views/edit-template.html | 10 ++++------ app/templates/views/job.html | 9 +++------ app/templates/views/jobs.html | 9 +++------ app/templates/views/manage-templates.html | 10 ++++------ app/templates/views/manage-users.html | 9 +++------ app/templates/views/notification.html | 10 ++++------ app/templates/views/send-email.html | 10 ++++------ app/templates/views/send-sms.html | 9 +++------ app/templates/views/service-settings.html | 9 +++------ app/templates/views/user-profile.html | 8 ++------ 14 files changed, 44 insertions(+), 88 deletions(-) diff --git a/app/templates/views/api-keys.html b/app/templates/views/api-keys.html index 557a0c0f0..dd1c7678d 100644 --- a/app/templates/views/api-keys.html +++ b/app/templates/views/api-keys.html @@ -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 %} -
-

API keys and documentation

Here's where developers can access information about the API and access keys

Back to dashboard

-
-
+ {% endblock %} diff --git a/app/templates/views/check-email.html b/app/templates/views/check-email.html index 6f6bd51af..487f5de73 100644 --- a/app/templates/views/check-email.html +++ b/app/templates/views/check-email.html @@ -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 %} -
-

Send email

This page will be where we check the email messages we're about to send

@@ -15,7 +13,6 @@ GOV.UK Notify | Send email

Send email messages

-
-
+ {% endblock %} diff --git a/app/templates/views/check-sms.html b/app/templates/views/check-sms.html index 13084123a..104d1d075 100644 --- a/app/templates/views/check-sms.html +++ b/app/templates/views/check-sms.html @@ -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 %} + -
-

Send text messages

Check and confirm

@@ -61,7 +60,6 @@ url_for(".sendsms") ) }} -
-
+ {% endblock %} diff --git a/app/templates/views/dashboard.html b/app/templates/views/dashboard.html index 147a069c6..3e294bb47 100644 --- a/app/templates/views/dashboard.html +++ b/app/templates/views/dashboard.html @@ -9,16 +9,7 @@ GOV.UK Notify | Dashboard

Dashboard

- +

Dashboard goes here.

{% endblock %} diff --git a/app/templates/views/edit-template.html b/app/templates/views/edit-template.html index a6da98b25..ed29b8074 100644 --- a/app/templates/views/edit-template.html +++ b/app/templates/views/edit-template.html @@ -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 %} + -
-

Edit template

Here's where you can edit an exiting template (including delete) or add a new one

Back to manage templates

-
-
+ {% endblock %} diff --git a/app/templates/views/job.html b/app/templates/views/job.html index ccaee802c..7457debbc 100644 --- a/app/templates/views/job.html +++ b/app/templates/views/job.html @@ -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 %} -
-

Notifications for a specific job

This page will be where we list the notifications for a specific job.

@@ -16,7 +14,6 @@ GOV.UK Notify | Notifications activity
  • view a specific notification
  • view all the activity for this service
  • -
    -
    + {% endblock %} diff --git a/app/templates/views/jobs.html b/app/templates/views/jobs.html index b38f5da9f..79a9604d8 100644 --- a/app/templates/views/jobs.html +++ b/app/templates/views/jobs.html @@ -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 %} -
    -

    Notifications activity

    This page will be where we show the list of jobs that this service has processed

    @@ -15,7 +13,6 @@ GOV.UK Notify | Notifications activity

    view a particular notification job

    -
    -
    + {% endblock %} diff --git a/app/templates/views/manage-templates.html b/app/templates/views/manage-templates.html index 08ed55c22..1554f3b09 100644 --- a/app/templates/views/manage-templates.html +++ b/app/templates/views/manage-templates.html @@ -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 %} + -
    -

    Manage templates

    Here's where you can view templates, choose to add one, or edit/delete one.

    @@ -17,7 +16,6 @@ GOV.UK Notify | Manage templates

    Add a new message template

    -
    -
    + {% endblock %} diff --git a/app/templates/views/manage-users.html b/app/templates/views/manage-users.html index 8a93b2072..f60a6c53b 100644 --- a/app/templates/views/manage-users.html +++ b/app/templates/views/manage-users.html @@ -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 %} -
    -

    Manage users

    Here's where you can add or remove users of a service.

    Back to dashboard

    -
    -
    + {% endblock %} diff --git a/app/templates/views/notification.html b/app/templates/views/notification.html index bf7faa9e6..99a6902db 100644 --- a/app/templates/views/notification.html +++ b/app/templates/views/notification.html @@ -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 %} + -
    -

    A specific notification

    This page will be where we show what happened for a specific notification.

    @@ -15,7 +14,6 @@ GOV.UK Notify | Notifications activity

    View other notifications in this job

    -
    -
    + {% endblock %} diff --git a/app/templates/views/send-email.html b/app/templates/views/send-email.html index 9161af232..e5911ec4c 100644 --- a/app/templates/views/send-email.html +++ b/app/templates/views/send-email.html @@ -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 %} + -
    -

    Send email

    This page will be where we construct email messages

    @@ -15,7 +14,6 @@ GOV.UK Notify | Send email

    Continue

    -
    -
    + {% endblock %} diff --git a/app/templates/views/send-sms.html b/app/templates/views/send-sms.html index 0915d7ab2..ce07dc69e 100644 --- a/app/templates/views/send-sms.html +++ b/app/templates/views/send-sms.html @@ -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 %}
    -
    -

    Send text messages

    @@ -46,8 +44,7 @@

    -
    -
    +
    {% endblock %} diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 3e6c7bcb4..e53fb9efe 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -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 %} -
    -

    Service settings

    Here's where users can update their service profile.

    Back to dashboard

    -
    -
    + {% endblock %} diff --git a/app/templates/views/user-profile.html b/app/templates/views/user-profile.html index a394b8bd8..12f322314 100644 --- a/app/templates/views/user-profile.html +++ b/app/templates/views/user-profile.html @@ -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 %} -
    -

    User profile

    Here's where users can update their profile, password etc.

    Back to dashboard

    -
    -
    {% endblock %} From 89189f2e35de9335e27270fa970412fd1fa38b1d Mon Sep 17 00:00:00 2001 From: Chris Heathcote Date: Mon, 14 Dec 2015 16:58:43 +0000 Subject: [PATCH 3/7] Add URLs to main nav; add user profile to nav --- app/templates/main_nav.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 8ee24ff6a..0e2d190f3 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -1,19 +1,22 @@ {% macro main_nav() %} {% endmacro %} \ No newline at end of file From 8939f710a9c4eb683ea9f566a0dede8e64c82938 Mon Sep 17 00:00:00 2001 From: Chris Heathcote Date: Mon, 14 Dec 2015 17:05:39 +0000 Subject: [PATCH 4/7] Move navigation into its own css file --- app/assets/stylesheets/app.scss | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/app/assets/stylesheets/app.scss b/app/assets/stylesheets/app.scss index d7689cbd6..e049ec7b4 100644 --- a/app/assets/stylesheets/app.scss +++ b/app/assets/stylesheets/app.scss @@ -48,29 +48,7 @@ -#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; -} From 17850dc17043191af1a1962dba23726309c4ccf0 Mon Sep 17 00:00:00 2001 From: Chris Heathcote Date: Tue, 15 Dec 2015 10:52:24 +0000 Subject: [PATCH 5/7] Changed nav urls to be url_fors --- app/templates/main_nav.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/templates/main_nav.html b/app/templates/main_nav.html index 0e2d190f3..105ada791 100644 --- a/app/templates/main_nav.html +++ b/app/templates/main_nav.html @@ -1,19 +1,18 @@ {% macro main_nav() %}