govuk_publishing_components 5.3.0 → 5.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/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +18 -0
- data/app/views/govuk_publishing_components/components/_document_list.html.erb +30 -0
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +70 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d641536678da47028e081ee9005030f0005db516c354c754052222dacd2d48c
|
4
|
+
data.tar.gz: d89d55dd38eacae4f679cb151c686ef1835760553c09fd3d25b4dff1c2b15a18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8db07aa8a90735a1303e997855f34e6b8cafc326bb0f663439b2b66a05622fd30386a836480c1dc04af7c2ffbb5e84b0840c65079ae1352bb20617bc94d53880
|
7
|
+
data.tar.gz: 6284f25ac80fc5cc06b2fe502b314065224c0287aa944c53dd9371c7a5b247ae9b0f77a38cb906661f0aa0b417d50347de049ee5347e52fd223bc750725a03cd
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.gem-c-document-list__item {
|
2
|
+
overflow: hidden;
|
3
|
+
margin-bottom: $gutter-one-third;
|
4
|
+
padding-bottom: $gutter-one-third;
|
5
|
+
border-bottom: 1px solid $border-colour;
|
6
|
+
list-style: none;
|
7
|
+
}
|
8
|
+
|
9
|
+
.gem-c-document-list__item-title {
|
10
|
+
@include bold-19;
|
11
|
+
}
|
12
|
+
|
13
|
+
.gem-c-document-list__attribute {
|
14
|
+
@include core-14;
|
15
|
+
float: left;
|
16
|
+
list-style: none;
|
17
|
+
padding-right: $gutter-two-thirds;
|
18
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%
|
2
|
+
items ||= []
|
3
|
+
%>
|
4
|
+
<% if items.any? %>
|
5
|
+
<ol class="gem-c-document-list">
|
6
|
+
<% items.each do |item| %>
|
7
|
+
<li class="gem-c-document-list__item">
|
8
|
+
<h3 class="gem-c-document-list__item-title">
|
9
|
+
<%=
|
10
|
+
link_to(
|
11
|
+
item[:link][:text],
|
12
|
+
item[:link][:path],
|
13
|
+
data: item[:link][:data_attributes]
|
14
|
+
)
|
15
|
+
%>
|
16
|
+
</h3>
|
17
|
+
<ul>
|
18
|
+
<li class="gem-c-document-list__attribute">
|
19
|
+
<time datetime="<%= item[:metadata][:public_updated_at].iso8601 %>">
|
20
|
+
<%= l(item[:metadata][:public_updated_at], format: '%e %B %Y') %>
|
21
|
+
</time>
|
22
|
+
</li>
|
23
|
+
<li class="gem-c-document-list__attribute gem-c-document-list__attribute--document-type">
|
24
|
+
<%= item[:metadata][:document_type] %>
|
25
|
+
</li>
|
26
|
+
</ul>
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
|
+
</ol>
|
30
|
+
<% end %>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
name: Document list
|
2
|
+
description: An ordered list of links to documents including document type and when updated.
|
3
|
+
body: |
|
4
|
+
Outputs a list of links to documents, based on an array of document data. This must include:
|
5
|
+
|
6
|
+
* link text
|
7
|
+
* link href
|
8
|
+
* last updated date object
|
9
|
+
* document type
|
10
|
+
|
11
|
+
Tracking can be added to the links by supplying optional data attributes for each.
|
12
|
+
|
13
|
+
Documents are presented in an ordered list as the component expects that the ordering of the documents is relevant.
|
14
|
+
accessibility_criteria: |
|
15
|
+
The component must:
|
16
|
+
|
17
|
+
* inform the user how many items are in the list
|
18
|
+
shared_accessibility_criteria:
|
19
|
+
- link
|
20
|
+
examples:
|
21
|
+
default:
|
22
|
+
data:
|
23
|
+
items:
|
24
|
+
- link:
|
25
|
+
text: 'Alternative provision'
|
26
|
+
path: '/government/publications/alternative-provision'
|
27
|
+
metadata:
|
28
|
+
public_updated_at: 2016-06-27 10:29:44
|
29
|
+
document_type: 'Statutory guidance'
|
30
|
+
- link:
|
31
|
+
text: 'Behaviour and discipline in schools: guide for governing bodies'
|
32
|
+
path: '/government/publications/behaviour-and-discipline-in-schools-guidance-for-governing-bodies'
|
33
|
+
metadata:
|
34
|
+
public_updated_at: 2015-09-24 16:42:48
|
35
|
+
document_type: 'Statutory guidance'
|
36
|
+
- link:
|
37
|
+
text: 'Children missing education'
|
38
|
+
path: '/government/publications/children-missing-education'
|
39
|
+
metadata:
|
40
|
+
public_updated_at: 2016-09-05 16:48:27
|
41
|
+
document_type: 'Statutory guidance'
|
42
|
+
with_data_attributes_on_links:
|
43
|
+
data:
|
44
|
+
items:
|
45
|
+
- link:
|
46
|
+
text: 'School behaviour and attendance: parental responsibility measures'
|
47
|
+
path: '/government/publications/parental-responsibility-measures-for-behaviour-and-attendance'
|
48
|
+
data_attributes:
|
49
|
+
track_category: 'navDocumentCollectionLinkClicked'
|
50
|
+
track_action: 1.1
|
51
|
+
track_label: '/government/publications/parental-responsibility-measures-for-behaviour-and-attendance'
|
52
|
+
track_options:
|
53
|
+
dimension28: 2
|
54
|
+
dimension29: 'School behaviour and attendance: parental responsibility measures'
|
55
|
+
metadata:
|
56
|
+
public_updated_at: 2017-01-05 14:50:33
|
57
|
+
document_type: 'Statutory guidance'
|
58
|
+
- link:
|
59
|
+
text: 'School exclusion'
|
60
|
+
path: '/government/publications/school-exclusion'
|
61
|
+
data_attributes:
|
62
|
+
track_category: 'navDocumentCollectionLinkClicked'
|
63
|
+
track_action: 1.2
|
64
|
+
track_label: '/government/publications/school-exclusion'
|
65
|
+
track_options:
|
66
|
+
dimension28: 2
|
67
|
+
dimension29: 'School exclusion'
|
68
|
+
metadata:
|
69
|
+
public_updated_at: 2017-07-19 15:01:48
|
70
|
+
document_type: 'Statutory guidance'
|
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: 5.
|
4
|
+
version: 5.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: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -287,6 +287,7 @@ files:
|
|
287
287
|
- app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss
|
288
288
|
- app/assets/stylesheets/govuk_publishing_components/component_guide.scss
|
289
289
|
- app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss
|
290
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss
|
290
291
|
- app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss
|
291
292
|
- app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss
|
292
293
|
- app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss
|
@@ -318,6 +319,7 @@ files:
|
|
318
319
|
- app/views/govuk_publishing_components/component_guide/preview.html.erb
|
319
320
|
- app/views/govuk_publishing_components/component_guide/show.html.erb
|
320
321
|
- app/views/govuk_publishing_components/components/_back_link.html.erb
|
322
|
+
- app/views/govuk_publishing_components/components/_document_list.html.erb
|
321
323
|
- app/views/govuk_publishing_components/components/_error_summary.html.erb
|
322
324
|
- app/views/govuk_publishing_components/components/_feedback.html.erb
|
323
325
|
- app/views/govuk_publishing_components/components/_fieldset.html.erb
|
@@ -329,6 +331,7 @@ files:
|
|
329
331
|
- app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
|
330
332
|
- app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb
|
331
333
|
- app/views/govuk_publishing_components/components/docs/back_link.yml
|
334
|
+
- app/views/govuk_publishing_components/components/docs/document_list.yml
|
332
335
|
- app/views/govuk_publishing_components/components/docs/error_summary.yml
|
333
336
|
- app/views/govuk_publishing_components/components/docs/feedback.yml
|
334
337
|
- app/views/govuk_publishing_components/components/docs/fieldset.yml
|