govuk_publishing_components 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -0
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +20 -3
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +23 -0
- data/app/views/govuk_publishing_components/components/docs/taxonomy_navigation.yml +1 -4
- data/config/locales/en.yml +0 -1
- data/lib/govuk_publishing_components/presenters/taxonomy_navigation.rb +0 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8a4912cbff99d020d6e61c3a9e4e8b7a32b21b91f0031fd3784876bbc1b3f8b
|
|
4
|
+
data.tar.gz: 9196ea412a372cf4ad8ec6abb466682bea18736aea6cdcc273c6f881de36f1a1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81f31e5c4026ac11ddce146d66b6afa59e64af064fea257e9aab78e68b6f041696e29729b6290d58dd2358946eb6948787ff7f204be79aac6656744a799de836
|
|
7
|
+
data.tar.gz: 4e79ba08990e88c7c848db1c44fecb0fdcff85f408494538e56b06e7e65039a6bff8a01b1b2f731065b2c8b475e8a3527bd91915de10d6ed05381d6d6010aafb
|
|
@@ -10,19 +10,36 @@
|
|
|
10
10
|
<ol class="gem-c-document-list<%= margin_bottom_class %><%= margin_top_class %> <%= brand_helper.brand_class %>">
|
|
11
11
|
<% items.each do |item| %>
|
|
12
12
|
<li class="gem-c-document-list__item">
|
|
13
|
-
|
|
13
|
+
<% if item[:link][:description] || item[:metadata] %>
|
|
14
|
+
<h3 class="gem-c-document-list__item-title">
|
|
15
|
+
<%=
|
|
16
|
+
link_to(
|
|
17
|
+
item[:link][:text],
|
|
18
|
+
item[:link][:path],
|
|
19
|
+
data: item[:link][:data_attributes],
|
|
20
|
+
class: brand_helper.color_class
|
|
21
|
+
)
|
|
22
|
+
%>
|
|
23
|
+
</h3>
|
|
24
|
+
<% else%>
|
|
14
25
|
<%=
|
|
15
26
|
link_to(
|
|
16
27
|
item[:link][:text],
|
|
17
28
|
item[:link][:path],
|
|
18
29
|
data: item[:link][:data_attributes],
|
|
19
|
-
class: brand_helper.color_class
|
|
30
|
+
class: "gem-c-document-list__item-title #{brand_helper.color_class}"
|
|
20
31
|
)
|
|
21
32
|
%>
|
|
22
|
-
|
|
33
|
+
<% end %>
|
|
34
|
+
|
|
35
|
+
<% if item[:link][:context] %>
|
|
36
|
+
<span class="gem-c-document-list__item-context"><%= item[:link][:context] %></span>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
23
39
|
<% if item[:link][:description] %>
|
|
24
40
|
<p class="gem-c-document-list__item-description" ><%= item[:link][:description] %></p>
|
|
25
41
|
<% end %>
|
|
42
|
+
|
|
26
43
|
<% if item[:metadata] %>
|
|
27
44
|
<ul>
|
|
28
45
|
<% item[:metadata].each do |item_metadata_key, item_metadata_value| %>
|
|
@@ -93,3 +93,26 @@ examples:
|
|
|
93
93
|
metadata:
|
|
94
94
|
public_updated_at: 2017-07-19 15:01:48
|
|
95
95
|
document_type: 'Statutory guidance'
|
|
96
|
+
with_only_link:
|
|
97
|
+
description: When only link text and path is provided to the component (no description or metadata), this will render the link without wrapping it in a heading element.
|
|
98
|
+
data:
|
|
99
|
+
items:
|
|
100
|
+
- link:
|
|
101
|
+
text: 'School behaviour and attendance: parental responsibility measures'
|
|
102
|
+
path: '/government/publications/parental-responsibility-measures-for-behaviour-and-attendance'
|
|
103
|
+
- link:
|
|
104
|
+
text: 'School exclusion'
|
|
105
|
+
path: '/government/publications/school-exclusion'
|
|
106
|
+
with_context:
|
|
107
|
+
description: Context can be provided to render next to the item title. This will be used on /government/organisations to indicate if an organisation is hosted on a separate website or being moved to GOV.UK
|
|
108
|
+
data:
|
|
109
|
+
items:
|
|
110
|
+
- link:
|
|
111
|
+
text: 'Forestry Commission'
|
|
112
|
+
path: '/government/organisations/forestry-commission'
|
|
113
|
+
context: 'separate website'
|
|
114
|
+
- link:
|
|
115
|
+
text: 'Advisory Committee on the Microbiological Safety of Food'
|
|
116
|
+
path: '/government/organisations/advisory-committee-on-the-microbiological-safety-of-food'
|
|
117
|
+
context: 'moving to GOV.UK'
|
|
118
|
+
description: "Works with 4 agencies and public bodies"
|
|
@@ -11,7 +11,7 @@ body: |
|
|
|
11
11
|
associated with that item.
|
|
12
12
|
|
|
13
13
|
Sections of links appear below the main taxonomy-driven navigation items. These are
|
|
14
|
-
Collections,
|
|
14
|
+
Collections, Statistical data sets, Topical events and World locations.
|
|
15
15
|
|
|
16
16
|
This implementation is very similar to the related-navigation component in that the
|
|
17
17
|
same sections are appended. The two components should ultimately be merged to form
|
|
@@ -77,9 +77,6 @@ examples:
|
|
|
77
77
|
collections:
|
|
78
78
|
- text: "Statistics: outcome based success measures"
|
|
79
79
|
path: "/government/collections/statistics-outcome-based-success-measures"
|
|
80
|
-
policies:
|
|
81
|
-
- text: "Teaching and school leadership"
|
|
82
|
-
path: "/government/policies/teaching-and-school-leadership"
|
|
83
80
|
world_locations:
|
|
84
81
|
- text: "Afghanistan"
|
|
85
82
|
path: "/world/afghanistan/news"
|
data/config/locales/en.yml
CHANGED
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: 9.0
|
|
4
|
+
version: 9.1.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: 2018-06-
|
|
11
|
+
date: 2018-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|