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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b653825d328257b11234319575f8742e666a45f2d8502adf79a1a2896c331f01
4
- data.tar.gz: d9a3fb7541c8cd077ce66ae3b67c3a828ef97faf15719bb5d278a92d7a3f5bab
3
+ metadata.gz: 0c19b02783094e460bc0e7896c3f44a59922aa78fb49ca6e16d159d1b381a2e8
4
+ data.tar.gz: e8c4c046c50f4321d3172602f097aee09cec89501b65cb6769a200acf70e0ed0
5
5
  SHA512:
6
- metadata.gz: 34ba78444c9620972472ad35de61a0090b5653cc585ce4b8bab8c28b09560c61015f8b22a2233f741aaa757bce22214d5c381ab54f47900965b7df0d362781ba
7
- data.tar.gz: 0ecdff6b63586d59599e6cb69720bd73a949cd4be02929e98625e1c1097f2a201067f0453406459ea458dd4f6c813e08a59717c69b93bcd7e97fcfb36268d99c
6
+ metadata.gz: 5754598e51f0cb85d7cbc1b0f3e513a26526e56185c0dc7b465c2f1580e6b62ad9cb1cfea8ca75b6983df0be55a8940d554e3985b788c35cb5de1d36dc4d79ac
7
+ data.tar.gz: 97c001c4bec542177a363ef6e9dcab974437d10042ecf63666339669c4a84bb7c438c2707766d33a536f626d4d70d1005e7a56b76f9611ef2f37cb4cf58e1d57
@@ -1,4 +1,4 @@
1
- <footer class="govuk-footer " role="contentinfo">
1
+ <footer class="govuk-footer fb-editor-footer" role="contentinfo">
2
2
  <div class="govuk-width-container ">
3
3
  <div class="govuk-footer__meta">
4
4
  <div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
@@ -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>
@@ -10,7 +10,7 @@
10
10
  <%- end %>
11
11
 
12
12
  <% if @page.heading %>
13
- <h1 class="fb-editable <%= @page.heading_class %>"
13
+ <h1 class="fb-editable govuk-heading-xl"
14
14
  data-fb-content-id="page[heading]"
15
15
  data-fb-content-type="element">
16
16
  <%= @page.heading.html_safe %>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "_id": "component.content",
3
3
  "_type": "content",
4
- "html": "Content HTML"
4
+ "html": "[Optional content]"
5
5
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_id": "page.content",
3
+ "_type": "page.content",
4
+ "section_heading": "[Optional section heading]",
5
+ "heading": "Title",
6
+ "lede": "[Optional lead paragraph]",
7
+ "body": "[Optional content]",
8
+ "components": [],
9
+ "url": ""
10
+ }
@@ -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",
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '0.17.1'
2
+ VERSION = '0.18.0'
3
3
  end
@@ -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.17.1
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