govuk_publishing_components 28.9.0 → 28.9.1
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 -6
- 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 -27
- data/config/locales/en.yml +2 -2
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -45
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -3
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_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: 6c3bd6215882051b9c863a3b252cdb8163820babf43ddbc6a8fa833c0da5f5b1
|
4
|
+
data.tar.gz: 552d3420a3ccf2264bfd6a9a8304c6d24d8eb2a24306daab0b1b2d3998df7309
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2979878f87bb5ad5dd9daf50a81aa7fe4baeab0569d2b4d686281fd1f87aa3bea056c247784449b12a557fde3e2cf03eea7568445d4522601111a2a1b9528566
|
7
|
+
data.tar.gz: 24ee9afa94eee26d28896e9dc4d4dff843020ad9f1756b449404a35ae71ff2a881c666933e4e10b2a8c0ca32faa14dfddc2880605f672c5c60526e4df03e4588
|
@@ -1,5 +1,3 @@
|
|
1
|
-
$transition-campaign-red: #ff003b;
|
2
|
-
|
3
1
|
.gem-c-contextual-sidebar__related-links {
|
4
2
|
border-top: 2px solid $govuk-brand-colour;
|
5
3
|
}
|
@@ -26,7 +24,3 @@ $transition-campaign-red: #ff003b;
|
|
26
24
|
padding: 0 govuk-spacing(3) govuk-spacing(3);
|
27
25
|
text-decoration: none;
|
28
26
|
}
|
29
|
-
|
30
|
-
.gem-c-contextual-sidebar__cta--brexit {
|
31
|
-
border-top: 2px solid $transition-campaign-red;
|
32
|
-
}
|
@@ -27,8 +27,4 @@
|
|
27
27
|
<% if navigation.show_ukraine_cta? %>
|
28
28
|
<%= render 'govuk_publishing_components/components/contextual_sidebar/ukraine_cta', content_item: content_item %>
|
29
29
|
<% end %>
|
30
|
-
|
31
|
-
<% if navigation.show_brexit_cta? %>
|
32
|
-
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
|
33
|
-
<% end %>
|
34
30
|
</div>
|
@@ -86,33 +86,6 @@ examples:
|
|
86
86
|
- text: The Highway Code
|
87
87
|
href: "/guidance/the-highway-code"
|
88
88
|
optional: false
|
89
|
-
with_brexit_cta:
|
90
|
-
description: For documents tagged with certain taxons defined in `brexit_cta_taxon_allow_list` we show a custom Brexit call to action element.
|
91
|
-
data:
|
92
|
-
content_item:
|
93
|
-
title: "Transport news story"
|
94
|
-
content_id: "3c402d90-fe77-49b9-a8aa-1800d4fc2b3d"
|
95
|
-
locale: "en"
|
96
|
-
links:
|
97
|
-
ordered_related_items:
|
98
|
-
- title: Find an apprenticeship
|
99
|
-
base_path: /apply-apprenticeship
|
100
|
-
- title: Training and study at work
|
101
|
-
base_path: /training-study-work-your-rights
|
102
|
-
- title: Careers helpline for teenagers
|
103
|
-
base_path: /careers-helpline-for-teenagers
|
104
|
-
document_collections:
|
105
|
-
- title: Recruit an apprentice (formerly apprenticeship vacancies)
|
106
|
-
base_path: /government/collections/apprenticeship-vacancies
|
107
|
-
document_type: document_collection
|
108
|
-
- title: The future of jobs and skills
|
109
|
-
base_path: /government/collections/the-future-of-jobs-and-skills
|
110
|
-
document_type: document_collection
|
111
|
-
taxons:
|
112
|
-
- content_id: "2f8b848d-23c8-4f42-a41a-df1f81c64d0f"
|
113
|
-
title: "Exporting"
|
114
|
-
phase: "live"
|
115
|
-
|
116
89
|
with_ukraine_cta:
|
117
90
|
description: For documents tagged to the Ukraine topical event we show a custom 'Ukraine Invasion' call to action element.
|
118
91
|
data:
|
data/config/locales/en.yml
CHANGED
@@ -177,10 +177,10 @@ en:
|
|
177
177
|
navigation_search_heading: Search and popular pages
|
178
178
|
navigation_search_subheading: Search
|
179
179
|
popular_links:
|
180
|
+
- label: 'Invasion of Ukraine'
|
181
|
+
href: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response"
|
180
182
|
- label: 'Coronavirus (COVID-19)'
|
181
183
|
href: "/coronavirus"
|
182
|
-
- label: 'Brexit: check what you need to do'
|
183
|
-
href: "/brexit"
|
184
184
|
- label: Find a job
|
185
185
|
href: "/find-a-job"
|
186
186
|
- label: 'Personal tax account: sign in'
|
@@ -108,51 +108,6 @@ module GovukPublishingComponents
|
|
108
108
|
false
|
109
109
|
end
|
110
110
|
|
111
|
-
def brexit_cta_taxon_allow_list
|
112
|
-
# Overseas businesses: exporting to the UK
|
113
|
-
# Exporting goods and services
|
114
|
-
# Exporting
|
115
|
-
# Manufacturing, wholesaling, importing and exporting medicines
|
116
|
-
# Importing goods and services
|
117
|
-
# Importing
|
118
|
-
# Manufacturing, wholesaling, importing and exporting medicines
|
119
|
-
%w[
|
120
|
-
2f8b848d-23c8-4f42-a41a-df1f81c64d0f
|
121
|
-
8af13fba-d969-4d87-a02e-2e71783d47be
|
122
|
-
efa9782b-a3d0-4ca0-9c92-3b89748175b7
|
123
|
-
f441e630-2bba-4bbd-8c1b-22ae61cc00c2
|
124
|
-
4788b4b8-2642-47ca-bfc2-bd7e8705a1da
|
125
|
-
d74faafc-781d-4087-8e0c-be4216180059
|
126
|
-
f441e630-2bba-4bbd-8c1b-22ae61cc00c2
|
127
|
-
]
|
128
|
-
end
|
129
|
-
|
130
|
-
def brexit_cta_taxon_allow_list?
|
131
|
-
taxons = content_item.dig("links", "taxons").to_a
|
132
|
-
taxons.each do |taxon|
|
133
|
-
if brexit_cta_taxon_allow_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_allow_list)
|
134
|
-
return true
|
135
|
-
end
|
136
|
-
end
|
137
|
-
false
|
138
|
-
end
|
139
|
-
|
140
|
-
def parent_taxon_include?(taxon, taxon_list)
|
141
|
-
if taxon.present?
|
142
|
-
if taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_list.include?(taxon_item["content_id"]) }
|
143
|
-
return true
|
144
|
-
end
|
145
|
-
|
146
|
-
taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| parent_taxon_include?(taxon_item, taxon_list) }
|
147
|
-
else
|
148
|
-
false
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
def show_brexit_cta?
|
153
|
-
brexit_cta_taxon_allow_list?
|
154
|
-
end
|
155
|
-
|
156
111
|
def content_tagged_to_current_step_by_step?
|
157
112
|
# TODO: remove indirection here
|
158
113
|
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.9.
|
4
|
+
version: 28.9.1
|
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-03-
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -728,7 +728,6 @@ files:
|
|
728
728
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
|
729
729
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
|
730
730
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
|
731
|
-
- app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
|
732
731
|
- app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
|
733
732
|
- app/views/govuk_publishing_components/components/docs/accordion.yml
|
734
733
|
- app/views/govuk_publishing_components/components/docs/action_link.yml
|
data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
<% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %>
|
2
|
-
<%
|
3
|
-
title = t("components.related_navigation.transition.title")
|
4
|
-
link_text = t("components.related_navigation.transition.link_text")
|
5
|
-
link_path = t("components.related_navigation.transition.link_path")
|
6
|
-
lang = shared_helper.t_locale("components.related_navigation.transition.title")
|
7
|
-
%>
|
8
|
-
|
9
|
-
<% data_attributes = {
|
10
|
-
"module": "gem-track-click",
|
11
|
-
"track-category": "relatedLinkClicked",
|
12
|
-
"track-action": "1.0 Transition",
|
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--brexit" 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 %>
|