diff --git a/src/Dfe.ContentSupport.Web/Models/Mapped/CsPage.cs b/src/Dfe.ContentSupport.Web/Models/Mapped/CsPage.cs index e7526e8..24863d3 100644 --- a/src/Dfe.ContentSupport.Web/Models/Mapped/CsPage.cs +++ b/src/Dfe.ContentSupport.Web/Models/Mapped/CsPage.cs @@ -15,6 +15,7 @@ public class CsPage public List Content { get; set; } = null!; public DateTime? CreatedAt { get; init; } public DateTime? UpdatedAt { get; init; } + public bool HasFeedbackBanner { get; set; } public List? MenuItems { get; set; } } \ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/Services/ModelMapper.cs b/src/Dfe.ContentSupport.Web/Services/ModelMapper.cs index 7c45aa6..d976b76 100644 --- a/src/Dfe.ContentSupport.Web/Services/ModelMapper.cs +++ b/src/Dfe.ContentSupport.Web/Services/ModelMapper.cs @@ -25,6 +25,7 @@ public CsPage MapToCsPage(ContentSupportPage incoming) IsSitemap = incoming.IsSitemap, HasCitation = incoming.HasCitation, HasBackToTop = incoming.HasBackToTop, + HasFeedbackBanner = incoming.HasFeedbackBanner, HasPrint = incoming.HasPrint, Content = MapEntriesToContent(incoming.Content), ShowVerticalNavigation = incoming.ShowVerticalNavigation, diff --git a/src/Dfe.ContentSupport.Web/ViewModels/ContentSupportPage.cs b/src/Dfe.ContentSupport.Web/ViewModels/ContentSupportPage.cs index 58e24ab..7668062 100644 --- a/src/Dfe.ContentSupport.Web/ViewModels/ContentSupportPage.cs +++ b/src/Dfe.ContentSupport.Web/ViewModels/ContentSupportPage.cs @@ -7,13 +7,17 @@ namespace Dfe.ContentSupport.Web.ViewModels; public class ContentSupportPage : ContentBase { public string Slug { get; init; } = null!; + public List BeforeTitleContent { get; init; } = []; + public Heading Heading { get; init; } = null!; public List Content { get; init; } = []; + public bool DisplayBackButton { get; init; } public bool IsSitemap { get; init; } public bool HasCitation { get; init; } public bool HasBackToTop { get; init; } + public bool HasFeedbackBanner { get; init; } public bool HasPrint { get; init; } public bool ShowVerticalNavigation { get; init; } diff --git a/src/Dfe.ContentSupport.Web/Views/Content/CsIndex.cshtml b/src/Dfe.ContentSupport.Web/Views/Content/CsIndex.cshtml index a9e0b6d..8ae4e3f 100644 --- a/src/Dfe.ContentSupport.Web/Views/Content/CsIndex.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Content/CsIndex.cshtml @@ -47,5 +47,10 @@ { } + + @if (Model.HasFeedbackBanner) + { + + } \ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/Error.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/Error.cshtml index e44e743..5c54262 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/Error.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/Error.cshtml @@ -10,7 +10,7 @@ {

Request ID: @Model.RequestId -

+

}

Development Mode

diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml index d4a3147..fa842bf 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml @@ -7,7 +7,7 @@ ViewData["Title"] = Model.Heading.Title; ViewData["containerClasses"] = "dfe-width-container"; var consentCookie = Context.Request.Cookies[".AspNet.Consent"]; - var track = false;// consentCookie == "true"; + var track = consentCookie == "true"; } @section Head { @@ -32,9 +32,7 @@
- @* - *@
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_Feedback.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_Feedback.cshtml new file mode 100644 index 0000000..09a9d3f --- /dev/null +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_Feedback.cshtml @@ -0,0 +1,36 @@ +@{ + var consentCookie = Context.Request.Cookies[".AspNet.Consent"]; + var track = consentCookie == "true"; +} + +@if (track) +{ +
+
+
+
+
+

Is this page + useful?

+
+ + +
+
+
+ +
+
+
+ + +} \ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/wwwroot/css/cands-site.css b/src/Dfe.ContentSupport.Web/wwwroot/css/cands-site.css index 9fa4060..1ea4f0b 100644 --- a/src/Dfe.ContentSupport.Web/wwwroot/css/cands-site.css +++ b/src/Dfe.ContentSupport.Web/wwwroot/css/cands-site.css @@ -84,6 +84,43 @@ video { background-color: #ebf2f6; } +.dfe-feedback-banner { + background-color: #f3f2f1; + border: 1px solid #b1b4b6; + margin-bottom: 30px; + } + + .dfe-feedback-banner--content { + padding: 20px 15px; + display: block; + line-height: 1.333; + } + + .dfe-feedback-banner--content-questions { + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + } + + .dfe-feedback-banner--content-question { + display: flex; + align-items: center; + } + + .dfe-feedback-banner + .govuk-button, + .dfe-feedback-banner + .govuk-button-group { + margin-bottom: 0; + } + + .dfe-feedback-banner--content-question + .dfe-feedback-banner--content-question-text { + margin-bottom: 0; + margin-right: 20px; + } + .guidance-container { border: 1px solid #b1b4b6; }