govuk_publishing_components 29.4.0 → 29.7.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/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +20 -6
- data/app/assets/stylesheets/component_guide/application.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +3 -3
- data/app/controllers/govuk_publishing_components/audit_controller.rb +1 -4
- data/app/models/govuk_publishing_components/audit_components.rb +61 -24
- data/app/views/govuk_publishing_components/audit/_applications.html.erb +8 -3
- data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +82 -0
- data/app/views/govuk_publishing_components/audit/_components.html.erb +2 -47
- data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +1 -1
- data/config/locales/ar.yml +1 -0
- data/config/locales/az.yml +1 -0
- data/config/locales/be.yml +1 -0
- data/config/locales/bg.yml +1 -0
- data/config/locales/bn.yml +1 -0
- data/config/locales/cs.yml +1 -0
- data/config/locales/cy.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/dr.yml +1 -0
- data/config/locales/el.yml +1 -0
- data/config/locales/en.yml +54 -3
- data/config/locales/es-419.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/fa.yml +1 -0
- data/config/locales/fi.yml +1 -0
- data/config/locales/fr.yml +1 -0
- data/config/locales/gd.yml +1 -0
- data/config/locales/gu.yml +1 -0
- data/config/locales/he.yml +1 -0
- data/config/locales/hi.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +1 -0
- data/config/locales/hy.yml +1 -0
- data/config/locales/id.yml +1 -0
- data/config/locales/is.yml +1 -0
- data/config/locales/it.yml +1 -0
- data/config/locales/ja.yml +1 -0
- data/config/locales/ka.yml +1 -0
- data/config/locales/kk.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +1 -0
- data/config/locales/ms.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/config/locales/no.yml +1 -0
- data/config/locales/pa-pk.yml +1 -0
- data/config/locales/pa.yml +1 -0
- data/config/locales/pl.yml +1 -0
- data/config/locales/ps.yml +1 -0
- data/config/locales/pt.yml +1 -0
- data/config/locales/ro.yml +1 -0
- data/config/locales/ru.yml +1 -0
- data/config/locales/si.yml +1 -0
- data/config/locales/sk.yml +1 -0
- data/config/locales/sl.yml +1 -0
- data/config/locales/so.yml +1 -0
- data/config/locales/sq.yml +1 -0
- data/config/locales/sr.yml +1 -0
- data/config/locales/sv.yml +1 -0
- data/config/locales/sw.yml +1 -0
- data/config/locales/ta.yml +1 -0
- data/config/locales/th.yml +1 -0
- data/config/locales/tk.yml +1 -0
- data/config/locales/tr.yml +1 -0
- data/config/locales/uk.yml +1 -0
- data/config/locales/ur.yml +1 -0
- data/config/locales/uz.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-hk.yml +1 -0
- data/config/locales/zh-tw.yml +1 -0
- data/config/locales/zh.yml +1 -0
- data/lib/govuk_publishing_components/presenters/{attachment.rb → attachment_helper.rb} +6 -3
- data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +18 -289
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b74221682d0047e390f314e968edf8acd3b89efebfe41d833239d9ca44413c86
|
|
4
|
+
data.tar.gz: 1f87c5a4288b2a69da1e32598422162bc5017f2dab4ac577b326b582cbd9e8e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14d60ae3e9876edbbcac836010f6dbfd1655c3be4798119f79ac064cb70cfef71a612694d7b31ae6475c31f9813ca9d7775fb1ab3b3153707643bd61190e057d
|
|
7
|
+
data.tar.gz: 4e69c991fd6db0d47136d6a7e489fd516e1aa9c62b1422ccf87ed35164e7f6641a60fd64392281f5c99b84c4b9caef8be78bbd73faa922b604d27c227ec7080f
|
|
@@ -51,6 +51,16 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
51
51
|
// giving the table a class of mc-stacked
|
|
52
52
|
this.options.stacked = this.$table.classList.contains('mc-stacked')
|
|
53
53
|
|
|
54
|
+
// stacked charts require tables to use the th element in the table header
|
|
55
|
+
// if the th element is not included, then the ENABLED flag is set to false
|
|
56
|
+
// this will stop the chart and toggleLink from being rendered
|
|
57
|
+
if (this.options.stacked) {
|
|
58
|
+
var allTheTHsInTableHead = this.$table.querySelectorAll('thead th')
|
|
59
|
+
if (allTheTHsInTableHead.length === 0) {
|
|
60
|
+
this.ENABLED = false
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
54
64
|
// set the negative option based on
|
|
55
65
|
// giving the table a class of mc-negative
|
|
56
66
|
this.options.negative = this.$table.classList.contains('mc-negative')
|
|
@@ -106,12 +116,16 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
|
106
116
|
|
|
107
117
|
MagnaCharta.prototype.apply = function () {
|
|
108
118
|
if (this.ENABLED) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
try {
|
|
120
|
+
this.constructChart()
|
|
121
|
+
this.addClassesToHeader()
|
|
122
|
+
this.applyWidths()
|
|
123
|
+
this.insert()
|
|
124
|
+
this.$table.classList.add('mc-hidden')
|
|
125
|
+
this.applyOutdent()
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error('MagnaCharta error:', error)
|
|
128
|
+
}
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "govuk/components/checkboxes/checkboxes";
|
|
2
2
|
|
|
3
3
|
.govuk-checkboxes--nested {
|
|
4
|
-
margin-left: -(govuk-spacing(4) + 2px); //22px
|
|
4
|
+
margin-left: -(govuk-spacing(4) + 2px); // 22px
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
border-left-style: solid;
|
|
7
7
|
border-left-width: 4px;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.govuk-checkboxes__conditional {
|
|
19
19
|
margin-top: govuk-spacing(2);
|
|
20
|
-
margin-left: -(govuk-spacing(4) + 2px); //22px
|
|
20
|
+
margin-left: -(govuk-spacing(4) + 2px); // 22px
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.gem-c-checkboxes__list {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
.gem-c-contextual-sidebar__cta {
|
|
20
20
|
border-top: 2px solid $govuk-brand-colour;
|
|
21
21
|
margin-bottom: govuk-spacing(6);
|
|
22
|
-
background-color: govuk-colour(
|
|
22
|
+
background-color: govuk-colour("light-grey", $legacy: "grey-4");
|
|
23
23
|
display: block;
|
|
24
24
|
padding: 0 govuk-spacing(3) govuk-spacing(3);
|
|
25
25
|
text-decoration: none;
|
|
@@ -9,7 +9,7 @@ $pseudo-underline-height: 3px;
|
|
|
9
9
|
$button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
|
|
10
10
|
|
|
11
11
|
@mixin chevron($colour, $update: false) {
|
|
12
|
-
@if
|
|
12
|
+
@if $update == true {
|
|
13
13
|
border-bottom-color: $colour;
|
|
14
14
|
border-right-color: $colour;
|
|
15
15
|
} @else {
|
|
@@ -816,7 +816,7 @@ $button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
|
|
|
816
816
|
|
|
817
817
|
.gem-c-layout-super-navigation-header__navigation-second-items--topics {
|
|
818
818
|
@include govuk-media-query($from: "desktop") {
|
|
819
|
-
@include columns($items:
|
|
819
|
+
@include columns($items: 16, $columns: 2, $selector: "li", $flow: column);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
.gem-c-organisation-logo__name {
|
|
56
56
|
position: relative;
|
|
57
57
|
top: 3px;
|
|
58
|
-
font-family:
|
|
58
|
+
font-family: HelveticaNeue, "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.gem-c-organisation-logo__link {
|
|
62
62
|
@include govuk-link-common;
|
|
63
63
|
@include govuk-link-style-text;
|
|
64
|
-
font-family:
|
|
64
|
+
font-family: HelveticaNeue, "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
65
65
|
|
|
66
66
|
&:hover {
|
|
67
67
|
color: $govuk-link-hover-colour;
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.gem-c-reorderable-list__item--chosen {
|
|
22
|
-
background-color: govuk-colour(
|
|
22
|
+
background-color: govuk-colour("light-grey");
|
|
23
23
|
outline: 2px dotted $govuk-border-colour;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.gem-c-reorderable-list__item--drag {
|
|
27
|
-
background-color: govuk-colour(
|
|
27
|
+
background-color: govuk-colour("white");
|
|
28
28
|
list-style-type: none;
|
|
29
29
|
|
|
30
30
|
.gem-c-reorderable-list__actions {
|
|
@@ -76,7 +76,7 @@ $large-input-size: 50px;
|
|
|
76
76
|
padding: govuk-em(6, 16);
|
|
77
77
|
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
|
|
78
78
|
background: govuk-colour("white");
|
|
79
|
-
border-radius: 0; //otherwise iphones apply an automatic border radius
|
|
79
|
+
border-radius: 0; // otherwise iphones apply an automatic border radius
|
|
80
80
|
box-sizing: border-box;
|
|
81
81
|
-webkit-appearance: none;
|
|
82
82
|
-moz-appearance: none;
|
|
@@ -160,7 +160,7 @@ $large-input-size: 50px;
|
|
|
160
160
|
background: govuk-colour("white");
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
//general class applied to search input and button wrapper
|
|
163
|
+
// general class applied to search input and button wrapper
|
|
164
164
|
.gem-c-search__item {
|
|
165
165
|
position: relative;
|
|
166
166
|
display: table-cell;
|
|
@@ -3,7 +3,7 @@ $number-circle-size: 30px;
|
|
|
3
3
|
$number-circle-size-large: 35px;
|
|
4
4
|
$top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
|
|
5
5
|
|
|
6
|
-
@mixin step-nav-vertical-line
|
|
6
|
+
@mixin step-nav-vertical-line($line-style: solid) {
|
|
7
7
|
content: "";
|
|
8
8
|
position: absolute;
|
|
9
9
|
z-index: 2;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
@import "components/helpers/govuk-frontend-settings";
|
|
4
4
|
@import "govuk/base";
|
|
5
5
|
|
|
6
|
-
@import
|
|
6
|
+
@import "components/mixins/margins";
|
|
7
7
|
// TODO: remove this focus override when govuk_template is no longer used
|
|
8
|
-
@import
|
|
9
|
-
@import
|
|
8
|
+
@import "components/mixins/govuk-template-link-focus-override";
|
|
9
|
+
@import "components/mixins/css3";
|
|
10
10
|
|
|
11
11
|
$gem-secondary-button-colour: #00823b;
|
|
12
12
|
$gem-secondary-button-hover-colour: darken($gem-secondary-button-colour, 5%);
|
|
@@ -13,8 +13,6 @@ module GovukPublishingComponents
|
|
|
13
13
|
frontend
|
|
14
14
|
government-frontend
|
|
15
15
|
govspeak-preview
|
|
16
|
-
govuk-account-manager-prototype
|
|
17
|
-
govuk-coronavirus-vulnerable-people-form
|
|
18
16
|
info-frontend
|
|
19
17
|
licence-finder
|
|
20
18
|
manuals-frontend
|
|
@@ -32,10 +30,9 @@ module GovukPublishingComponents
|
|
|
32
30
|
gem_path = Gem.loaded_specs["govuk_publishing_components"].full_gem_path
|
|
33
31
|
gem_path = Dir.pwd if ENV["MAIN_COMPONENT_GUIDE"]
|
|
34
32
|
host_dir = File.expand_path("..")
|
|
35
|
-
path = File.expand_path("..", gem_path)
|
|
36
33
|
|
|
37
34
|
@in_application = false
|
|
38
|
-
@in_application = true unless
|
|
35
|
+
@in_application = true unless ENV["MAIN_COMPONENT_GUIDE"]
|
|
39
36
|
|
|
40
37
|
components = AuditComponents.new(gem_path, false)
|
|
41
38
|
applications = analyse_applications(host_dir, application_dirs)
|
|
@@ -12,29 +12,40 @@ module GovukPublishingComponents
|
|
|
12
12
|
private
|
|
13
13
|
|
|
14
14
|
def compile_data(path, simple)
|
|
15
|
+
# simple is used to reduce effort (and therefore page load time) required
|
|
16
|
+
# when loading auditing summary on the main component guide page
|
|
15
17
|
@simple = simple
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
|
|
19
|
+
# paths to key file locations
|
|
20
|
+
@templates_path = "app/views/govuk_publishing_components/components"
|
|
21
|
+
@stylesheets_path = "app/assets/stylesheets/govuk_publishing_components/components"
|
|
22
|
+
@print_stylesheets_path = "app/assets/stylesheets/govuk_publishing_components/components/print"
|
|
23
|
+
@javascripts_path = "app/assets/javascripts/govuk_publishing_components/components"
|
|
24
|
+
@tests_path = "spec/components"
|
|
25
|
+
@js_tests_path = "spec/javascripts/components"
|
|
26
|
+
@helpers_path = "lib/govuk_publishing_components/presenters"
|
|
27
|
+
|
|
28
|
+
# get all files in key file locations
|
|
29
|
+
templates = Dir["#{path}/#{@templates_path}/*.erb"]
|
|
30
|
+
stylesheets = Dir["#{path}/#{@stylesheets_path}/*.scss"]
|
|
31
|
+
print_stylesheets = Dir["#{path}/#{@print_stylesheets_path}/*.scss"]
|
|
32
|
+
javascripts = Dir["#{path}/#{@javascripts_path}/*.js"]
|
|
33
|
+
tests = Dir["#{path}/#{@tests_path}/*.rb"]
|
|
34
|
+
js_tests = Dir["#{path}/#{@js_tests_path}/*.js"]
|
|
35
|
+
helpers = Dir["#{path}/#{@helpers_path}/*_helper.rb"]
|
|
36
|
+
|
|
37
|
+
@templates_full_path = "#{path}/#{@templates_path}/"
|
|
38
|
+
|
|
39
|
+
# find the cleaned names of components in key file locations
|
|
40
|
+
# i.e. will show that 'component name' has a stylesheet
|
|
41
|
+
# standardised like this to be used later for easier comparison
|
|
42
|
+
@components = clean_files(templates, [path, @templates_path].join("/"))
|
|
43
|
+
@component_stylesheets = clean_files(stylesheets, [path, @stylesheets_path].join("/"))
|
|
44
|
+
@component_print_stylesheets = clean_files(print_stylesheets, [path, @print_stylesheets_path].join("/"))
|
|
45
|
+
@component_javascripts = clean_files(javascripts, [path, @javascripts_path].join("/"))
|
|
46
|
+
@component_tests = clean_files(tests, [path, @tests_path].join("/"))
|
|
47
|
+
@component_js_tests = clean_files(js_tests, [path, @js_tests_path].join("/"))
|
|
48
|
+
@component_helpers = clean_files(helpers, [path, @helpers_path].join("/"))
|
|
38
49
|
|
|
39
50
|
{
|
|
40
51
|
gem_found: true,
|
|
@@ -44,12 +55,13 @@ module GovukPublishingComponents
|
|
|
44
55
|
component_javascripts: @component_javascripts,
|
|
45
56
|
component_tests: @component_tests,
|
|
46
57
|
component_js_tests: @component_js_tests,
|
|
58
|
+
component_helpers: @component_helpers,
|
|
47
59
|
components_containing_components: find_all_partials_in(templates),
|
|
48
60
|
component_listing: list_all_component_details,
|
|
49
61
|
}
|
|
50
62
|
end
|
|
51
63
|
|
|
52
|
-
def
|
|
64
|
+
def clean_files(files, replace)
|
|
53
65
|
files.map { |file| clean_file_name(file.gsub(replace, "")) }.sort
|
|
54
66
|
end
|
|
55
67
|
|
|
@@ -61,6 +73,7 @@ module GovukPublishingComponents
|
|
|
61
73
|
.gsub(".js", "")
|
|
62
74
|
.gsub("spec", "")
|
|
63
75
|
.gsub(".rb", "")
|
|
76
|
+
.gsub("helper", "")
|
|
64
77
|
.strip
|
|
65
78
|
end
|
|
66
79
|
|
|
@@ -72,11 +85,14 @@ module GovukPublishingComponents
|
|
|
72
85
|
.tr('\"\'', "")
|
|
73
86
|
end
|
|
74
87
|
|
|
88
|
+
# create link to component guide page for a given component e.g. 'component name'
|
|
75
89
|
def get_component_link(component)
|
|
76
90
|
"/component-guide/#{component.gsub(' ', '_')}"
|
|
77
91
|
end
|
|
78
92
|
|
|
79
93
|
def find_all_partials_in(templates)
|
|
94
|
+
return [] if @simple
|
|
95
|
+
|
|
80
96
|
components = []
|
|
81
97
|
|
|
82
98
|
templates.each do |template|
|
|
@@ -142,6 +158,7 @@ module GovukPublishingComponents
|
|
|
142
158
|
javascript: check_component_has("javascript", component),
|
|
143
159
|
tests: check_component_has("test", component),
|
|
144
160
|
js_tests: check_component_has("js_test", component),
|
|
161
|
+
helper: check_component_has("helper", component),
|
|
145
162
|
}
|
|
146
163
|
end
|
|
147
164
|
|
|
@@ -154,8 +171,28 @@ module GovukPublishingComponents
|
|
|
154
171
|
look_in = @component_javascripts if a_thing == "javascript"
|
|
155
172
|
look_in = @component_tests if a_thing == "test"
|
|
156
173
|
look_in = @component_js_tests if a_thing == "js_test"
|
|
174
|
+
look_in = @component_helpers if a_thing == "helper"
|
|
175
|
+
|
|
176
|
+
if look_in.include?(component)
|
|
177
|
+
return get_asset_link(a_thing, component)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
false
|
|
181
|
+
end
|
|
157
182
|
|
|
158
|
-
|
|
183
|
+
def get_asset_link(a_thing, component)
|
|
184
|
+
url = "https://github.com/alphagov"
|
|
185
|
+
repo = "govuk_publishing_components"
|
|
186
|
+
blob = "blob/main"
|
|
187
|
+
link = nil
|
|
188
|
+
link = "#{url}/#{repo}/#{blob}/#{@stylesheets_path}/_#{component.gsub(' ', '-')}.scss" if a_thing == "stylesheet"
|
|
189
|
+
link = "#{url}/#{repo}/#{blob}/#{@print_stylesheets_path}/_#{component.gsub(' ', '-')}.scss" if a_thing == "print_stylesheet"
|
|
190
|
+
link = "#{url}/#{repo}/#{blob}/#{@javascripts_path}/#{component.gsub(' ', '-')}.js" if a_thing == "javascript"
|
|
191
|
+
link = "#{url}/#{repo}/#{blob}/#{@tests_path}/#{component.gsub(' ', '_')}_spec.rb" if a_thing == "test"
|
|
192
|
+
link = "#{url}/#{repo}/#{blob}/#{@js_tests_path}/#{component.gsub(' ', '-')}-spec.js" if a_thing == "js_test"
|
|
193
|
+
link = "#{url}/#{repo}/#{blob}/#{@helpers_path}/#{component.gsub(' ', '_')}_helper.rb" if a_thing == "helper"
|
|
194
|
+
|
|
195
|
+
link
|
|
159
196
|
end
|
|
160
197
|
end
|
|
161
198
|
end
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
<% accordion_content = capture do %>
|
|
34
34
|
<% if application[:application_found] %>
|
|
35
|
+
<% github_link = 'https://github.com/alphagov/' + application[:name] + '/blob/main/' %>
|
|
35
36
|
<% application[:warnings].each do |warning| %>
|
|
36
37
|
<p class="govuk-body">
|
|
37
38
|
<strong class="govuk-tag">Warn</strong>
|
|
@@ -74,7 +75,9 @@
|
|
|
74
75
|
<p class="govuk-body">This shows instances of `gem-c-` classes found in the application. If a reference is found in a stylesheet or in code a warning is created, as this could be a style override or hard coded component markup.</p>
|
|
75
76
|
<ul class="govuk-list govuk-list--bullet">
|
|
76
77
|
<% application[:gem_style_references].each do |ref| %>
|
|
77
|
-
<li
|
|
78
|
+
<li>
|
|
79
|
+
<%= link_to ref, github_link + ref, class: 'govuk-link' %>
|
|
80
|
+
</li>
|
|
78
81
|
<% end %>
|
|
79
82
|
</ul>
|
|
80
83
|
<% end %>
|
|
@@ -86,10 +89,12 @@
|
|
|
86
89
|
margin_bottom: 4,
|
|
87
90
|
heading_level: 3,
|
|
88
91
|
} %>
|
|
89
|
-
<p class="govuk-body">This shows JavaScript files that might contain jQuery, which we are trying to remove
|
|
92
|
+
<p class="govuk-body">This shows JavaScript files that might contain jQuery, which we are trying to remove.</p>
|
|
90
93
|
<ul class="govuk-list govuk-list--bullet">
|
|
91
94
|
<% application[:jquery_references].each do |ref| %>
|
|
92
|
-
<li
|
|
95
|
+
<li>
|
|
96
|
+
<%= link_to ref, github_link + ref, class: 'govuk-link' %>
|
|
97
|
+
</li>
|
|
93
98
|
<% end %>
|
|
94
99
|
</ul>
|
|
95
100
|
<% end %>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<%
|
|
2
|
+
total_components = components.length
|
|
3
|
+
components_with_stylesheet = 0
|
|
4
|
+
components_with_print_stylesheet = 0
|
|
5
|
+
components_with_javascript = 0
|
|
6
|
+
components_with_test = 0
|
|
7
|
+
components_with_javascript_test = 0
|
|
8
|
+
components_with_helper = 0
|
|
9
|
+
|
|
10
|
+
components.each do |component|
|
|
11
|
+
components_with_stylesheet += 1 if component[:stylesheet]
|
|
12
|
+
components_with_print_stylesheet += 1 if component[:print_stylesheet]
|
|
13
|
+
components_with_javascript += 1 if component[:javascript]
|
|
14
|
+
components_with_test += 1 if component[:tests]
|
|
15
|
+
components_with_javascript_test += 1 if component[:js_tests]
|
|
16
|
+
components_with_helper += 1 if component[:helper]
|
|
17
|
+
end
|
|
18
|
+
%>
|
|
19
|
+
<table class="govuk-table">
|
|
20
|
+
<thead class="govuk-table__head">
|
|
21
|
+
<tr class="govuk-table__row">
|
|
22
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Component (<%= total_components %>)</th>
|
|
23
|
+
<th scope="col" class="govuk-table__header sticky-table-header">CSS (<%= components_with_stylesheet %>)</th>
|
|
24
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Print CSS (<%= components_with_print_stylesheet %>)</th>
|
|
25
|
+
<th scope="col" class="govuk-table__header sticky-table-header">JS (<%= components_with_javascript %>)</th>
|
|
26
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Test (<%= components_with_test %>)</th>
|
|
27
|
+
<th scope="col" class="govuk-table__header sticky-table-header">JS test (<%= components_with_javascript_test %>)</th>
|
|
28
|
+
<th scope="col" class="govuk-table__header sticky-table-header">Helper (<%= components_with_helper %>)</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody class="govuk-table__body">
|
|
32
|
+
<% components.each do |component| %>
|
|
33
|
+
<tr class="govuk-table__row">
|
|
34
|
+
<th scope="row" class="govuk-table__header">
|
|
35
|
+
<a href="<%= component[:link] %>" class="govuk-link"><%= component[:name] %></a>
|
|
36
|
+
</th>
|
|
37
|
+
<td class="govuk-table__cell">
|
|
38
|
+
<% if component[:stylesheet] %>
|
|
39
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
40
|
+
<a href="<%= component[:stylesheet] %>" class="govuk-link">Yes</a>
|
|
41
|
+
</strong>
|
|
42
|
+
<% end %>
|
|
43
|
+
</td>
|
|
44
|
+
<td class="govuk-table__cell">
|
|
45
|
+
<% if component[:print_stylesheet] %>
|
|
46
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
47
|
+
<a href="<%= component[:print_stylesheet] %>" class="govuk-link">Yes</a>
|
|
48
|
+
</strong>
|
|
49
|
+
<% end %>
|
|
50
|
+
</td>
|
|
51
|
+
<td class="govuk-table__cell">
|
|
52
|
+
<% if component[:javascript] %>
|
|
53
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
54
|
+
<a href="<%= component[:javascript] %>" class="govuk-link">Yes</a>
|
|
55
|
+
</strong>
|
|
56
|
+
<% end %>
|
|
57
|
+
</td>
|
|
58
|
+
<td class="govuk-table__cell">
|
|
59
|
+
<% if component[:tests] %>
|
|
60
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
61
|
+
<a href="<%= component[:tests] %>" class="govuk-link">Yes</a>
|
|
62
|
+
</strong>
|
|
63
|
+
<% end %>
|
|
64
|
+
</td>
|
|
65
|
+
<td class="govuk-table__cell">
|
|
66
|
+
<% if component[:js_tests] %>
|
|
67
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
68
|
+
<a href="<%= component[:js_tests] %>" class="govuk-link">Yes</a>
|
|
69
|
+
</strong>
|
|
70
|
+
<% end %>
|
|
71
|
+
</td>
|
|
72
|
+
<td class="govuk-table__cell">
|
|
73
|
+
<% if component[:helper] %>
|
|
74
|
+
<strong class="govuk-tag govuk-tag--green">
|
|
75
|
+
<a href="<%= component[:helper] %>" class="govuk-link">Yes</a>
|
|
76
|
+
</strong>
|
|
77
|
+
<% end %>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
<% end %>
|
|
81
|
+
</tbody>
|
|
82
|
+
</table>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if @other_applications %>
|
|
2
2
|
<%= render "govuk_publishing_components/components/heading", {
|
|
3
|
-
text: "Components",
|
|
3
|
+
text: "Components in the gem",
|
|
4
4
|
font_size: "l",
|
|
5
5
|
margin_bottom: 6,
|
|
6
6
|
} %>
|
|
@@ -10,52 +10,7 @@
|
|
|
10
10
|
<% component_items = [] %>
|
|
11
11
|
|
|
12
12
|
<% component_files = capture do %>
|
|
13
|
-
|
|
14
|
-
<thead class="govuk-table__head">
|
|
15
|
-
<tr class="govuk-table__row">
|
|
16
|
-
<th scope="col" class="govuk-table__header sticky-table-header">Component</th>
|
|
17
|
-
<th scope="col" class="govuk-table__header sticky-table-header">Stylesheet</th>
|
|
18
|
-
<th scope="col" class="govuk-table__header sticky-table-header">Print stylesheet</th>
|
|
19
|
-
<th scope="col" class="govuk-table__header sticky-table-header">JS</th>
|
|
20
|
-
<th scope="col" class="govuk-table__header sticky-table-header">Test</th>
|
|
21
|
-
<th scope="col" class="govuk-table__header sticky-table-header">JS test</th>
|
|
22
|
-
</tr>
|
|
23
|
-
</thead>
|
|
24
|
-
<tbody class="govuk-table__body">
|
|
25
|
-
<% @components[:component_listing].each do |component| %>
|
|
26
|
-
<tr class="govuk-table__row">
|
|
27
|
-
<th scope="row" class="govuk-table__header">
|
|
28
|
-
<a href="<%= component[:link] %>" class="govuk-link"><%= component[:name] %></a>
|
|
29
|
-
</th>
|
|
30
|
-
<td class="govuk-table__cell">
|
|
31
|
-
<% if component[:stylesheet] %>
|
|
32
|
-
<strong class="govuk-tag govuk-tag--green">Yes</strong>
|
|
33
|
-
<% end %>
|
|
34
|
-
</td>
|
|
35
|
-
<td class="govuk-table__cell">
|
|
36
|
-
<% if component[:print_stylesheet] %>
|
|
37
|
-
<strong class="govuk-tag govuk-tag--green">Yes</strong>
|
|
38
|
-
<% end %>
|
|
39
|
-
</td>
|
|
40
|
-
<td class="govuk-table__cell">
|
|
41
|
-
<% if component[:javascript] %>
|
|
42
|
-
<strong class="govuk-tag govuk-tag--green">Yes</strong>
|
|
43
|
-
<% end %>
|
|
44
|
-
</td>
|
|
45
|
-
<td class="govuk-table__cell">
|
|
46
|
-
<% if component[:tests] %>
|
|
47
|
-
<strong class="govuk-tag govuk-tag--green">Yes</strong>
|
|
48
|
-
<% end %>
|
|
49
|
-
</td>
|
|
50
|
-
<td class="govuk-table__cell">
|
|
51
|
-
<% if component[:js_tests] %>
|
|
52
|
-
<strong class="govuk-tag govuk-tag--green">Yes</strong>
|
|
53
|
-
<% end %>
|
|
54
|
-
</td>
|
|
55
|
-
</tr>
|
|
56
|
-
<% end %>
|
|
57
|
-
</tbody>
|
|
58
|
-
</table>
|
|
13
|
+
<%= render partial: "component_contents", locals: { components: @components[:component_listing] } %>
|
|
59
14
|
<% end %>
|
|
60
15
|
|
|
61
16
|
<%
|
data/config/locales/ar.yml
CHANGED
|
@@ -87,6 +87,7 @@ ar:
|
|
|
87
87
|
layout_footer:
|
|
88
88
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© حقوق نشر التاج الملكي</a>
|
|
89
89
|
licence_html: كل المحتوى متاح بموجب <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">الترخيص الحكومي المفتوح (الإصدار v3.0)</a>، ما لم ينص على خلاف ذلك
|
|
90
|
+
navigation_links:
|
|
90
91
|
support_links: روابط الدعم
|
|
91
92
|
layout_for_public:
|
|
92
93
|
account_layout:
|
data/config/locales/az.yml
CHANGED
|
@@ -83,6 +83,7 @@ az:
|
|
|
83
83
|
layout_footer:
|
|
84
84
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
|
85
85
|
licence_html: Bütün məzmunlar <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">v3.0 Açıq dövlət lisenziyasına əsasən mövcuddur</a>(başqa cür nəzərdə tutulmuş hallar istisna olmaqla)
|
|
86
|
+
navigation_links:
|
|
86
87
|
support_links: Dəstək keçidləri
|
|
87
88
|
layout_for_public:
|
|
88
89
|
account_layout:
|
data/config/locales/be.yml
CHANGED
|
@@ -90,6 +90,7 @@ be:
|
|
|
90
90
|
layout_footer:
|
|
91
91
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
|
92
92
|
licence_html: Увесь змест даступны <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, калі не паказана іншае
|
|
93
|
+
navigation_links:
|
|
93
94
|
support_links: Дапаможныя спасылкі
|
|
94
95
|
layout_for_public:
|
|
95
96
|
account_layout:
|
data/config/locales/bg.yml
CHANGED
|
@@ -88,6 +88,7 @@ bg:
|
|
|
88
88
|
layout_footer:
|
|
89
89
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
|
90
90
|
licence_html: Цялото съдържание е налично на <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, освен ако не е посочено друго
|
|
91
|
+
navigation_links:
|
|
91
92
|
support_links: Помощни линкове
|
|
92
93
|
layout_for_public:
|
|
93
94
|
account_layout:
|
data/config/locales/bn.yml
CHANGED
|
@@ -85,6 +85,7 @@ bn:
|
|
|
85
85
|
layout_footer:
|
|
86
86
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© ক্রাউন কপিরাইট</a>
|
|
87
87
|
licence_html: শুধুমাত্র অন্যভাবে বর্ণিত থাকা ছাড়া, সকল তথ্য <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">ওপেন গভর্নমেন্ট লাইসেন্স v3.0</a>-এর অধীনে উপলভ্য
|
|
88
|
+
navigation_links:
|
|
88
89
|
support_links: সহায়তার লিংক
|
|
89
90
|
layout_for_public:
|
|
90
91
|
account_layout:
|
data/config/locales/cs.yml
CHANGED
|
@@ -89,6 +89,7 @@ cs:
|
|
|
89
89
|
layout_footer:
|
|
90
90
|
copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
|
|
91
91
|
licence_html: Veškerý obsah je k dispozici pod <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, pokud není uvedeno jinak
|
|
92
|
+
navigation_links:
|
|
92
93
|
support_links: Odkazy na podporu
|
|
93
94
|
layout_for_public:
|
|
94
95
|
account_layout:
|