metadata_presenter 0.16.1 → 0.16.2
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 +2 -4
- data/app/views/metadata_presenter/component/_text.html.erb +6 -8
- data/app/views/metadata_presenter/component/_textarea.html.erb +10 -12
- data/app/views/metadata_presenter/page/singlequestion.html.erb +11 -6
- data/lib/metadata_presenter/version.rb +1 -1
- 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: '09f9fc6e7ed4404617573ba3531101418a53dc43b731dbbd92faeeb95325db28'
|
4
|
+
data.tar.gz: ecf8c3777cebe819ce26bc3bd7ba69dce8b8de1bb5ae450658355935a2e69d9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bf80b5fb3e1d6f0eaed3baa06626d72ebdd4f8e379e332ede82578140b580b7901cd961a0544e63726ed1c9a6d9aaa52af26f4829730fc23e9df6c78c2a950e
|
7
|
+
data.tar.gz: f815e89fcf290f637a7ee38da32a0957bb097f7fe25ffd83612152f8dd70fd3aed8d8d9a00eb18b444399b9f3fe01f60a0295547dc50fd2cc9b4d1a7075b1783
|
@@ -2,10 +2,8 @@ module MetadataPresenter
|
|
2
2
|
module ApplicationHelper
|
3
3
|
def main_title(component:, tag: :h1, classes: 'govuk-heading-xl')
|
4
4
|
if component.legend.present?
|
5
|
-
content_tag(:
|
6
|
-
|
7
|
-
component.legend
|
8
|
-
end
|
5
|
+
content_tag(:h1, class: 'govuk-heading-xl') do
|
6
|
+
component.legend
|
9
7
|
end
|
10
8
|
else
|
11
9
|
content_tag(tag, class: classes) do
|
@@ -1,8 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
%>
|
8
|
-
</div>
|
1
|
+
<%=
|
2
|
+
f.govuk_text_field component.id.to_sym,
|
3
|
+
label: { text: input_title },
|
4
|
+
hint: { text: component.hint },
|
5
|
+
name: "answers[#{component.name}]"
|
6
|
+
%>
|
@@ -1,12 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
%>
|
12
|
-
</div>
|
1
|
+
<%=
|
2
|
+
f.govuk_text_area component.id.to_sym,
|
3
|
+
label: { text: input_title },
|
4
|
+
hint: { text: component.hint },
|
5
|
+
name: "answers[#{component.name}]",
|
6
|
+
max_chars: component.maxchars,
|
7
|
+
max_words: component.maxwords,
|
8
|
+
threshold: component.threshold,
|
9
|
+
rows: component.rows
|
10
|
+
%>
|
@@ -3,13 +3,18 @@
|
|
3
3
|
<div class="govuk-grid-column-two-thirds">
|
4
4
|
<%= form_for @page_answers, as: :answers, url: @page.url, method: :post do |f| %>
|
5
5
|
<%= f.govuk_error_summary %>
|
6
|
+
|
6
7
|
<% @page.components.each_with_index do |component, index| %>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
<div class="fb-editable"
|
9
|
+
data-fb-content-type="<%= component._type %>"
|
10
|
+
data-fb-content-id="<%= "page[components[#{index}]]" %>"
|
11
|
+
data-fb-content-data="<%= component.to_json %>">
|
12
|
+
<%= render partial: component, locals: {
|
13
|
+
component: component,
|
14
|
+
f: f,
|
15
|
+
input_title: main_title(component: component) }
|
16
|
+
%>
|
17
|
+
</div>
|
13
18
|
<% end %>
|
14
19
|
|
15
20
|
<%= f.govuk_submit(disabled: editable?) %>
|
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.16.
|
4
|
+
version: 0.16.2
|
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-03-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|