effective_resources 2.2.5 → 2.2.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: 90e5bf3fd1991d755505ba17c9ec917279bed6ed92e8b336005ccbcf4568ac01
4
- data.tar.gz: 84a1301995e457d5ac7250528ca7dafb6ac3d043d41c8dec65a200f452217c11
3
+ metadata.gz: 146cdb78cb556ab64e1dc464ad8670179f45d20b6aa4c89584d8a96dbd573517
4
+ data.tar.gz: e00c2763329776a6e06b95aa70fc7da7405baa7c11c4f77889d3f44fae8a3cf7
5
5
  SHA512:
6
- metadata.gz: 481fd4b475b39f2c048288831ae0929b86062dbb63edb49ada6b4652a7c33953a172bb9f3ec5f2c4d9cf2d1653bf3a6625b692d8d776ae6b11281ca30bc57b73
7
- data.tar.gz: eab64d1fa9fb21caa68e028943ea22bd4ced563a7ca9fb08d35e23dd5ae325c00918a1485273297ef46311c047eef4790631d60022a9eea5eed1bc4504d74bdd
6
+ metadata.gz: 1b83b25e3291c35839e59637e4f79f83bd2e3e8cc998ba91f50ec30bccd814a0eb90f713c8de8c1367b17fc5aa0080020e07cf88893afa7ca9528724e1e56320
7
+ data.tar.gz: '05845a45e1650fef9da050660183138f2e23fa7e255942e8c70a01b3ee413fe19624465dabab515477c9f093d5414fc10c949f6f87c3ee2edd6f5e0b4ef3634f'
@@ -280,7 +280,7 @@ module EffectiveResourcesHelper
280
280
  end
281
281
 
282
282
  content_tag(:div, class: 'card') do
283
- content_tag(:div, class: 'card-body yo') do
283
+ content_tag(:div, class: 'card-body') do
284
284
  content_tag(:div, class: 'row') do
285
285
  content_tag(:div, class: 'col-sm') do
286
286
  content_tag(:h5, title, class: 'card-title')
@@ -2,12 +2,17 @@
2
2
 
3
3
  module EffectiveResourcesWizardHelper
4
4
 
5
- def render_wizard_sidebar(resource, numbers: true, horizontal: false, &block)
5
+ def render_wizard_sidebar(resource, numbers: true, path: nil, horizontal: false, &block)
6
+ if path.present?
7
+ raise('expected path to be a string with /build/ in it ') unless path.to_s.include?('/build/')
8
+ path = path.split('/build/').first + '/build/'
9
+ end
10
+
6
11
  klasses = ['wizard-sidebar', 'list-group', ('list-group-horizontal' if horizontal)].compact.join(' ')
7
12
 
8
13
  sidebar = content_tag(:div, class: klasses) do
9
14
  resource.sidebar_steps.map.with_index do |nav_step, index|
10
- render_wizard_sidebar_item(resource, nav_step, (index + 1 if numbers))
15
+ render_wizard_sidebar_item(resource, nav_step: nav_step, index: (index + 1 if numbers), path: (path + nav_step.to_s if path))
11
16
  end.join.html_safe
12
17
  end
13
18
 
@@ -19,7 +24,7 @@ module EffectiveResourcesWizardHelper
19
24
  end
20
25
  end
21
26
 
22
- def render_wizard_sidebar_item(resource, nav_step, index = nil)
27
+ def render_wizard_sidebar_item(resource, nav_step:, path: nil, index: nil)
23
28
  # From Controller
24
29
  current = (nav_step == step)
25
30
  title = resource_wizard_step_title(resource, nav_step)
@@ -33,7 +38,7 @@ module EffectiveResourcesWizardHelper
33
38
  if (current || disabled)
34
39
  content_tag(:a, label, class: klass)
35
40
  else
36
- link_to(label, wizard_path(nav_step), class: klass)
41
+ link_to(label, path || wizard_path(nav_step), class: klass)
37
42
  end
38
43
  end
39
44
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.2.5'.freeze
2
+ VERSION = '2.2.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.5
4
+ version: 2.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails