5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/helpers/effective_resources_wizard_helper.rb', line 5
def (resource, numbers: true, horizontal: false, &block)
klasses = ['wizard-sidebar', 'list-group', ('list-group-horizontal' if horizontal)].compact.join(' ')
= content_tag(:div, class: klasses) do
resource.required_steps.map.with_index do |nav_step, index|
(resource, nav_step, (index + 1 if numbers))
end.join.html_safe
end
return unless block_given?
content_tag(:div, class: 'row') do
content_tag(:div, class: 'col-3') { } +
content_tag(:div, class: 'col-9') { yield }
end
end
|