Skip to content

Commit

Permalink
Merge pull request #561 from DFE-Digital/next
Browse files Browse the repository at this point in the history
Merge for v3.9.0
  • Loading branch information
mattb-hippo authored Nov 18, 2024
2 parents 8274409 + 771d4d5 commit 5f151d4
Show file tree
Hide file tree
Showing 35 changed files with 340 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backup-contentful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: 'Backup Contentful'
runs-on: ubuntu-latest
env:
ENVID: prod
ENVID: master
SPACE: ${{ secrets.TF_VAR_CPD_SPACE_ID }}
MANAGEMENT_TOKEN: ${{ secrets.CONTENTFUL_MANAGEMENT_TOKEN }}

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/terraform-fmt.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: 'Terraform Format'

on:
pull_request:
branches: [ "main", "next" ]
workflow_dispatch:
inputs:
workspace:
description: 'Terraform Workspace which should map to GitHub Environment'
required: true
default: 'Dev'
type: choice
options:
- Dev
- Test
- Pre-Prod
- Prod
- Load-Test

jobs:
terraform-fmt:
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/terraform-tflint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: 'Terraform TFLint'

on:
pull_request:
branches: [ "main", "next" ]
workflow_dispatch:
inputs:
workspace:
description: 'Terraform Workspace which should map to GitHub Environment'
required: true
default: 'Dev'
type: choice
options:
- Dev
- Test
- Pre-Prod
- Prod
- Load-Test

jobs:
terraform-tflint:
Expand Down
1 change: 1 addition & 0 deletions Childrens-Social-Care-CPD/Contentful/Models/Content.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Content : IContent
public int? EstimatedReadingTime { get; set; }
public List<Content> ParentPages { get; set; }
public string BreadcrumbText { get; set; }
public bool ShowPrintThisPage { get; set; }

[JsonProperty("$metadata")]
public ContentfulMetadata Metadata { get; set; }
Expand Down
5 changes: 5 additions & 0 deletions Childrens-Social-Care-CPD/Views/Shared/_Content.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
continue;
}

if (item is Feedback && Model.ShowPrintThisPage)
{
<partial name="_PrintThisPage" />
}

await Html.RenderContentfulPartialAsync(item);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@
}
else if (preferenceSet)
{
var consentVerb = consentState == AnalyticsConsentState.Accepted ? "accepted" : "rejected";

<div class="govuk-cookie-banner" id="divCookieBannerId" data-nosnippet="" role="region" aria-label="@headingText">
<div class="govuk-cookie-banner__message govuk-width-container" id="divCookieMessageActioned">
<div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters">
<div class="govuk-cookie-banner__content">
<p>Youve rejected essential and analytics cookies. You can
@_contentLinkRenderer.Render(new ContentLink() { Name = "change your cookie settings", Uri = cookiesUrl }))
<p>Youve @consentVerb analytics cookies. You can
@_contentLinkRenderer.Render(new ContentLink() { Name = "change your cookie settings", Uri = cookiesUrl })
at any time.</p>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions Childrens-Social-Care-CPD/Views/Shared/_CreditBlock.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters">
<div class="govuk-grid-column-full">
<div class="credit-block govuk-details">
The resources have been developed by <partial name="_RichText" model="Model.DeveloperOfResource" view-data="ViewData" />
The resources have been developed by
<partial name="_RichText" model="Model.DeveloperOfResource" view-data="ViewData" />
@if (@Model.SecondaryDevelopersOfResource != null)
{
@:in collaboration with
Expand Down
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Views/Shared/_ErrorLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<h2 class="govuk-visually-hidden">Footer links</h2>
<ul class="govuk-footer__inline-list">
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" datatestid="Privacy policy" href="/privacy">
<a class="govuk-footer__link" datatestid="Privacy policy" href="https://www.gov.uk/government/publications/privacy-information-business-contacts-and-stakeholders/privacy-information-business-contacts-and-stakeholders#using-your-data-to-carry-out-research">
Privacy policy
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Views/Shared/_Footer.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<h2 class="govuk-visually-hidden">Footer links</h2>
<ul class="govuk-footer__inline-list">
<li class="govuk-footer__inline-list-item">
<a class="govuk-footer__link" datatestid="Privacy policy" href="/privacy">
<a class="govuk-footer__link" datatestid="Privacy policy" href="https://www.gov.uk/government/publications/privacy-information-business-contacts-and-stakeholders/privacy-information-business-contacts-and-stakeholders#using-your-data-to-carry-out-research">
Privacy policy
</a>
</li>
Expand Down
5 changes: 5 additions & 0 deletions Childrens-Social-Care-CPD/Views/Shared/_PrintThisPage.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="govuk-grid-row">
<button class="govuk-link print-link-button" data-module="print-link" onclick="window.print()">
Print this page
</button>
</div>
6 changes: 3 additions & 3 deletions Childrens-Social-Care-CPD/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Childrens-Social-Care-CPD/styles/scss/overrides/_site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,20 @@
/* feedback component tweaks */
div#page-feedback a {
cursor: pointer;
}

/* print this page button */
.print-link-button {
background: url(/assets/images/icon-print.png) no-repeat 10px 50%;
background-size: 16px 18px;
padding: 10px 10px 10px 36px;
border: 1px solid #b1b4b6;
color: #1d70b8;
cursor: pointer;
margin: 0;
margin-bottom: 40px;
margin-left: 15px;
font-weight: 400;
font-size: 19px;
line-height: 1.1429;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Childrens-Social-Care-CPD/wwwroot/css/application.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Contentful-Schema/migrations/0013-print-page-component.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = async function (migration, { makeRequest }) {

const contentTypeId = "content";

migration
.editContentType(contentTypeId)
.createField("showPrintThisPage")
.name("Show Print this Page")
.type("Boolean")
.localized(false)
.required(false)
.validations([])
.defaultValue({
"en-US": true,
})
.disabled(false)
.omitted(false);

migration
.editContentType(contentTypeId)
.changeFieldControl("showPrintThisPage", "builtin", "boolean", {
helpText:
"Should this page include a Print this Page component? It requires that a Feedback component is included in the page's items.",
trueLabel: "Yes",
falseLabel: "No",
});
};
3 changes: 2 additions & 1 deletion Contentful-Schema/migrations/manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
0009-asset-download-component.cjs
0010-breadcrumbs.cjs
0011-create-agency-standards-page-category.cjs
0012-credit-block-component.cjs
0012-credit-block-component.cjs
0013-print-page-component.cjs
Binary file modified Contentful-Schema/migrations/migrations.tar.gz
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5f151d4

Please sign in to comment.