metadata_presenter 2.19.5 → 2.20.1

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: f0d20b5161033659492619628a0c1f26c1a69926193dbea87353a1b3a2a0a984
4
- data.tar.gz: 15940e4f5bbf2656108d89a589535635d31bd2f8f813855b628ee67e4ef9ddf1
3
+ metadata.gz: 769f0ca19b127cb76ec2ed21f8c1e7230dd8ebf6bdddf3de4cd17f42968b761a
4
+ data.tar.gz: e80ce6addde9988351b7c8b772f7b886e3ea271757fec89daca6829a1c6a2203
5
5
  SHA512:
6
- metadata.gz: 9b3db24698b1637328ba375d2676c903331cab7fcdc1789faeedc4b626b41f685f2a50225ea48f04c378d72be288928322eb24cccff816085dd66784c1d6377b
7
- data.tar.gz: 47f23df2526d20da3066044b4224faee03113375c4654bce63154935b50e8df94cd588196b841a034641f591447577da8d9246dbbf2a1cd6ddb46f5c4fabba18
6
+ metadata.gz: 49e78672ebf5e5af2d393e74177785d0728fe4951ae4c6157bfbd051da84455a93078d2df7202235462505911dd4fd78ea35391a52dde28bb4b55f736eb90c85
7
+ data.tar.gz: d47bd29255fbe43f930dbcae26dbc73ad5881c47f7069c798f609956e1c17ec20cbc77e0ea93785f39724ff9cfe5671366b429371dadb6a7c032755f47c24f8f
data/README.md CHANGED
@@ -97,6 +97,9 @@ The `autocomplete_items` takes the components on a page and retrieves any items
97
97
 
98
98
  `save_and_return_enabled?` method checks whether save and return is enabled in the Runner or Editor app. In the Runner save and return is enabled when the `ENV['SAVE_AND_RETURN']` environment variable is present. In the Editor, save and return enabled can be ascertained by checking the `ServiceConfiguration` table.
99
99
 
100
+ `service_slug_config` method checks whether the user has configured their own service URL. In the Editor this will be a `SERVICE_SLUG` row in the `ServiceConfiguration` table. In the Runner, it will be the `ENV['SERVICE_SLUG']` config.
101
+ If it does not exist, we use the current method of parameterizing the `service_name`.
102
+
100
103
  ## Generate documentation
101
104
 
102
105
  Run `rake doc` and open the doc/index.html
@@ -38,6 +38,8 @@ class MetadataPresenter::Service < MetadataPresenter::Metadata
38
38
  end
39
39
 
40
40
  def service_slug
41
+ return service_slug_config if service_slug_config.present?
42
+
41
43
  service_name.gsub(/['’]/, '').parameterize
42
44
  end
43
45
 
@@ -37,19 +37,19 @@
37
37
  <div class="govuk-grid-row">
38
38
  <div class="govuk-grid-column-two-thirds">
39
39
  <%= render 'metadata_presenter/attribute/body' %>
40
- </div>
41
- </div>
42
40
 
43
- <%= render partial: 'metadata_presenter/component/components',
44
- locals: {
45
- f: nil,
46
- components: @page.components,
47
- tag: nil,
48
- classes: nil,
49
- input_components: @page.supported_input_components,
50
- content_components: @page.supported_content_components
51
- } %>
41
+ <%= render partial: 'metadata_presenter/component/components',
42
+ locals: {
43
+ f: nil,
44
+ components: @page.components,
45
+ tag: nil,
46
+ classes: nil,
47
+ input_components: @page.supported_input_components,
48
+ content_components: @page.supported_content_components
49
+ } %>
52
50
 
51
+ </div>
52
+ </div>
53
53
  <% if payment_link_enabled? %>
54
54
  <a href="<%= payment_link_url %>" class="govuk-button" data-module="govuk-button" data-component="pay-button"><%= t('presenter.confirmation.continue_to_pay_button') %></a>
55
55
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '2.19.5'.freeze
2
+ VERSION = '2.20.1'.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.19.5
4
+ version: 2.20.1
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-05-19 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_design_system_formbuilder