-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Address formatting bugs in ticket and add back to top link * Update padding for contents list * Update width for bullet points at end of page * Update logo to not show in footer * Update cookie setting page * Fix rubocop error * Update to address PR comments and temporary update for error page and citation * Update error logic to use Contentful * Use released at value for citation published at logic and add specs * Fix rubocop errors * Delete system spec and update side nav citation component logic * Update to fix bullet point width * Update based on PR comments * Update error files
- Loading branch information
Showing
27 changed files
with
217 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,4 +234,4 @@ label.menu-icon svg { | |
.content-with-side-menu { | ||
margin-top: 0px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,44 @@ | ||
class SettingsController < ApplicationController | ||
def create | ||
set_cookie_pref | ||
redirect_to params[:return_url] | ||
end | ||
|
||
private | ||
if settings_params[:settings_updated].present? | ||
flash[:notice] = t(:preferences_saved_html, scope: 'settings') | ||
end | ||
|
||
def track_analytics | ||
params.fetch(:track_analytics, 'No') | ||
redirect_to request_path | ||
end | ||
|
||
private | ||
|
||
def set_cookie_pref | ||
cookies[:track_analytics] = { value: track_analytics, expires: 6.months.from_now } | ||
cookies[:track_analytics] = { | ||
value: settings_params[:track_analytics], | ||
expires: 6.months.from_now, | ||
} | ||
|
||
if params.fetch(:notify_if_successful, false) | ||
flash[:notice] = t(:preferences_saved_html, return_url: helpers.root_path, scope: :settings) | ||
end | ||
end | ||
|
||
def request_path | ||
params[:request_path] || params[:return_url] | ||
end | ||
|
||
def settings_params | ||
params.permit(:request_path, :track_analytics, :settings_updated) | ||
end | ||
|
||
def track_analytics | ||
params.fetch(:track_analytics, 'No') | ||
end | ||
|
||
def template | ||
page_params[:id].underscore | ||
end | ||
|
||
def page_params | ||
params.permit(:id) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
.govuk-grid-row | ||
.govuk-grid-column-two-thirds | ||
h1.govuk-heading-xl Sorry, there is a problem with the website | ||
h1.govuk-heading-xl | ||
= internal_server_error.title | ||
|
||
p.govuk-body Please try again later. | ||
|
||
p.govuk-body Please contact the Help for early years team on: | ||
|
||
p.govuk-body | ||
= govuk_link_to '[email protected]', 'mailto:[email protected]' | ||
= m(internal_server_error.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
.govuk-grid-row | ||
.govuk-grid-column-two-thirds | ||
h1.govuk-heading-xl Page not found | ||
h1.govuk-heading-xl | ||
= not_found.title | ||
|
||
p.govuk-body | ||
| Use this link to go back to the homepage | ||
= govuk_link_to 'Help for early years providers', root_path | ||
|
||
p.govuk-body | ||
| If the web address is correct or you selected a link or button, contact | ||
= govuk_link_to '[email protected]', 'mailto:[email protected]' | ||
| to report a fault about the service. | ||
= m(not_found.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,7 @@ | |
.govuk-grid-column-two-thirds | ||
h1.govuk-heading-l Help for early years providers | ||
|
||
h2.govuk-heading-m Sorry, the site is unavailable | ||
|
||
p.govuk-body You will be able to use the website later. | ||
|
||
p.govuk-body Please contact the Help for early years team on: | ||
|
||
p.govuk-body | ||
a.govuk-link.email href='mailto:[email protected]' target='_blank' rel='noopener noreferrer' [email protected] | ||
h2.govuk-heading-m | ||
= service_unavailable.title | ||
|
||
= m(service_unavailable.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
.govuk-grid-row | ||
.govuk-grid-column-two-thirds | ||
h1.govuk-heading-xl The change you wanted was rejected | ||
|
||
p.govuk-body Maybe you tried to change something you didn't have access to. | ||
|
||
p.govuk-body If you are the application owner check the logs for more information. | ||
h1.govuk-heading-xl | ||
= unprocessable_entity.title | ||
|
||
= m(unprocessable_entity.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
aside.govuk-width-container title='Beta Banner' | ||
= govuk_phase_banner(tag: { text: 'Beta' }, classes: 'noprint') do | ||
= t 'phase_banner_html', feedback_link: govuk_link_to('feedback', Rails.configuration.feedback_url, target: :_blank, rel: 'noopener noreferrer') | ||
= govuk_phase_banner(tag: { text: 'Beta' }, classes: 'noprint') do | ||
= t 'phase_banner_html', feedback_link: govuk_link_to('feedback', Rails.configuration.feedback_url, target: :_blank, rel: 'noopener noreferrer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- if flash.any? | ||
#flash.govuk-grid-row | ||
.govuk-grid-column-full | ||
- flash.each do |variant, message| | ||
= govuk_notification_banner title_text: t("banners.#{variant}"), text: m(message), success: %w[notice].include?(variant), classes: "govuk-notification-banner--#{variant}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- page.pages.each_slice(3).with_index do |row, index| | ||
.govuk-grid-row class=('govuk-!-margin-bottom-6' unless index == (page.pages.count / 3.0 - 1).ceil) | ||
= render partial: 'pages/card', collection: row, as: :card |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.govuk-grid-row class='govuk-!-margin-bottom-7' | ||
.govuk-grid-column-two-thirds-from-desktop | ||
= form_with url: settings_path, method: :post, local: true do |f| | ||
= f.hidden_field :request_path, value: request.path | ||
= f.hidden_field :settings_updated, value: 'Yes' | ||
= f.govuk_radio_buttons_fieldset(:checked, legend: { size: 'm', text: t('settings.cookie_policy_legend') }, inline: true ) do | ||
= f.govuk_radio_button :track_analytics, 'Yes', label: { text: 'Yes' }, checked: track_analytics? | ||
= f.govuk_radio_button :track_analytics, 'No', label: { text: 'No' }, checked: !track_analytics? | ||
|
||
= f.govuk_submit 'Save cookie settings' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
div.app-back-to-top class='govuk-!-margin-bottom-7' data-module='app-back-to-top' | ||
= govuk_back_to_top_link('#top') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.hf-citation | ||
.gem-c-metadata data-module="gem-toggle metadata" data-gem-toggle-module-started="true" data-metadata-module-started="true" | ||
dl.gem-c-metadata__list data-module="gem-track-click" data-gem-track-click-module-started="true" | ||
dt.gem-c-metadata__term From: | ||
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.released_at || page.created_at).to_fs(: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_fs(:long)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.