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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4902da197a494c6f39c5ed16ecb9ef84a8c8f56cf037a14130793141048274d
4
- data.tar.gz: 0c614a237b36b5e919a705805de3bbedf2503efab958da940dd78abb74fb8b28
3
+ metadata.gz: 5d641536678da47028e081ee9005030f0005db516c354c754052222dacd2d48c
4
+ data.tar.gz: d89d55dd38eacae4f679cb151c686ef1835760553c09fd3d25b4dff1c2b15a18
5
5
  SHA512:
6
- metadata.gz: da1bfcf8e9bf7ec67e07e2f90b901905ac214311bfd503d6d1a15756965befca953be7afa9921fa216236bb52b858bf7b35961eb4b40c25c7a2556e158b056f6
7
- data.tar.gz: 3043a55019d7ebc3c91fc6f7bd600e4720ef4d8e140e2731fb1c79a5c336197f600533180846508ae25e417125b511070bd09ac36a713b190da7c5332e29e08a
6
+ metadata.gz: 8db07aa8a90735a1303e997855f34e6b8cafc326bb0f663439b2b66a05622fd30386a836480c1dc04af7c2ffbb5e84b0840c65079ae1352bb20617bc94d53880
7
+ data.tar.gz: 6284f25ac80fc5cc06b2fe502b314065224c0287aa944c53dd9371c7a5b247ae9b0f77a38cb906661f0aa0b417d50347de049ee5347e52fd223bc750725a03cd
@@ -8,6 +8,7 @@
8
8
  @import "colours";
9
9
 
10
10
  @import "components/back-link";
11
+ @import "components/document-list";
11
12
  @import "components/error-summary";
12
13
  @import "components/fieldset";
13
14
  @import "components/input";
@@ -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'
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '5.3.0'.freeze
2
+ VERSION = '5.4.0'.freeze
3
3
  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: 5.3.0
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-05 00:00:00.000000000 Z
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