Skip to content

Commit

Permalink
Merge pull request #902 from DFE-Digital/feature/180341
Browse files Browse the repository at this point in the history
Footer updates and feature flag
  • Loading branch information
sukhybhullar-nimble authored Oct 15, 2024
2 parents 3ddd7bb + 7e3cfb2 commit 719d0eb
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ describe("Navigate through footer links", () => {

Logger.log("Get help footer links");
cy.get('h2').should('contain', 'Get help');
cy.contains('a', 'Email Service Support for help with using this system').should('be.visible')
cy.contains('a', 'How to use this system (opens in a new tab)').should('be.visible')
cy.contains('a', 'Get help with a Regions Group system').should('be.visible')

Logger.log("Get feedback footer links");
cy.get('h2').should('contain', 'Give feedback');
cy.contains('a', 'Give feedback (opens in a new tab)').should('be.visible')
cy.contains('a', 'Suggest a change (opens in a new tab)').should('be.visible')
cy.contains('a', 'Give feedback about a Regions Group system (opens in a new tab)').should('be.visible')
cy.contains('a', 'Suggest a change to a Regions Group system (opens in a new tab)').should('be.visible')

Logger.log("Get accessibility and cookies link");
cy.contains('a', 'Accessibility statement').should('be.visible').click()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@inject Microsoft.Extensions.Configuration.IConfiguration _configuration

@{
var supportLink = $"mailto:{_configuration["SupportEmail"]}?subject=Manage%20free%20school%20projects:%20support%20query";
}

<footer class="govuk-footer">
<div class="govuk-width-container">
<div class="govuk-footer__navigation">
<div class="govuk-footer__section govuk-grid-column-two-thirds">
<h2 class="govuk-footer__heading govuk-heading-m">Get help</h2>
<ul class="govuk-footer__list govuk-footer__list--column-1">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@supportLink">
Email Service Support for help with using this system
</a>
<p>We aim to respond within 5 working days, or one working day for more urgent queries.</p>
</li>
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["HowToUseLink"]" target="_blank">
How to use this system (opens in a new tab)
</a>
</li>
</ul>
</div>
<div class="govuk-footer__section govuk-grid-column-one-third">
<h2 class="govuk-footer__heading govuk-heading-m">Give feedback</h2>
<ul class="govuk-footer__list">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["FeedbackLink"]" target="_blank">Give feedback (opens in a new tab)</a>
</li>
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["SuggestionsLink"]" target="_blank">Suggest a change (opens in a new tab)</a>
</li>
</ul>
</div>
</div>
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-visually-hidden">Support links</h2>
<ul class="govuk-footer__inline-list">
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/accessibility-statement">
Accessibility statement
</a>
</li>
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/public/cookies?returnUrl=%2f">
Cookies
</a>
</li>
</ul>
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">
Open Government Licence v3.0
</a>, except where otherwise stated
</span>

</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">
© Crown copyright
</a>
</div>
</div>
</div>
</footer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@inject Microsoft.Extensions.Configuration.IConfiguration _configuration

<footer class="govuk-footer">
<div class="govuk-width-container">
<div class="govuk-footer__navigation">
<div class="govuk-footer__section govuk-grid-column-one-half">
<h2 class="govuk-footer__heading govuk-heading-m">Get help</h2>
<ul class="govuk-footer__list govuk-footer__list--column-1">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["SupportLink"]" target="_blank">Get help with a Regions Group system (opens in a new tab)</a>
</li>
</ul>
</div>
<div class="govuk-footer__section govuk-grid-column-one-half">
<h2 class="govuk-footer__heading govuk-heading-m">Give feedback</h2>
<ul class="govuk-footer__list">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["FeedbackLink"]" target="_blank">Give feedback about a Regions Group system (opens in a new tab)</a>
</li>
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["SuggestionsLink"]" target="_blank">Suggest a change to a Regions Group system (opens in a new tab)</a>
</li>
</ul>
</div>
</div>
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-visually-hidden">Support links</h2>
<ul class="govuk-footer__inline-list">
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/accessibility-statement">
Accessibility statement
</a>
</li>
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/public/cookies?returnUrl=%2f">
Cookies
</a>
</li>
</ul>
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">
Open Government Licence v3.0
</a>, except where otherwise stated
</span>

</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">
© Crown copyright
</a>
</div>
</div>
</div>
</footer>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@inject Microsoft.Extensions.Configuration.IConfiguration _configuration
@inject Dfe.ManageFreeSchoolProjects.Services.IAnalyticsConsentService _analytisConsentService
@inject Microsoft.FeatureManagement.IFeatureManager _featureManager

@{
var showAnalytics = _configuration["GoogleAnalytics:Enable"] == "Yes" && _analytisConsentService.HasConsent();
Expand All @@ -11,7 +12,7 @@

var widePage = ViewData["WidePage"] != null ? "mfsp-wider-page" : string.Empty;

var supportLink = $"mailto:{_configuration["SupportEmail"]}?subject=Manage%20free%20school%20projects:%20support%20query";

}

<!DOCTYPE html>
Expand Down Expand Up @@ -101,71 +102,19 @@
</div>
</main>
</div>
<footer class="govuk-footer">
<div class="govuk-width-container">
<div class="govuk-footer__navigation">
<div class="govuk-footer__section govuk-grid-column-two-thirds">
<h2 class="govuk-footer__heading govuk-heading-m">Get help</h2>
<ul class="govuk-footer__list govuk-footer__list--column-1">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@supportLink">
Email Service Support for help with using this system
</a>
<p>We aim to respond within 5 working days, or one working day for more urgent queries.</p>
</li>
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["HowToUseLink"]" target="_blank">
How to use this system (opens in a new tab)
</a>
</li>
</ul>
</div>
<div class="govuk-footer__section govuk-grid-column-one-third">
<h2 class="govuk-footer__heading govuk-heading-m">Give feedback</h2>
<ul class="govuk-footer__list">
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["FeedbackLink"]" target="_blank">Give feedback (opens in a new tab)</a>
</li>
<li class="govuk-footer__list-item">
<a class="govuk-footer__link" href="@_configuration["SuggestionsLink"]" target="_blank">Suggest a change (opens in a new tab)</a>
</li>
</ul>
</div>
</div>
<div class="govuk-footer__meta">
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
<h2 class="govuk-visually-hidden">Support links</h2>
<ul class="govuk-footer__inline-list">
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/accessibility-statement">
Accessibility statement
</a>
</li>
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" href="/public/cookies?returnUrl=%2f">
Cookies
</a>
</li>
</ul>
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">
Open Government Licence v3.0
</a>, except where otherwise stated
</span>
@{var useLatestFooter = await _featureManager.IsEnabledAsync("UseLatestFooter");

</div>
<div class="govuk-footer__meta-item">
<a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">
© Crown copyright
</a>
</div>
</div>
</div>
</footer>
if (useLatestFooter)
{
<partial name="Footer/_Footer20241017" />
}

else
{
<partial name="Footer/_Footer" />
}
}

<script src="~/dist/accessible-autocomplete.min.js" asp-add-nonce></script>
<script src="~/dist/site.js" asp-add-nonce></script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"HowToUseLink": "howtouselink",
"RequestAccessLink": "requestaccesslink",
"FeatureManagement": {
"AllowCentralRoute": true
"AllowCentralRoute": true,
"UseLatestFooter": true
}
}

0 comments on commit 719d0eb

Please sign in to comment.