Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Commit

Permalink
Get Help/Log Out (#42)
Browse files Browse the repository at this point in the history
* update logout/get help banner and add help page

* add hardcoded back link

* link backlink to download page
  • Loading branch information
bobbi-hbrown committed Jul 24, 2023
1 parent 8d10307 commit a5b5efa
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 75 deletions.
5 changes: 5 additions & 0 deletions app/main/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ def privacy():
return render_template("privacy.html")


@bp.route("/help", methods=["GET"])
def help():
return render_template("help.html")


@bp.route("/data-glossary", methods=["GET"])
def data_glossary():
return render_template("data-glossary.html")
Expand Down
16 changes: 15 additions & 1 deletion app/static/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
.govuk-button {
background-color: #1d70b8;
}

.govuk-button:hover {
background-color: #12066d;
}
.govuk-footer__meta {
display: flex;
margin-right: -15px;
Expand All @@ -17,3 +19,15 @@
-ms-flex-pack: center;
justify-content: center;
}

.global-actions {
display: flex;
justify-content: space-between;
}

@media (min-width: 40.0625em) {
.govuk-main-wrapper {
padding-top: 40px;
padding-bottom: 40px;
}
}
20 changes: 13 additions & 7 deletions app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends 'govuk_frontend_jinja/template.html' %}

{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}
{%- from 'govuk_frontend_jinja/components/error-summary/macro.html' import govukErrorSummary-%}
{%- from 'govuk_frontend_jinja/components/notification-banner/macro.html' import govukNotificationBanner -%}
{%- from 'govuk_frontend_jinja/components/phase-banner/macro.html' import govukPhaseBanner -%}
Expand All @@ -20,14 +21,7 @@
{% block header %}
{{ govukHeader({
'homepageUrl': url_for('main.download'),
'serviceName': 'Find monitoring data',
'serviceUrl': url_for('main.download'),
'navigation': [
{
'href': config['AUTHENTICATOR_HOST'] + "/sso/logout",
'text': 'Log out',
},
]
}) }}
{% endblock %}

Expand All @@ -38,6 +32,18 @@
},
'html': 'This is a new service – your <a class="govuk-link" href="mailto:' + config['CONTACT_EMAIL'] +'?subject=Feedback">feedback</a> will help us to improve it.'
}) }}

<div class="govuk-width-container global-actions">
{{ govukBackLink({
'text': 'Back',
'href': url_for('main.download')
}) }}

<div class="govuk-!-margin-top-2">
<a href="{{ url_for('main.help') }}" class="govuk-body govuk-link govuk-link--no-underline govuk-link--no-visited-state">Get help</a>
<a href="{{ config['AUTHENTICATOR_HOST'] + '/sso/logout' }}"class="govuk-body govuk-link govuk-link--no-underline govuk-link--no-visited-state govuk-!-margin-left-4">Log out</a>
</div>
</div>
{% endblock %}

{% block content %}
Expand Down
5 changes: 1 addition & 4 deletions app/templates/main/data-glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@


{% block beforeContent %}
{{ govukBackLink({
'text': "Back",
'href': url_for('main.download')
}) }}
{{ super() }}
{% endblock %}

{% block content %}
Expand Down
126 changes: 63 additions & 63 deletions app/templates/main/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,81 +10,81 @@
{%- from "select.html" import selectItems -%}

{% block beforeContent %}
{{ super() }}
{{ super() }}
{% endblock %}

{% block content %}

<main id="main-content" role="main">
<section class="govuk-main-wrapper">

<div>
<h1 class="govuk-heading-l">Download monitoring and evaluation data</h1>

<p class="govuk-body">Use the following filters to select the projects you need.</p>

<p class="govuk-body">The filters you select will be applied at project level. You will be able to download this as a file to your desktop.</p>

<p class="govuk-inset-text">
If you don't select any filters you will get all the data from all of the projects that are in the system.
</p>

</div>

<form method="post" action="{{ url_for('main.download') }}">
{{ form.csrf_token }}

{{ govukAccordion({
"id": "download",
"headingLevel": 2,
"showAllSectionsText": "",
"items": [
{
"heading": {
"text": "Filter by fund"
},
"content": {
"html": checkboxItems(funds["name"], funds["items"])
},
},
{
"heading": {
"text": "Filter by area"
<div class="govuk-width-container">
<div class="download-data-container">
<h1 class="govuk-heading-xl">Download monitoring and evaluation data</h1>

<p class="govuk-body">Use the following filters to select the projects you need.</p>

<p class="govuk-body">The filters you select will be applied at project level. You will be able to download this as a file to your desktop.</p>

<p class="govuk-inset-text">
If you don't select any filters you will get all the data from all of the projects that are in the system.
</p>

</div>

<form method="post" action="{{ url_for('main.download') }}">
{{ form.csrf_token }}

{{ govukAccordion({
"id": "download",
"headingLevel": 2,
"showAllSectionsText": "",
"items": [
{
"heading": {
"text": "Filter by fund"
},
"content": {
"html": checkboxItems(funds["name"], funds["items"])
},
},
"content": {
"html": checkboxItems(areas["name"], areas["items"])
}
},
{
"heading": {
"text": "Filter by funded organisation"
{
"heading": {
"text": "Filter by area"
},
"content": {
"html": checkboxItems(areas["name"], areas["items"])
}
},
"content": {
"html": checkboxItems(orgs["name"], orgs["items"])
}
},
{
"heading": {
"text": "Filter by outcomes"
{
"heading": {
"text": "Filter by funded organisation"
},
"content": {
"html": checkboxItems(orgs["name"], orgs["items"])
}
},
"content": {
"html": checkboxItems(outcomes["name"], outcomes["items"])
}
},
{
"heading": {
"text": "Filter by returns period"
{
"heading": {
"text": "Filter by outcomes"
},
"content": {
"html": checkboxItems(outcomes["name"], outcomes["items"])
}
},
"content": {
"html": selectItems(returnsParams)
{
"heading": {
"text": "Filter by returns period"
},
"content": {
"html": selectItems(returnsParams)
}
}
}
]
})
}}
]
})
}}

{{ form.file_format}}
{{ form.download }}
{{ form.file_format}}
{{ form.download }}

</form>

Expand Down
34 changes: 34 additions & 0 deletions app/templates/main/help.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% extends "base.html" %}
{%- from 'govuk_frontend_jinja/components/footer/macro.html' import govukFooter -%}
{%- from 'govuk_frontend_jinja/components/phase-banner/macro.html' import govukPhaseBanner -%}
{%- from 'govuk_frontend_jinja/components/back-link/macro.html' import govukBackLink -%}


{% block head %}
<meta name="description" content="{{config['SERVICE_NAME']}}">
<meta name="keywords" content="GOV.UK, govuk, gov, government, uk, frontend, ui, user interface, jinja, python, flask, port, template, templating, macro, component, design system, html, forms, wtf, wtforms, widget, widgets, demo, example">
<meta name="author" content="{{config['DEPARTMENT_NAME']}}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='govuk-frontend-4.6.0.min.css') }}" />
{% assets "css" %}<link href="{{ ASSET_URL }}" rel="stylesheet">{% endassets %}
{% endblock %}

{% block beforeContent %}
{{ super() }}
{% endblock %}

{% block content %}
<section class="govuk-main-wrapper">
<div class="govuk-width-container">
<h1 class="govuk-heading-xl">Get help</h1>
<p class="govuk-body">If you are experiencing difficulties with this service or have any questions, you can email us.</p>
<h2 class="govuk-heading-l govuk-!-margin-top-4">Email</h2>
<p class="govuk-body"><a class="govuk-link" href="mailto:FSD.Support@levellingup.gov.uk">fsd.support@levellingup.gov.uk</a>.</p>
<p class="govuk-body">Monday to Friday: 9am to 5pm (except public holidays).</p>
</div>
</section>
{% endblock %}


{% block footer %}
{{ govukFooter({}) }}
{% endblock %}

0 comments on commit a5b5efa

Please sign in to comment.