Restyled registration flow steps

This commit is contained in:
Godwin
2016-07-21 18:24:38 -07:00
parent 1db977f35b
commit b8b36b7cc8
14 changed files with 195 additions and 24 deletions
+7 -8
View File
@@ -851,7 +851,12 @@ module ApplicationHelper
steps.each do | step |
text = _"articles.conference_registration.headings.#{step[:name].to_s}"
h = content_tag :li, class: [step[:enabled] ? :enabled : nil, @register_template == step[:name] ? :current : nil] do
if step[:name] == :workshops
post_registration = true
end
h = content_tag :li, class: [step[:enabled] ? :enabled : nil, @register_template == step[:name] ? :current : nil, post_registration ? :post : :pre].compact do
if step[:enabled]
content_tag :div, (link_to text, register_step_path(@this_conference.slug, step[:name])).html_safe, class: :step
else
@@ -859,10 +864,6 @@ module ApplicationHelper
end
end
if step[:name] == :workshops
post_registration = true
end
if post_registration
post_registration_steps += h.html_safe
else
@@ -874,9 +875,7 @@ module ApplicationHelper
row class: 'flow-steps' do
columns do
(content_tag :ul, id: 'registration-steps' do
pre_registration_steps.html_safe
end).html_safe +
(content_tag :ul, id: 'post-registration-steps' do
pre_registration_steps.html_safe +
post_registration_steps.html_safe
end).html_safe
end