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

Er 918 submodule content footer component for cdt #756

Merged
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
4 changes: 2 additions & 2 deletions app/helpers/content_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def feedback
Resource.by_name('ctas.feedback') || null_resource('ctas.feedback')
end

def child_development_training
Resource.by_name('ctas.child_development_training') || null_resource('ctas.child_development_training')
def content_footer
peterdavidhamilton marked this conversation as resolved.
Show resolved Hide resolved
Resource.by_name('ctas.content_footer') || null_resource('ctas.content_footer')
peterdavidhamilton marked this conversation as resolved.
Show resolved Hide resolved
end

def other_useful_resources
Expand Down
7 changes: 6 additions & 1 deletion app/views/pages/default.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@
dd.gem-c-metadata__definition
a.govuk-link href="https://www.gov.uk/government/organisations/department-for-education" Department for Education
dt.gem-c-metadata__term Published:
dd.gem-c-metadata__definition #{page.created_at.to_s(:long)}
dd.gem-c-metadata__definition = page.created_at.to_s(:long)
dt.gem-c-metadata__term Updated:
dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{"event_name":"navigation","type":"content history","section":"Top","action":"opened"}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)}

- if page.content_list.present?
= render 'shared/print'

.govuk-grid-column-full
hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible

= render 'shared/ctas'

= render 'shared/content_footer'
peterdavidhamilton marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions app/views/pages/side_nav.slim
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@
- if page.content_list.present?
= render 'shared/print'

.govuk-grid-column-full
hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible

= render 'shared/ctas'

= render 'shared/content_footer'
13 changes: 13 additions & 0 deletions app/views/shared/_content_footer.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
section class='govuk-!-margin-top-7 govuk-!-margin-bottom-7'
.govuk-grid-row
.govuk-grid-column-full
.cta-banner
.cta-banner-text
span.govuk-caption-m Other early years resources from the Department for Education
h2.govuk-heading-l
= content_footer.title
peterdavidhamilton marked this conversation as resolved.
Show resolved Hide resolved
= m(content_footer.body)
p
= govuk_link_to content_footer.link_to_text, content_footer.link_to, class: 'govuk-!-font-weight-bold'
.cta-banner-img
= image_tag content_footer.image.url, class: 'full-width-image', alt: content_footer.image.description, title: content_footer.image.title