govuk_publishing_components 38.0.1 → 38.1.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/component_guide/application.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +19 -46
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +0 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_fraction.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -1
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +5 -3
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/attachment/_thumbnail_pdf.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/docs/attachment.yml +8 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +18 -0
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +8 -4
- data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +1 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -1
- data/lib/govuk_publishing_components/presenters/attachment_helper.rb +12 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +4 -40
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2-2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/bis_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/coastguard_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dbt_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dbt_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/dbt_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ho_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/mod_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/org_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/portcullis_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/so_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/ukho_18px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_13px.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_13px_x2.png +0 -0
- data/app/assets/images/govuk_publishing_components/crests/wales_crest_18px.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e957626449176c29e36bde0d645dda9a4dd296b7f06969cee8fb86c5c9bedd25
|
4
|
+
data.tar.gz: 7b8d2a6ea56fb37d014d01aa6cd5dc95fc0f62c99e36011ce8bea4183fd79c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e35fa964443be079e31839687e19811493fb76faa63ec948a619ca57a42cf611868fb590d16e1b92b40c3b2ec534ff94b6433ba6dd2b5cd7e0565ef07cbdcff
|
7
|
+
data.tar.gz: 6298895e8212651e27924b5dabe6e56f68ff8bab616051cb8c137e90e11f09b1ea5261a918de6b570729688ebc978cb40538235685525a9634e28425919d1ce7
|
data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss
CHANGED
@@ -69,7 +69,7 @@
|
|
69
69
|
table.financial-data {
|
70
70
|
.numeric {
|
71
71
|
text-align: right;
|
72
|
-
@include govuk-font(
|
72
|
+
@include govuk-font(16, $weight: regular, $tabular: true);
|
73
73
|
}
|
74
74
|
|
75
75
|
// make all elements inside thead look the same
|
@@ -82,10 +82,10 @@
|
|
82
82
|
|
83
83
|
thead th,
|
84
84
|
thead td {
|
85
|
-
@include govuk-font(
|
85
|
+
@include govuk-font(16, $weight: bold, $tabular: true);
|
86
86
|
|
87
87
|
&.numeric {
|
88
|
-
@include govuk-font(
|
88
|
+
@include govuk-font(16, $weight: bold, $tabular: true);
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
@@ -2,16 +2,12 @@
|
|
2
2
|
|
3
3
|
// Default logo corresponds with the "medium stacked" Whitehall equivalent
|
4
4
|
.gem-c-organisation-logo {
|
5
|
-
font
|
5
|
+
@include govuk-font($size: 19);
|
6
6
|
font-weight: 400;
|
7
7
|
line-height: 1.35;
|
8
8
|
// When this is a heading the margin needs to be set to stop it from
|
9
9
|
// inheriting the browser's default margin:
|
10
10
|
margin: 0;
|
11
|
-
|
12
|
-
@include govuk-media-query($from: tablet) {
|
13
|
-
font-size: 18px;
|
14
|
-
}
|
15
11
|
}
|
16
12
|
|
17
13
|
.gem-c-organisation-logo__container {
|
@@ -39,13 +35,8 @@
|
|
39
35
|
.gem-c-organisation-logo__crest {
|
40
36
|
// Default brand colour
|
41
37
|
border-left: 2px solid govuk-colour("black");
|
42
|
-
padding-top:
|
43
|
-
padding-left:
|
44
|
-
|
45
|
-
@include govuk-media-query($from: tablet) {
|
46
|
-
padding-top: 28px;
|
47
|
-
padding-left: 7px;
|
48
|
-
}
|
38
|
+
padding-top: 35px;
|
39
|
+
padding-left: 8px;
|
49
40
|
|
50
41
|
.brand--executive-office & {
|
51
42
|
border-left-width: 0;
|
@@ -81,80 +72,62 @@
|
|
81
72
|
}
|
82
73
|
}
|
83
74
|
|
84
|
-
@mixin crest($crest) {
|
85
|
-
background: url("govuk_publishing_components/crests/#{$crest}
|
86
|
-
background-size: auto
|
87
|
-
|
88
|
-
@include govuk-device-pixel-ratio {
|
89
|
-
background-image: url("govuk_publishing_components/crests/#{$crest}_13px_x2.png");
|
90
|
-
}
|
91
|
-
|
92
|
-
@include govuk-media-query($from: tablet) {
|
93
|
-
background: url("govuk_publishing_components/crests/#{$crest}_18px.png") no-repeat 6px 0;
|
94
|
-
background-size: auto 26px;
|
95
|
-
|
96
|
-
@include govuk-device-pixel-ratio {
|
97
|
-
background-image: url("govuk_publishing_components/crests/#{$crest}_18px_x2.png");
|
98
|
-
}
|
99
|
-
}
|
75
|
+
@mixin crest($crest, $xpos:0, $ypos:0) {
|
76
|
+
background: url("govuk_publishing_components/crests/#{$crest}_18px_x2.png") no-repeat $xpos $ypos;
|
77
|
+
background-size: auto 32px;
|
100
78
|
}
|
101
79
|
|
102
80
|
@mixin tall-crest {
|
103
|
-
padding-top:
|
104
|
-
background-size: auto
|
105
|
-
|
106
|
-
@include govuk-media-query($from: tablet) {
|
107
|
-
padding-top: 35px;
|
108
|
-
background-size: auto 34px;
|
109
|
-
}
|
81
|
+
padding-top: 39px;
|
82
|
+
background-size: auto 34px;
|
110
83
|
}
|
111
84
|
|
112
85
|
.gem-c-organisation-logo__crest--dbt {
|
113
|
-
@include crest("dbt_crest");
|
86
|
+
@include crest($crest: "dbt_crest", $xpos: 9px);
|
114
87
|
}
|
115
88
|
|
116
89
|
.gem-c-organisation-logo__crest--bis {
|
117
|
-
@include crest("bis_crest");
|
90
|
+
@include crest($crest: "bis_crest", $xpos: 9px);
|
118
91
|
}
|
119
92
|
|
120
93
|
.gem-c-organisation-logo__crest--hmrc {
|
121
|
-
@include crest("hmrc_crest");
|
94
|
+
@include crest($crest: "hmrc_crest", $xpos: 8px);
|
122
95
|
}
|
123
96
|
|
124
97
|
.gem-c-organisation-logo__crest--ho {
|
125
|
-
@include crest("ho_crest");
|
98
|
+
@include crest($crest: "ho_crest", $xpos: 9px);
|
126
99
|
@include tall-crest;
|
127
100
|
}
|
128
101
|
|
129
102
|
.gem-c-organisation-logo__crest--mod {
|
130
|
-
@include crest("mod_crest");
|
103
|
+
@include crest($crest: "mod_crest", $xpos: 9px);
|
131
104
|
@include tall-crest;
|
132
105
|
}
|
133
106
|
|
134
107
|
.gem-c-organisation-logo__crest--single-identity,
|
135
108
|
.gem-c-organisation-logo__crest--eo,
|
136
109
|
.gem-c-organisation-logo__crest--org {
|
137
|
-
@include crest("org_crest");
|
110
|
+
@include crest($crest: "org_crest", $xpos: 8px);
|
138
111
|
}
|
139
112
|
|
140
113
|
.gem-c-organisation-logo__crest--portcullis {
|
141
|
-
@include crest("portcullis");
|
114
|
+
@include crest($crest: "portcullis", $xpos: 9px);
|
142
115
|
}
|
143
116
|
|
144
117
|
.gem-c-organisation-logo__crest--so {
|
145
|
-
@include crest("so_crest");
|
118
|
+
@include crest($crest: "so_crest", $xpos: 9px);
|
146
119
|
}
|
147
120
|
|
148
121
|
.gem-c-organisation-logo__crest--ukaea {
|
149
|
-
@include crest("ukaea_crest");
|
122
|
+
@include crest($crest: "ukaea_crest", $xpos: 9px);
|
150
123
|
}
|
151
124
|
|
152
125
|
.gem-c-organisation-logo__crest--ukho {
|
153
|
-
@include crest("ukho");
|
126
|
+
@include crest($crest: "ukho", $xpos: 8px);
|
154
127
|
@include tall-crest;
|
155
128
|
}
|
156
129
|
|
157
130
|
.gem-c-organisation-logo__crest--wales {
|
158
|
-
@include crest("wales_crest");
|
131
|
+
@include crest($crest: "wales_crest", $xpos: 9px);
|
159
132
|
@include tall-crest;
|
160
133
|
}
|
data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss
CHANGED
@@ -25,10 +25,6 @@
|
|
25
25
|
.gem-c-step-nav-related__heading {
|
26
26
|
@include govuk-font(19, $weight: bold, $line-height: 1.4);
|
27
27
|
margin-top: govuk-spacing(4);
|
28
|
-
|
29
|
-
@include govuk-media-query($until: tablet) {
|
30
|
-
font-size: 19px;
|
31
|
-
}
|
32
28
|
}
|
33
29
|
|
34
30
|
.gem-c-step-nav-related__pretitle {
|
@@ -58,9 +58,7 @@
|
|
58
58
|
.gem-c-subscription-links__item--button {
|
59
59
|
cursor: pointer;
|
60
60
|
display: none;
|
61
|
-
font
|
62
|
-
font-weight: inherit;
|
63
|
-
line-height: inherit;
|
61
|
+
@include govuk-font(19, $weight: bold);
|
64
62
|
padding: govuk-spacing(2);
|
65
63
|
border: 1px solid $gem-quiet-button-colour;
|
66
64
|
background-color: $gem-secondary-button-background-colour;
|
data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss
CHANGED
@@ -65,7 +65,7 @@
|
|
65
65
|
}
|
66
66
|
|
67
67
|
.metadata {
|
68
|
-
@include govuk-font($size:
|
68
|
+
@include govuk-font($size: 16);
|
69
69
|
}
|
70
70
|
|
71
71
|
.url {
|
@@ -93,12 +93,12 @@
|
|
93
93
|
}
|
94
94
|
|
95
95
|
.opendocument-help {
|
96
|
-
@include govuk-font($size:
|
96
|
+
@include govuk-font($size: 16);
|
97
97
|
}
|
98
98
|
|
99
99
|
.accessibility-warning {
|
100
100
|
h2 {
|
101
|
-
@include govuk-font($size:
|
101
|
+
@include govuk-font($size: 16);
|
102
102
|
margin: 0;
|
103
103
|
}
|
104
104
|
word-break: break-word;
|
@@ -73,6 +73,8 @@
|
|
73
73
|
<%= render "govuk_publishing_components/components/attachment/thumbnail_document" %>
|
74
74
|
<% elsif attachment.spreadsheet? %>
|
75
75
|
<%= render "govuk_publishing_components/components/attachment/thumbnail_spreadsheet" %>
|
76
|
+
<% elsif attachment.pdf? %>
|
77
|
+
<%= render "govuk_publishing_components/components/attachment/thumbnail_pdf" %>
|
76
78
|
<% else %>
|
77
79
|
<%= render "govuk_publishing_components/components/attachment/thumbnail_generic" %>
|
78
80
|
<% end %>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
add_gem_component_stylesheet("layout-for-admin")
|
3
|
+
js_filename ||= "application"
|
4
|
+
css_filename ||= "application"
|
3
5
|
|
4
6
|
product_name ||= "Publishing"
|
5
7
|
%>
|
@@ -13,15 +15,15 @@
|
|
13
15
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
14
16
|
<%= csrf_meta_tags %>
|
15
17
|
<%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
|
16
|
-
<%= stylesheet_link_tag
|
18
|
+
<%= stylesheet_link_tag css_filename, media: "all" %>
|
17
19
|
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
18
20
|
<%= yield :head %>
|
19
21
|
</head>
|
20
22
|
<body class="gem-c-layout-for-admin govuk-template__body">
|
21
23
|
<%= javascript_tag nonce: true do -%>
|
22
|
-
document.body.className
|
24
|
+
document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
|
23
25
|
<% end -%>
|
24
26
|
<%= yield %>
|
25
|
-
<%= javascript_include_tag
|
27
|
+
<%= javascript_include_tag js_filename %>
|
26
28
|
</body>
|
27
29
|
</html>
|
@@ -97,7 +97,7 @@
|
|
97
97
|
</head>
|
98
98
|
<%= tag.body class: body_css_classes do %>
|
99
99
|
<%= javascript_tag nonce: true do -%>
|
100
|
-
document.body.className
|
100
|
+
document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
|
101
101
|
<% end -%>
|
102
102
|
<%= render "govuk_publishing_components/components/cookie_banner", layout_helper.cookie_banner_data %>
|
103
103
|
<%= render "govuk_publishing_components/components/skip_link", {
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg class="gem-c-attachment__thumbnail-image gem-c-attachment__thumbnail-image--pdf" version="1.1" viewBox="0 0 99 140">
|
2
|
+
<path d="M12,59h9v9h-9v-9ZM30,77v9h39v-9H30ZM30,104h57v-9H30v9ZM30,122h48v-9H30v9ZM12,86h9v-9h-9v9ZM12,122h9v-9h-9v9ZM12,104h9v-9h-9v9ZM30,68h57v-9H30v9ZM35.2,21c-.3-.2-.6-.4-1-.5s-.8-.2-1.3-.2h-2.6v5.5h2.6c.5,0,1,0,1.3-.2s.7-.3,1-.5c.3-.2.5-.5.7-.8s.2-.7.2-1.1h0c0-.5,0-.9-.2-1.2-.2-.3-.4-.6-.7-.8h0ZM52.4,21.9c-.4-.5-1-.9-1.6-1.1-.7-.3-1.5-.4-2.4-.4h-2.7v11.5h2.7c.9,0,1.7-.1,2.4-.4s1.2-.7,1.6-1.1c.4-.5.7-1.1.9-1.7.2-.7.3-1.4.3-2.1v-.7c0-.8,0-1.5-.3-2.1-.2-.6-.5-1.2-.9-1.7h0ZM87,12v27H12V12h75ZM39.8,23c0-.9-.1-1.6-.4-2.4-.3-.7-.7-1.4-1.2-1.9-.5-.5-1.2-1-1.9-1.2-.8-.3-1.6-.5-2.5-.5h-7.2v17.9h3.6v-6h3.2c.9,0,1.8-.1,2.6-.5.8-.3,1.4-.7,2-1.2.5-.5,1-1.2,1.3-1.9.3-.7.5-1.5.5-2.4h0ZM57.4,26c0-1.3-.2-2.6-.5-3.7s-.9-2-1.6-2.8c-.7-.8-1.6-1.4-2.7-1.8-1.1-.4-2.3-.6-3.8-.6h-6.6v17.9h6.6c1.5,0,2.7-.2,3.8-.6,1.1-.4,2-1,2.7-1.8.7-.8,1.3-1.7,1.6-2.8.4-1.1.5-2.3.5-3.7h0ZM72.4,17.1h-12.1v17.9h3.6v-7.5h7.8v-3.3h-7.8v-3.8h8.4s0-3.3,0-3.3Z"/>
|
3
|
+
</svg>
|
@@ -200,6 +200,14 @@ examples:
|
|
200
200
|
content_type: application/pdf
|
201
201
|
file_size: 20000
|
202
202
|
thumbnail_url: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/791567/thumbnail_the_government_financial_reporting_review_web.pdf.png"
|
203
|
+
pdf_attachment:
|
204
|
+
data:
|
205
|
+
attachment:
|
206
|
+
title: "Department for Transport, temporary snow ploughs: guidance note"
|
207
|
+
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/259634/temporary-snow-ploughs.pdf
|
208
|
+
filename: temporary-snow-ploughs.pdf
|
209
|
+
content_type: application/pdf
|
210
|
+
file_size: 20000
|
203
211
|
with_preview_link:
|
204
212
|
data:
|
205
213
|
attachment:
|
@@ -23,3 +23,21 @@ examples:
|
|
23
23
|
browser_title: 'A page title'
|
24
24
|
block: |
|
25
25
|
<!-- You probably want to use the header, main & footer components here -->
|
26
|
+
with_custom_js_filename:
|
27
|
+
description: An alternative JS filename can be used in place of the default `application.js` if required (note that this cannot easily be demonstrated here).
|
28
|
+
data:
|
29
|
+
environment: production
|
30
|
+
product_name: Publishing
|
31
|
+
browser_title: 'A page title'
|
32
|
+
js_filename: "application"
|
33
|
+
block: |
|
34
|
+
<!-- You probably want to use the header, main & footer components here -->
|
35
|
+
with_custom_css_filename:
|
36
|
+
description: An alternative JS filename can be used in place of the default `application.scss` if required (note that this cannot easily be demonstrated here).
|
37
|
+
data:
|
38
|
+
environment: production
|
39
|
+
product_name: Publishing
|
40
|
+
browser_title: 'A page title'
|
41
|
+
css_filename: "application"
|
42
|
+
block: |
|
43
|
+
<!-- You probably want to use the header, main & footer components here -->
|
@@ -44,11 +44,13 @@
|
|
44
44
|
|
45
45
|
<%
|
46
46
|
unless disable_ga4
|
47
|
+
heading_text = t("components.feedback.help_us_improve_govuk", locale: :en)
|
47
48
|
ga4_submit_button_event = {
|
48
49
|
event_name: "form_submit",
|
49
50
|
type: "feedback",
|
50
51
|
text: t("components.feedback.send", locale: :en),
|
51
|
-
section:
|
52
|
+
section: heading_text,
|
53
|
+
tool_name: heading_text
|
52
54
|
}.to_json
|
53
55
|
end
|
54
56
|
%>
|
@@ -31,11 +31,13 @@
|
|
31
31
|
|
32
32
|
<%
|
33
33
|
unless disable_ga4
|
34
|
+
heading_text = t("components.feedback.help_us_improve_govuk", locale: :en)
|
34
35
|
ga4_send_button_event = {
|
35
36
|
event_name: "form_submit",
|
36
37
|
type: "feedback",
|
37
38
|
text: t("components.feedback.send_me_survey", locale: :en),
|
38
|
-
section:
|
39
|
+
section: heading_text,
|
40
|
+
tool_name: heading_text
|
39
41
|
}.to_json
|
40
42
|
end
|
41
43
|
%>
|
@@ -1,24 +1,28 @@
|
|
1
1
|
<%
|
2
2
|
unless disable_ga4
|
3
|
+
heading_text = t("components.feedback.is_this_page_useful", locale: :en)
|
3
4
|
ga4_yes_button_event = {
|
4
5
|
"event_name": "form_submit",
|
5
6
|
"type": "feedback",
|
6
|
-
"text": t("components.feedback.yes", locale: :en),
|
7
|
-
"section":
|
7
|
+
"text": t("components.feedback.yes", locale: :en),
|
8
|
+
"section": heading_text,
|
9
|
+
"tool_name": heading_text,
|
8
10
|
}.to_json
|
9
11
|
|
10
12
|
ga4_no_button_event = {
|
11
13
|
"event_name": "form_submit",
|
12
14
|
"type": "feedback",
|
13
15
|
"text": t("components.feedback.no", locale: :en),
|
14
|
-
"section":
|
16
|
+
"section": heading_text,
|
17
|
+
"tool_name": heading_text,
|
15
18
|
}.to_json
|
16
19
|
|
17
20
|
ga4_problem_button_event = {
|
18
21
|
"event_name": "form_submit",
|
19
22
|
"type": "feedback",
|
20
23
|
"text": t("components.feedback.something_wrong", locale: :en),
|
21
|
-
"section":
|
24
|
+
"section": heading_text,
|
25
|
+
"tool_name": heading_text,
|
22
26
|
}.to_json
|
23
27
|
end
|
24
28
|
%>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
</head>
|
48
48
|
<body class="gem-c-layout-for-admin govuk-template__body <%= 'hide-header-and-footer' if @preview %>">
|
49
49
|
<%= javascript_tag nonce: true do -%>
|
50
|
-
document.body.className
|
50
|
+
document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
|
51
51
|
<% end -%>
|
52
52
|
<%= yield :body %>
|
53
53
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module GovukPublishingComponents
|
2
2
|
module Presenters
|
3
3
|
class AttachmentHelper
|
4
|
-
delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
|
4
|
+
delegate :opendocument?, :document?, :spreadsheet?, :pdf?, to: :content_type
|
5
5
|
|
6
6
|
attr_reader :attachment_data
|
7
7
|
|
@@ -78,8 +78,8 @@ module GovukPublishingComponents
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def unnumbered_reference
|
81
|
-
unnumbered_reference = "Unnumbered command paper" if attachment_data[:unnumbered_command_paper].eql?(true) &&
|
82
|
-
unnumbered_reference = "Unnumbered act paper" if attachment_data[:unnumbered_hoc_paper].eql?(true) &&
|
81
|
+
unnumbered_reference = "Unnumbered command paper" if attachment_data[:unnumbered_command_paper].eql?(true) && attachment_data[:command_paper_number].blank?
|
82
|
+
unnumbered_reference = "Unnumbered act paper" if attachment_data[:unnumbered_hoc_paper].eql?(true) && attachment_data[:hoc_paper_number].blank?
|
83
83
|
unnumbered_reference
|
84
84
|
end
|
85
85
|
|
@@ -92,7 +92,7 @@ module GovukPublishingComponents
|
|
92
92
|
|
93
93
|
TYPES = [
|
94
94
|
{ content_type: "application/msword", name: "MS Word Document", document: true }.freeze, # doc
|
95
|
-
{ content_type: "application/pdf", abbr: "PDF", name: "Portable Document Format",
|
95
|
+
{ content_type: "application/pdf", abbr: "PDF", name: "Portable Document Format", pdf: true }.freeze,
|
96
96
|
{ content_type: "application/postscript", extension: ".ps", abbr: "PS", name: "PostScript" }.freeze,
|
97
97
|
{ content_type: "application/postscript", extension: ".eps", abbr: "EPS", name: "Encapsulated PostScript" }.freeze,
|
98
98
|
{ content_type: "application/rtf", abbr: "RTF", name: "Rich Text Format" }.freeze,
|
@@ -158,6 +158,10 @@ module GovukPublishingComponents
|
|
158
158
|
def spreadsheet?
|
159
159
|
content_type_data[:spreadsheet].present?
|
160
160
|
end
|
161
|
+
|
162
|
+
def pdf?
|
163
|
+
content_type_data[:pdf].present?
|
164
|
+
end
|
161
165
|
end
|
162
166
|
|
163
167
|
class UnsupportedContentType
|
@@ -182,6 +186,10 @@ module GovukPublishingComponents
|
|
182
186
|
def spreadsheet?
|
183
187
|
false
|
184
188
|
end
|
189
|
+
|
190
|
+
def pdf?
|
191
|
+
false
|
192
|
+
end
|
185
193
|
end
|
186
194
|
end
|
187
195
|
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: 38.
|
4
|
+
version: 38.1.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: 2024-04-
|
11
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -367,54 +367,17 @@ files:
|
|
367
367
|
- app/assets/images/govuk_publishing_components/action-link-arrow--simple.svg
|
368
368
|
- app/assets/images/govuk_publishing_components/action-link-arrow.png
|
369
369
|
- app/assets/images/govuk_publishing_components/action-link-arrow.svg
|
370
|
-
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px.png
|
371
|
-
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2-2.png
|
372
|
-
- app/assets/images/govuk_publishing_components/crests/bis_crest_13px_x2.png
|
373
|
-
- app/assets/images/govuk_publishing_components/crests/bis_crest_18px.png
|
374
370
|
- app/assets/images/govuk_publishing_components/crests/bis_crest_18px_x2.png
|
375
|
-
- app/assets/images/govuk_publishing_components/crests/coastguard_13px.png
|
376
|
-
- app/assets/images/govuk_publishing_components/crests/coastguard_13px_x2.png
|
377
|
-
- app/assets/images/govuk_publishing_components/crests/coastguard_18px.png
|
378
371
|
- app/assets/images/govuk_publishing_components/crests/coastguard_18px_x2.png
|
379
|
-
- app/assets/images/govuk_publishing_components/crests/dbt_crest_13px.png
|
380
|
-
- app/assets/images/govuk_publishing_components/crests/dbt_crest_13px_x2.png
|
381
|
-
- app/assets/images/govuk_publishing_components/crests/dbt_crest_18px.png
|
382
372
|
- app/assets/images/govuk_publishing_components/crests/dbt_crest_18px_x2.png
|
383
|
-
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px.png
|
384
|
-
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_13px_x2.png
|
385
|
-
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px.png
|
386
373
|
- app/assets/images/govuk_publishing_components/crests/hmrc_crest_18px_x2.png
|
387
|
-
- app/assets/images/govuk_publishing_components/crests/ho_crest_13px.png
|
388
|
-
- app/assets/images/govuk_publishing_components/crests/ho_crest_13px_x2.png
|
389
|
-
- app/assets/images/govuk_publishing_components/crests/ho_crest_18px.png
|
390
374
|
- app/assets/images/govuk_publishing_components/crests/ho_crest_18px_x2.png
|
391
|
-
- app/assets/images/govuk_publishing_components/crests/mod_crest_13px.png
|
392
|
-
- app/assets/images/govuk_publishing_components/crests/mod_crest_13px_x2.png
|
393
|
-
- app/assets/images/govuk_publishing_components/crests/mod_crest_18px.png
|
394
375
|
- app/assets/images/govuk_publishing_components/crests/mod_crest_18px_x2.png
|
395
|
-
- app/assets/images/govuk_publishing_components/crests/org_crest_13px.png
|
396
|
-
- app/assets/images/govuk_publishing_components/crests/org_crest_13px_x2.png
|
397
|
-
- app/assets/images/govuk_publishing_components/crests/org_crest_18px.png
|
398
376
|
- app/assets/images/govuk_publishing_components/crests/org_crest_18px_x2.png
|
399
|
-
- app/assets/images/govuk_publishing_components/crests/portcullis_13px.png
|
400
|
-
- app/assets/images/govuk_publishing_components/crests/portcullis_13px_x2.png
|
401
|
-
- app/assets/images/govuk_publishing_components/crests/portcullis_18px.png
|
402
377
|
- app/assets/images/govuk_publishing_components/crests/portcullis_18px_x2.png
|
403
|
-
- app/assets/images/govuk_publishing_components/crests/so_crest_13px.png
|
404
|
-
- app/assets/images/govuk_publishing_components/crests/so_crest_13px_x2.png
|
405
|
-
- app/assets/images/govuk_publishing_components/crests/so_crest_18px.png
|
406
378
|
- app/assets/images/govuk_publishing_components/crests/so_crest_18px_x2.png
|
407
|
-
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px.png
|
408
|
-
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_13px_x2.png
|
409
|
-
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px.png
|
410
379
|
- app/assets/images/govuk_publishing_components/crests/ukaea_crest_18px_x2.png
|
411
|
-
- app/assets/images/govuk_publishing_components/crests/ukho_13px.png
|
412
|
-
- app/assets/images/govuk_publishing_components/crests/ukho_13px_x2.png
|
413
|
-
- app/assets/images/govuk_publishing_components/crests/ukho_18px.png
|
414
380
|
- app/assets/images/govuk_publishing_components/crests/ukho_18px_x2.png
|
415
|
-
- app/assets/images/govuk_publishing_components/crests/wales_crest_13px.png
|
416
|
-
- app/assets/images/govuk_publishing_components/crests/wales_crest_13px_x2.png
|
417
|
-
- app/assets/images/govuk_publishing_components/crests/wales_crest_18px.png
|
418
381
|
- app/assets/images/govuk_publishing_components/crests/wales_crest_18px_x2.png
|
419
382
|
- app/assets/images/govuk_publishing_components/favicon-development.png
|
420
383
|
- app/assets/images/govuk_publishing_components/favicon-example.png
|
@@ -764,6 +727,7 @@ files:
|
|
764
727
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_document.html.erb
|
765
728
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_generic.html.erb
|
766
729
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_html.html.erb
|
730
|
+
- app/views/govuk_publishing_components/components/attachment/_thumbnail_pdf.html.erb
|
767
731
|
- app/views/govuk_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb
|
768
732
|
- app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
|
769
733
|
- app/views/govuk_publishing_components/components/cross_service_header/_one_login_header.html.erb
|
@@ -1635,7 +1599,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1635
1599
|
- !ruby/object:Gem::Version
|
1636
1600
|
version: '0'
|
1637
1601
|
requirements: []
|
1638
|
-
rubygems_version: 3.5.
|
1602
|
+
rubygems_version: 3.5.9
|
1639
1603
|
signing_key:
|
1640
1604
|
specification_version: 4
|
1641
1605
|
summary: A gem to document components in GOV.UK frontend applications
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|