govuk_publishing_components 28.3.0 → 28.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -5
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +0 -4
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -47
- data/config/locales/en.yml +0 -4
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -38
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -3
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d54dbd05dbbd81f32e589a912b1d606692599533e68b0ae4e0ff9dd44fbe45
|
4
|
+
data.tar.gz: e8fbb61474b105726f43d076accad977d0d43647e6877dc4f5f26968ae89de98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d5e091ae34ba4f083e9f051896e9e1a2bcbd17d2afd0969bdca2bf2505f40441f74d81496fd63881e0f61002d7884dc32f0ef4e01b74b0e981287d67975b2d
|
7
|
+
data.tar.gz: b2eec023c7640b917b5331d5166083fdf7a5189fd010c4d98199668857a78e9158bdde0f700c6a6e2a29e3556e17fefa635ef9fc684e4eabada7951286577697
|
@@ -1,5 +1,4 @@
|
|
1
1
|
$transition-campaign-red: #ff003b;
|
2
|
-
$covid-colour: $govuk-link-colour;
|
3
2
|
|
4
3
|
.gem-c-contextual-sidebar__related-links {
|
5
4
|
border-top: 2px solid $govuk-brand-colour;
|
@@ -30,7 +29,3 @@ $covid-colour: $govuk-link-colour;
|
|
30
29
|
.gem-c-contextual-sidebar__cta--brexit {
|
31
30
|
border-top: 2px solid $transition-campaign-red;
|
32
31
|
}
|
33
|
-
|
34
|
-
.gem-c-contextual-sidebar__cta--covid {
|
35
|
-
border-top: 2px solid $covid-colour;
|
36
|
-
}
|
@@ -27,8 +27,4 @@
|
|
27
27
|
<% if navigation.show_brexit_cta? %>
|
28
28
|
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
|
29
29
|
<% end %>
|
30
|
-
|
31
|
-
<% if navigation.show_covid_booster_cta? %>
|
32
|
-
<%= render 'govuk_publishing_components/components/contextual_sidebar/covid_cta', content_item: content_item %>
|
33
|
-
<% end %>
|
34
30
|
</div>
|
@@ -11,8 +11,6 @@ body: |
|
|
11
11
|
|
12
12
|
It must always be used [with the contextual breadcrumbs component][contextual_breadcrumbs].
|
13
13
|
|
14
|
-
The COVID CTA will displayed on all pages except for a few exemptions documented below.
|
15
|
-
|
16
14
|
[preview]: /contextual-navigation
|
17
15
|
[step-by-step]: /component-guide/step_by_step_nav
|
18
16
|
[related_navigation]: /component-guide/related_navigation
|
@@ -114,48 +112,3 @@ examples:
|
|
114
112
|
- content_id: "2f8b848d-23c8-4f42-a41a-df1f81c64d0f"
|
115
113
|
title: "Exporting"
|
116
114
|
phase: "live"
|
117
|
-
with_covid_cta_taxon_exception:
|
118
|
-
description: The COVID Booster call to action element is not displayed on content tagged to taxons in `covid_booster_cta_taxon_exception_list`.
|
119
|
-
data:
|
120
|
-
content_item:
|
121
|
-
title: "A content item"
|
122
|
-
links:
|
123
|
-
taxons:
|
124
|
-
- content_id: ac7b8472-5d09-4679-9551-87847b0ac827
|
125
|
-
title: "Not Covid"
|
126
|
-
phase: "live"
|
127
|
-
ordered_related_items:
|
128
|
-
- title: Find an apprenticeship
|
129
|
-
base_path: /apply-apprenticeship
|
130
|
-
- title: Training and study at work
|
131
|
-
base_path: /training-study-work-your-rights
|
132
|
-
- title: Careers helpline for teenagers
|
133
|
-
base_path: /careers-helpline-for-teenagers
|
134
|
-
document_collections:
|
135
|
-
- title: Recruit an apprentice (formerly apprenticeship vacancies)
|
136
|
-
base_path: /government/collections/apprenticeship-vacancies
|
137
|
-
document_type: document_collection
|
138
|
-
- title: The future of jobs and skills
|
139
|
-
base_path: /government/collections/the-future-of-jobs-and-skills
|
140
|
-
document_type: document_collection
|
141
|
-
with_covid_cta_document_type_exception:
|
142
|
-
description: Illustrates an exception to showing the custom COVID Booster call to action element as defined in `covid_booster_cta_document_type_exceptions`.
|
143
|
-
data:
|
144
|
-
content_item:
|
145
|
-
title: "A content item"
|
146
|
-
document_type: smart_answer
|
147
|
-
links:
|
148
|
-
ordered_related_items:
|
149
|
-
- title: Find an apprenticeship
|
150
|
-
base_path: /apply-apprenticeship
|
151
|
-
- title: Training and study at work
|
152
|
-
base_path: /training-study-work-your-rights
|
153
|
-
- title: Careers helpline for teenagers
|
154
|
-
base_path: /careers-helpline-for-teenagers
|
155
|
-
document_collections:
|
156
|
-
- title: Recruit an apprentice (formerly apprenticeship vacancies)
|
157
|
-
base_path: /government/collections/apprenticeship-vacancies
|
158
|
-
document_type: document_collection
|
159
|
-
- title: The future of jobs and skills
|
160
|
-
base_path: /government/collections/the-future-of-jobs-and-skills
|
161
|
-
document_type: document_collection
|
data/config/locales/en.yml
CHANGED
@@ -234,10 +234,6 @@ en:
|
|
234
234
|
link_path: "/brexit"
|
235
235
|
link_text: Check what you need to do
|
236
236
|
title: Brexit
|
237
|
-
covid_booster:
|
238
|
-
link_path: "https://www.nhs.uk/conditions/coronavirus-covid-19/coronavirus-vaccination/"
|
239
|
-
link_text: Book your coronavirus vaccination and booster dose on the NHS website
|
240
|
-
title: COVID-19 vaccinations
|
241
237
|
world_locations: World locations
|
242
238
|
search_box:
|
243
239
|
input_title: Search
|
@@ -153,44 +153,6 @@ module GovukPublishingComponents
|
|
153
153
|
brexit_cta_taxon_allow_list?
|
154
154
|
end
|
155
155
|
|
156
|
-
def show_covid_booster_cta?
|
157
|
-
!covid_booster_cta_document_type_exempt? &&
|
158
|
-
!covid_booster_cta_taxon_exception_list?
|
159
|
-
end
|
160
|
-
|
161
|
-
def covid_booster_cta_document_type_exempt?
|
162
|
-
covid_booster_cta_document_type_exceptions.include?(content_item["document_type"])
|
163
|
-
end
|
164
|
-
|
165
|
-
def covid_booster_cta_document_type_exceptions
|
166
|
-
%w[
|
167
|
-
simple_smart_answer
|
168
|
-
smart_answer
|
169
|
-
step_by_step_nav
|
170
|
-
]
|
171
|
-
end
|
172
|
-
|
173
|
-
def covid_booster_cta_taxon_exception_list?
|
174
|
-
taxons = content_item.dig("links", "taxons").to_a
|
175
|
-
taxons.each do |taxon|
|
176
|
-
if covid_booster_cta_taxon_exception_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, covid_booster_cta_taxon_exception_list)
|
177
|
-
return true
|
178
|
-
end
|
179
|
-
end
|
180
|
-
false
|
181
|
-
end
|
182
|
-
|
183
|
-
def covid_booster_cta_taxon_exception_list
|
184
|
-
# Welfare > Death and benefits
|
185
|
-
# Life circumstances > Death and bereavement
|
186
|
-
# Life circumstances > Death registration disclosure
|
187
|
-
%w[
|
188
|
-
ac7b8472-5d09-4679-9551-87847b0ac827
|
189
|
-
0fffa994-b76d-4539-8bf9-2a6c6751580d
|
190
|
-
de978199-11e8-49b9-965e-4fa6a7ae79a8
|
191
|
-
]
|
192
|
-
end
|
193
|
-
|
194
156
|
def content_tagged_to_current_step_by_step?
|
195
157
|
# TODO: remove indirection here
|
196
158
|
step_nav_helper.show_header?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 28.
|
4
|
+
version: 28.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -760,7 +760,6 @@ files:
|
|
760
760
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
|
761
761
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
|
762
762
|
- app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
|
763
|
-
- app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb
|
764
763
|
- app/views/govuk_publishing_components/components/docs/accordion.yml
|
765
764
|
- app/views/govuk_publishing_components/components/docs/action_link.yml
|
766
765
|
- app/views/govuk_publishing_components/components/docs/attachment.yml
|
data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
<% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
|
2
|
-
<%
|
3
|
-
title = t("components.related_navigation.covid_booster.title")
|
4
|
-
link_text = t("components.related_navigation.covid_booster.link_text")
|
5
|
-
link_path = t("components.related_navigation.covid_booster.link_path")
|
6
|
-
lang = shared_helper.t_locale("components.related_navigation.covid_booster.title")
|
7
|
-
%>
|
8
|
-
|
9
|
-
<% data_attributes = {
|
10
|
-
"module": "gem-track-click",
|
11
|
-
"track-category": "relatedLinkClicked",
|
12
|
-
"track-action": "1.0 Coronavirus",
|
13
|
-
"track-label": link_path,
|
14
|
-
"track-dimension": link_text,
|
15
|
-
"track-dimension-index": "29",
|
16
|
-
} %>
|
17
|
-
|
18
|
-
<%= tag.div class: "gem-c-contextual-sidebar__cta gem-c-contextual-sidebar__cta--covid" do %>
|
19
|
-
<%= tag.h2 title, class: "gem-c-contextual-sidebar__heading govuk-heading-s" %>
|
20
|
-
<%= tag.p class: "gem-c-contextual-sidebar__text govuk-body" do %>
|
21
|
-
<%= link_to link_text,
|
22
|
-
link_path,
|
23
|
-
class: "govuk-link",
|
24
|
-
data: data_attributes,
|
25
|
-
lang: lang %>
|
26
|
-
<% end %>
|
27
|
-
<% end %>
|