metadata_presenter 0.17.1 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/metadata_presenter/footer/footer.html.erb +1 -1
- data/app/views/metadata_presenter/page/content.html.erb +56 -0
- data/app/views/metadata_presenter/page/start.html.erb +1 -1
- data/default_metadata/component/content.json +1 -1
- data/default_metadata/page/content.json +10 -0
- data/fixtures/version.json +10 -0
- data/lib/metadata_presenter/version.rb +1 -1
- data/schemas/page/content.json +23 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c19b02783094e460bc0e7896c3f44a59922aa78fb49ca6e16d159d1b381a2e8
|
4
|
+
data.tar.gz: e8c4c046c50f4321d3172602f097aee09cec89501b65cb6769a200acf70e0ed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5754598e51f0cb85d7cbc1b0f3e513a26526e56185c0dc7b465c2f1580e6b62ad9cb1cfea8ca75b6983df0be55a8940d554e3985b788c35cb5de1d36dc4d79ac
|
7
|
+
data.tar.gz: 97c001c4bec542177a363ef6e9dcab974437d10042ecf63666339669c4a84bb7c438c2707766d33a536f626d4d70d1005e7a56b76f9611ef2f37cb4cf58e1d57
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div class="fb-main-grid-wrapper" data-fb-pagetype="<%= @page.type %>">
|
2
|
+
<div class="govuk-grid-row">
|
3
|
+
<div class="govuk-grid-column-two-thirds">
|
4
|
+
<% if @page.section_heading -%>
|
5
|
+
<p class="fb-editable govuk-caption-l fb-section_heading"
|
6
|
+
data-fb-content-type="element"
|
7
|
+
data-fb-content-id="page[section_heading]">
|
8
|
+
<%= @page.section_heading.html_safe %>
|
9
|
+
</p>
|
10
|
+
<%- end %>
|
11
|
+
|
12
|
+
<% if @page.heading %>
|
13
|
+
<h1 class="fb-editable govuk-heading-xl"
|
14
|
+
data-fb-content-id="page[heading]"
|
15
|
+
data-fb-content-type="element">
|
16
|
+
<%= @page.heading.html_safe %>
|
17
|
+
</h1>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if @page.lede %>
|
21
|
+
<div class="fb-editable"
|
22
|
+
data-fb-content-id="page[lede]"
|
23
|
+
data-fb-content-type="content">
|
24
|
+
<%= @page.lede.html_safe %>
|
25
|
+
</div>
|
26
|
+
<%- end %>
|
27
|
+
|
28
|
+
<% if @page.body %>
|
29
|
+
<div class="fb-editable"
|
30
|
+
data-fb-content-id="page[body]"
|
31
|
+
data-fb-content-type="content">
|
32
|
+
<%= to_markdown(@page.body) %>
|
33
|
+
</div>
|
34
|
+
<%- end %>
|
35
|
+
|
36
|
+
<%= form_for @page_answers, as: :answers, url: @page.url, method: :post do |f| %>
|
37
|
+
<%= f.govuk_error_summary %>
|
38
|
+
|
39
|
+
<% @page.components.each_with_index do |component, index| %>
|
40
|
+
<div class="fb-editable"
|
41
|
+
data-fb-content-type="<%= component._type %>"
|
42
|
+
data-fb-content-id="<%= "page[components[#{index}]]" %>"
|
43
|
+
data-fb-content-data="<%= component.to_json %>">
|
44
|
+
<%= render partial: component, locals: {
|
45
|
+
component: component,
|
46
|
+
f: f,
|
47
|
+
input_title: main_title(component: component) }
|
48
|
+
%>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<%= f.govuk_submit(disabled: editable?) %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
data/fixtures/version.json
CHANGED
@@ -319,6 +319,16 @@
|
|
319
319
|
"section_heading": "That's no moon",
|
320
320
|
"url": "/star-wars-knowledge"
|
321
321
|
},
|
322
|
+
{
|
323
|
+
"_uuid": "1ed3e4ad-5098-41c9-b4b6-426e89f7804e",
|
324
|
+
"_id": "page.how-many-lights",
|
325
|
+
"_type": "page.content",
|
326
|
+
"section_heading": "Chain of Command",
|
327
|
+
"heading": "Tell me how many lights you see",
|
328
|
+
"body": "There are four lights!",
|
329
|
+
"components": [],
|
330
|
+
"url": "how-many-lights"
|
331
|
+
},
|
322
332
|
{
|
323
333
|
"_uuid": "e819d0c2-7062-4997-89cf-44d26d098404",
|
324
334
|
"_id": "page._check-answers",
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"$id": "http://gov.uk/schema/v1.0.0/page/content",
|
3
|
+
"_name": "page.content",
|
4
|
+
"title": "Content",
|
5
|
+
"description": "Display content to users without asking any questions",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"_type": {
|
9
|
+
"const": "page.content"
|
10
|
+
}
|
11
|
+
},
|
12
|
+
"allOf": [
|
13
|
+
{
|
14
|
+
"$ref": "definition.page.content"
|
15
|
+
}
|
16
|
+
],
|
17
|
+
"uiCategory": {
|
18
|
+
"main": [
|
19
|
+
"lede",
|
20
|
+
"body"
|
21
|
+
]
|
22
|
+
}
|
23
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metadata_presenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MoJ Online
|
@@ -260,6 +260,7 @@ files:
|
|
260
260
|
- app/views/metadata_presenter/header/show.html.erb
|
261
261
|
- app/views/metadata_presenter/page/checkanswers.html.erb
|
262
262
|
- app/views/metadata_presenter/page/confirmation.html.erb
|
263
|
+
- app/views/metadata_presenter/page/content.html.erb
|
263
264
|
- app/views/metadata_presenter/page/form.html.erb
|
264
265
|
- app/views/metadata_presenter/page/multiplequestions.html.erb
|
265
266
|
- app/views/metadata_presenter/page/singlequestion.html.erb
|
@@ -280,6 +281,7 @@ files:
|
|
280
281
|
- default_metadata/definition/radio.json
|
281
282
|
- default_metadata/page/checkanswers.json
|
282
283
|
- default_metadata/page/confirmation.json
|
284
|
+
- default_metadata/page/content.json
|
283
285
|
- default_metadata/page/multiplequestions.json
|
284
286
|
- default_metadata/page/singlequestion.json
|
285
287
|
- default_metadata/page/start.json
|
@@ -346,6 +348,7 @@ files:
|
|
346
348
|
- schemas/link/link.json
|
347
349
|
- schemas/page/checkanswers.json
|
348
350
|
- schemas/page/confirmation.json
|
351
|
+
- schemas/page/content.json
|
349
352
|
- schemas/page/multiplequestions.json
|
350
353
|
- schemas/page/singlequestion.json
|
351
354
|
- schemas/page/start.json
|