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

Commit

Permalink
Display notification banner if value is set (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl authored May 28, 2024
1 parent 9bbce81 commit c195047
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dfe.PrepareTransfers.Web/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject IConfiguration _configuration

@{
var notificationBannerMessage = _configuration["NotificationBannerMessage"] ?? string.Empty;
}

<!DOCTYPE html>
<html lang="en" class="govuk-template ">
<head>
Expand Down Expand Up @@ -77,6 +81,24 @@

<partial name="_CookieBanner" />

@if (!string.IsNullOrWhiteSpace(@notificationBannerMessage))
{
<div class="govuk-extra-width-container">
<section class="govuk-notification-banner govuk-!-margin-bottom-0" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__header">
<h2 class="govuk-notification-banner__title" id="govuk-notification-banner-title">
Important
</h2>
</div>
<div class="govuk-notification-banner__content">
<p>
@notificationBannerMessage
</p>
</div>
</section>
</div>
}

<header class="dfe-header" role="banner" data-module="dfe-header">
<div class="dfe-width-container dfe-header__container">
<div class="dfe-header__logo">
Expand Down
1 change: 1 addition & 0 deletions Dfe.PrepareTransfers.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
],
"Scripts": [ "https://www.googletagmanager.com" ]
},
"NotificationBannerMessage": "",
"MaintenanceMode": false
}

0 comments on commit c195047

Please sign in to comment.