metadata_presenter 0.26.1 → 0.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/metadata_presenter/application_helper.rb +3 -4
- data/app/views/metadata_presenter/attribute/_body.html.erb +1 -1
- data/app/views/metadata_presenter/component/_content.html.erb +1 -1
- data/app/views/metadata_presenter/page/form.html.erb +1 -1
- data/app/views/metadata_presenter/page/start.html.erb +1 -1
- data/default_metadata/component/content.json +1 -1
- data/default_text/content.json +1 -1
- data/fixtures/version.json +3 -3
- data/lib/metadata_presenter/version.rb +1 -1
- data/schemas/component/content.json +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4048587e07e7a5b2b4919a71d0183200b3f88068377b284a307ad917d1a30add
|
4
|
+
data.tar.gz: 4fb293d2eb67132d9f68b8da4f142847864d748a8a3e4dd1bb93151b327aab0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4110ca082033d1bbdbe271b70942c37b6bb0424d4202874e3016ab96c85d226bb8da432bdc63079918cd544ada93d869add4b45e2d961bf9c0272fc5ba4969ff
|
7
|
+
data.tar.gz: 146b09fa25fc4305b3193b0a932bff1b6846b4d8cf8bf55246b0fc5c01df55b7de41cb701d12f74aab38e365045edb0fd489a78175f7728ef967c363f81084df
|
@@ -6,15 +6,14 @@ module MetadataPresenter
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
-
# Renders
|
9
|
+
# Renders html given markdown.
|
10
10
|
#
|
11
11
|
# @example
|
12
|
-
# <%=
|
12
|
+
# <%=to_html '# Some markdown' %>
|
13
13
|
#
|
14
|
-
def
|
14
|
+
def to_html(text)
|
15
15
|
Kramdown::Document.new(text).to_html.html_safe
|
16
16
|
end
|
17
|
-
alias_method :to_markdown, :m
|
18
17
|
|
19
18
|
def default_text(property)
|
20
19
|
MetadataPresenter::DefaultText[property]
|
@@ -1 +1 @@
|
|
1
|
-
<%=
|
1
|
+
<%= to_html(component.content) %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="govuk-grid-column-two-thirds">
|
4
4
|
<% if @page.body %>
|
5
5
|
<p class="govuk-body-l" data-block-id="<%= @page.id %>" data-block-property="body">
|
6
|
-
<%=
|
6
|
+
<%= to_html(@page.body) %>
|
7
7
|
</p>
|
8
8
|
<%- end %>
|
9
9
|
<%= form_tag(reserved_answers_path, method: :post) do %>
|
data/default_text/content.json
CHANGED
data/fixtures/version.json
CHANGED
@@ -330,7 +330,7 @@
|
|
330
330
|
{
|
331
331
|
"_id": "how-many-lights_content_1",
|
332
332
|
"_type": "content",
|
333
|
-
"
|
333
|
+
"content": "What lights?"
|
334
334
|
}
|
335
335
|
],
|
336
336
|
"url": "how-many-lights"
|
@@ -348,7 +348,7 @@
|
|
348
348
|
{
|
349
349
|
"_id": "check-answers_content_1",
|
350
350
|
"_type": "content",
|
351
|
-
"
|
351
|
+
"content": "Check yourself before you wreck yourself."
|
352
352
|
}
|
353
353
|
],
|
354
354
|
"extra_components": []
|
@@ -365,7 +365,7 @@
|
|
365
365
|
{
|
366
366
|
"_id": "confirmation_content_1",
|
367
367
|
"_type": "content",
|
368
|
-
"
|
368
|
+
"content": "Some day I will be the most powerful Jedi ever!"
|
369
369
|
}
|
370
370
|
]
|
371
371
|
}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"_type": {
|
12
12
|
"const": "content"
|
13
13
|
},
|
14
|
-
"
|
14
|
+
"content": {
|
15
15
|
"title": "Content",
|
16
16
|
"description": "Content to display - use [markdown](https://www.gov.uk/guidance/how-to-publish-on-gov-uk/markdown) to format text or add hyperlinks",
|
17
17
|
"type": "string",
|
@@ -25,6 +25,6 @@
|
|
25
25
|
}
|
26
26
|
],
|
27
27
|
"required": [
|
28
|
-
"
|
28
|
+
"content"
|
29
29
|
]
|
30
30
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metadata_presenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MoJ Online
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_design_system_formbuilder
|