govuk_publishing_components 28.8.1 → 28.9.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/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +102 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +4 -0
- data/app/views/govuk_publishing_components/components/_cards.html.erb +62 -0
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +4 -0
- data/app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb +27 -0
- data/app/views/govuk_publishing_components/components/docs/cards.yml +139 -0
- data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +18 -0
- data/config/locales/ar.yml +4 -0
- data/config/locales/az.yml +4 -0
- data/config/locales/be.yml +4 -0
- data/config/locales/bg.yml +4 -0
- data/config/locales/bn.yml +4 -0
- data/config/locales/cs.yml +4 -0
- data/config/locales/cy.yml +4 -0
- data/config/locales/da.yml +4 -0
- data/config/locales/de.yml +4 -0
- data/config/locales/dr.yml +4 -0
- data/config/locales/el.yml +4 -0
- data/config/locales/en.yml +4 -0
- data/config/locales/es-419.yml +4 -0
- data/config/locales/es.yml +4 -0
- data/config/locales/et.yml +4 -0
- data/config/locales/fa.yml +4 -0
- data/config/locales/fi.yml +4 -0
- data/config/locales/fr.yml +4 -0
- data/config/locales/gd.yml +4 -0
- data/config/locales/gu.yml +4 -0
- data/config/locales/he.yml +4 -0
- data/config/locales/hi.yml +4 -0
- data/config/locales/hr.yml +4 -0
- data/config/locales/hu.yml +4 -0
- data/config/locales/hy.yml +4 -0
- data/config/locales/id.yml +4 -0
- data/config/locales/is.yml +4 -0
- data/config/locales/it.yml +4 -0
- data/config/locales/ja.yml +4 -0
- data/config/locales/ka.yml +4 -0
- data/config/locales/kk.yml +4 -0
- data/config/locales/ko.yml +4 -0
- data/config/locales/lt.yml +4 -0
- data/config/locales/lv.yml +4 -0
- data/config/locales/ms.yml +4 -0
- data/config/locales/mt.yml +4 -0
- data/config/locales/nl.yml +4 -0
- data/config/locales/no.yml +4 -0
- data/config/locales/pa-pk.yml +4 -0
- data/config/locales/pa.yml +4 -0
- data/config/locales/pl.yml +4 -0
- data/config/locales/ps.yml +4 -0
- data/config/locales/pt.yml +4 -0
- data/config/locales/ro.yml +4 -0
- data/config/locales/ru.yml +4 -0
- data/config/locales/si.yml +4 -0
- data/config/locales/sk.yml +4 -0
- data/config/locales/sl.yml +4 -0
- data/config/locales/so.yml +4 -0
- data/config/locales/sq.yml +4 -0
- data/config/locales/sr.yml +4 -0
- data/config/locales/sv.yml +4 -0
- data/config/locales/sw.yml +4 -0
- data/config/locales/ta.yml +4 -0
- data/config/locales/th.yml +4 -0
- data/config/locales/tk.yml +4 -0
- data/config/locales/tr.yml +4 -0
- data/config/locales/uk.yml +4 -0
- data/config/locales/ur.yml +4 -0
- data/config/locales/uz.yml +4 -0
- data/config/locales/vi.yml +4 -0
- data/config/locales/zh-hk.yml +4 -0
- data/config/locales/zh-tw.yml +4 -0
- data/config/locales/zh.yml +4 -0
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +16 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +7 -2
data/config/locales/gd.yml
CHANGED
data/config/locales/gu.yml
CHANGED
data/config/locales/he.yml
CHANGED
data/config/locales/hi.yml
CHANGED
data/config/locales/hr.yml
CHANGED
data/config/locales/hu.yml
CHANGED
data/config/locales/hy.yml
CHANGED
data/config/locales/id.yml
CHANGED
data/config/locales/is.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ka.yml
CHANGED
data/config/locales/kk.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/ms.yml
CHANGED
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED
data/config/locales/pa.yml
CHANGED
data/config/locales/pl.yml
CHANGED
data/config/locales/ps.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
@@ -160,6 +160,10 @@ so:
|
|
160
160
|
link_path: "/brexit"
|
161
161
|
link_text: Hubi waxaad u baahantahay inaad qabato
|
162
162
|
title: Ka bixitaanka Ingiriiska
|
163
|
+
ukraine:
|
164
|
+
link_path:
|
165
|
+
link_text:
|
166
|
+
title:
|
163
167
|
world_locations: Goobaha Dunida
|
164
168
|
search_box:
|
165
169
|
input_title: Baadh
|
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
@@ -166,6 +166,22 @@ module GovukPublishingComponents
|
|
166
166
|
step_nav_helper.show_also_part_of_step_nav?
|
167
167
|
end
|
168
168
|
|
169
|
+
def content_tagged_to_ukraine_topical_event?
|
170
|
+
ukraine_topical_event_id = "bfa79635-ffda-4b5d-8266-a9cd3a03649c"
|
171
|
+
topical_events = content_item.dig("links", "topical_events").to_a
|
172
|
+
topical_events.each do |topical_event|
|
173
|
+
if topical_event["content_id"].eql?(ukraine_topical_event_id)
|
174
|
+
return true
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
false
|
179
|
+
end
|
180
|
+
|
181
|
+
def show_ukraine_cta?
|
182
|
+
content_tagged_to_ukraine_topical_event?
|
183
|
+
end
|
184
|
+
|
169
185
|
def breadcrumbs_based_on_ancestors
|
170
186
|
ContentBreadcrumbsBasedOnAncestors.call(content_item)
|
171
187
|
end
|
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.9.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-03-
|
11
|
+
date: 2022-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -515,6 +515,7 @@ files:
|
|
515
515
|
- app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss
|
516
516
|
- app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss
|
517
517
|
- app/assets/stylesheets/govuk_publishing_components/components/_button.scss
|
518
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_cards.scss
|
518
519
|
- app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss
|
519
520
|
- app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss
|
520
521
|
- app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss
|
@@ -612,6 +613,7 @@ files:
|
|
612
613
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss
|
613
614
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss
|
614
615
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss
|
616
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss
|
615
617
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss
|
616
618
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss
|
617
619
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss
|
@@ -653,6 +655,7 @@ files:
|
|
653
655
|
- app/views/govuk_publishing_components/components/_big_number.html.erb
|
654
656
|
- app/views/govuk_publishing_components/components/_breadcrumbs.html.erb
|
655
657
|
- app/views/govuk_publishing_components/components/_button.html.erb
|
658
|
+
- app/views/govuk_publishing_components/components/_cards.html.erb
|
656
659
|
- app/views/govuk_publishing_components/components/_character_count.html.erb
|
657
660
|
- app/views/govuk_publishing_components/components/_checkboxes.html.erb
|
658
661
|
- app/views/govuk_publishing_components/components/_contents_list.html.erb
|
@@ -726,6 +729,7 @@ files:
|
|
726
729
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
|
727
730
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
|
728
731
|
- app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
|
732
|
+
- app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
|
729
733
|
- app/views/govuk_publishing_components/components/docs/accordion.yml
|
730
734
|
- app/views/govuk_publishing_components/components/docs/action_link.yml
|
731
735
|
- app/views/govuk_publishing_components/components/docs/attachment.yml
|
@@ -734,6 +738,7 @@ files:
|
|
734
738
|
- app/views/govuk_publishing_components/components/docs/big_number.yml
|
735
739
|
- app/views/govuk_publishing_components/components/docs/breadcrumbs.yml
|
736
740
|
- app/views/govuk_publishing_components/components/docs/button.yml
|
741
|
+
- app/views/govuk_publishing_components/components/docs/cards.yml
|
737
742
|
- app/views/govuk_publishing_components/components/docs/character_count.yml
|
738
743
|
- app/views/govuk_publishing_components/components/docs/checkboxes.yml
|
739
744
|
- app/views/govuk_publishing_components/components/docs/contents_list.yml
|