Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added downtime banner to all pages #434

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runner/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,5 @@ module.exports = {

awsBucketName: "paas-s3-broker-prod-lon-443b9fc2-55ff-4c2f-9ac3-d3ebfb18ef5a", // For uploading files to a aws bucket
awsRegion: "eu-west-2", // The aws buckets region
migrationBannerEnabled: true,
};
5 changes: 5 additions & 0 deletions runner/src/server/plugins/engine/views/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% from "error-summary/macro.njk" import govukErrorSummary %}
{% from "partials/components.html" import componentList %}
{% from "partials/migration-banner.html" import migrationBanner %}

{% extends 'layout.html' %}
{% block content %}
Expand All @@ -11,6 +12,10 @@
{{ govukErrorSummary(errors) }}
{% endif %}

{% if migrationBannerEnabled %}
{{migrationBanner()}}
{% endif %}

{% include "partials/heading.html" %}

{% if page.hasNext %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% from "notification-banner/macro.njk" import govukNotificationBanner %}

{% macro migrationBanner() %}
{{ govukNotificationBanner({
'html': '<p class="govuk-body" style="max-width: none;">You will be unable to access your funding applications or start new applications on the 18th December 2023 between 10:00am and 3:00pm. This is due to essential maintenance.</p>'
})}}
{% endmacro %}
1 change: 1 addition & 0 deletions runner/src/server/plugins/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default {
cookiePolicyUrl: config.cookiePolicyUrl,
accessibilityStatementUrl: config.accessibilityStatementUrl,
phaseTag: config.phaseTag,
migrationBannerEnabled: config.migrationBannerEnabled,
navigation: request?.auth.isAuthenticated
? [
{ text: "View all applications", href: config.multifundDashboard },
Expand Down
4 changes: 4 additions & 0 deletions runner/src/server/views/confirmation.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% from "panel/macro.njk" import govukPanel %}
{% extends 'layout.html' %}
{% from "partials/components.html" import componentList %}
{% from "partials/migration-banner.html" import migrationBanner %}

{% block beforeContent %}
{{ govukPhaseBanner({
Expand All @@ -17,6 +18,9 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
{% if migrationBannerEnabled %}
{{migrationBanner()}}
{% endif %}
{% set tmpl = 'Your reference number<br><strong>' + reference + '</strong>' if reference else '' %}
{% if not customText %}
{{ govukPanel({
Expand Down
7 changes: 7 additions & 0 deletions runner/src/server/views/partials/migration-banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% from "notification-banner/macro.njk" import govukNotificationBanner %}

{% macro migrationBanner() %}
{{ govukNotificationBanner({
'html': '<p class="govuk-body" style="max-width: none;">You will be unable to access your funding applications or start new applications on the 18th December 2023 between 10:00am and 3:00pm. This is due to essential maintenance.</p>'
})}}
{% endmacro %}
4 changes: 4 additions & 0 deletions runner/src/server/views/summary.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% from "partials/summary-detail.html" import summaryDetail %}
{% from "partials/migration-banner.html" import migrationBanner %}
{% from "components/checkboxes/macro.njk" import govukCheckboxes %}
{% extends 'layout.html' %}

Expand All @@ -14,6 +15,9 @@
<div class="govuk-main-wrapper">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
{% if migrationBannerEnabled %}
{{migrationBanner()}}
{% endif %}
<h1 class="govuk-heading-l">{{ pageTitle }}</h1>
{% if callback and callback.message %}
<div class="govuk-inset-text">
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=0.1.218
VERSION=0.1.219
Loading