effective_resources 2.2.5 → 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 146cdb78cb556ab64e1dc464ad8670179f45d20b6aa4c89584d8a96dbd573517
|
4
|
+
data.tar.gz: e00c2763329776a6e06b95aa70fc7da7405baa7c11c4f77889d3f44fae8a3cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
|
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.
|
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-
|
11
|
+
date: 2023-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|