metadata_presenter 2.18.4 → 2.18.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 378b2d1a132aac2e6e7115c963a5d684c50d2bfd1261f5e4570ded34abccc1dd
4
- data.tar.gz: cd5b3cbe0ae22fc9936e1071ef6bf5bfe17e3e0098b7a9b8388cd39cde29cda5
3
+ metadata.gz: 2d8abb52822dee49505be01d36fcf044cdf1428e5f0b4858c79e955f735b4b85
4
+ data.tar.gz: 0405e28449fd23187d2304811b3c47f782d1b17d901d5bc0ed36d8045f9f59a7
5
5
  SHA512:
6
- metadata.gz: 504b03603fb61cbfd3771620012e7e9650ffed8f862584079cb9d596658f986d45b886da1308cd3ad241f88204fff02fffbb07e9b1ef7aea0057d7f54c270700
7
- data.tar.gz: 556c2bf45a85627d7054b284cdcb946b8b42332db52dba14e14e37d434988037feb9c2195bf48107cdbdaf0a6b60d21718f5620f4091ff97b9fa9b68e4e3c212
6
+ metadata.gz: 37e4e33318dfa07794042dddedc4141e759a1e8dbf7edac35322f4c9633a9b4513dbcd304b8641fc7e70677fdcd66c1f43f01dead8b1b0236061f509bfde9187
7
+ data.tar.gz: 1adf2259573f08bcb44ba00bd6b6e4ffc635332ccc25ff556a50f8cb9d7affe93eb96b43cbd5ca10215385480155f0e69656ef9ebc7ac0a797f94edf14cb307c
@@ -131,7 +131,7 @@ module MetadataPresenter
131
131
  end
132
132
 
133
133
  def editor_preview?
134
- URI(request.original_url).path.split('/').last == 'preview'
134
+ URI(request.original_url).path.split('/').include?('preview')
135
135
  end
136
136
  end
137
137
  end
@@ -1,20 +1,20 @@
1
1
  <% components.each_with_index do |component, index| %>
2
- <div class="fb-editable"
3
- id="<%= component.id %>"
4
- data-fb-content-type="<%= component.type %>"
5
- data-fb-content-id="<%= "page[#{component.collection}[#{index}]]" %>"
6
- data-fb-content-data="<%= component.to_json %>">
2
+ <div class="fb-editable govuk-!-margin-top-8"
3
+ id="<%= component.id %>"
4
+ data-fb-content-type="<%= component.type %>"
5
+ data-fb-content-id="<%= "page[#{component.collection}[#{index}]]" %>"
6
+ data-fb-content-data="<%= component.to_json %>">
7
7
 
8
- <%= render partial: component, locals: {
9
- f: f,
10
- component: component,
11
- component_id: "page[#{component.collection}[#{index}]]",
12
- input_title: main_title(
13
- component: component,
14
- tag: :h2,
15
- classes: classes
16
- )
17
- }
18
- %>
8
+ <%= render partial: component, locals: {
9
+ f: f,
10
+ component: component,
11
+ component_id: "page[#{component.collection}[#{index}]]",
12
+ input_title: main_title(
13
+ component: component,
14
+ tag: :h2,
15
+ classes: classes
16
+ )
17
+ }
18
+ %>
19
19
  </div>
20
20
  <% end %>
@@ -12,7 +12,7 @@
12
12
  f: f,
13
13
  components: @page.components,
14
14
  tag: :h2,
15
- classes: 'govuk-heading-m govuk-!-margin-top-8',
15
+ classes: 'govuk-heading-m',
16
16
  input_components: @page.supported_input_components,
17
17
  content_components: @page.supported_content_components
18
18
  }
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '2.18.4'.freeze
2
+ VERSION = '2.18.6'.freeze
3
3
  end
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: 2.18.4
4
+ version: 2.18.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-17 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder