From 6b27a9e7a38534d46dc68b55b80842f6906b1e7b Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 30 Dec 2019 15:15:02 +0000 Subject: [PATCH] Turn off 'Get started' link when signed out --- app/templates/admin_template.html | 67 ++++++++++++++++++++---------- app/templates/views/signedout.html | 2 + 2 files changed, 47 insertions(+), 22 deletions(-) diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index feefab8da..e79f170ea 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -147,6 +147,50 @@ {% set meta_suffix = 'Built by the Government Digital Service' %} {% endif %} + {% if signed_out %} + {% set using_notify_links = { + "title": "Using Notify", + "columns": 1, + "items": [ + { + "href": url_for("main.get_started"), + "text": "Get started" + }, + { + "href": url_for("main.trial_mode_new"), + "text": "Trial mode" + }, + { + "href": url_for("main.message_status"), + "text": "Message status" + }, + { + "href": url_for("main.documentation"), + "text": "API documentation" + } + ] + } %} + {% else %} + {% set using_notify_links = { + "title": "Using Notify", + "columns": 1, + "items": [ + { + "href": url_for("main.trial_mode_new"), + "text": "Trial mode" + }, + { + "href": url_for("main.message_status"), + "text": "Message status" + }, + { + "href": url_for("main.documentation"), + "text": "API documentation" + } + ] + } %} + {% endif %} + {{ govukFooter({ "classes": "js-footer", "navigation": [ @@ -212,28 +256,7 @@ } ] }, - { - "title": "Using Notify", - "columns": 1, - "items": [ - { - "href": url_for("main.get_started"), - "text": "Get started" - }, - { - "href": url_for("main.trial_mode_new"), - "text": "Trial mode" - }, - { - "href": url_for("main.message_status"), - "text": "Message status" - }, - { - "href": url_for("main.documentation"), - "text": "API documentation" - } - ] - } + using_notify_links ], "meta": { "items": meta_items, diff --git a/app/templates/views/signedout.html b/app/templates/views/signedout.html index ea9e7db75..6b3a4a44a 100644 --- a/app/templates/views/signedout.html +++ b/app/templates/views/signedout.html @@ -1,5 +1,7 @@ {% extends "fullwidth_template.html" %} +{% set signed_out = True %} + {% block meta %} {% endblock %}