Sha256: 0559598381e1862a63bbcf1fee46a8f53174f74839d0aea938e286d7538f4bd0

Contents?: true

Size: 782 Bytes

Versions: 8

Compression:

Stored size: 782 Bytes

Contents

module WizardHelper
  def section_header(wizard_step)
    wizard_step_index = wizard_steps.index(wizard_step) + 1
    
    content = ["#{wizard_step_index} / #{wizard_steps.length}"] 
    content << t("stories.steps.#{wizard_step}.title")
    content << (future_step?(wizard_step) ? t('general.not_available') : '')
    
    content.join(' ')
  end
  
  def step_pane(wizard_step)
    return if future_step?(wizard_step)  
    
    partial_path = wizard_step == :initialization ? 'form' : "steps/#{wizard_step}"
    
    if @presenter.respond_to?(wizard_step)
      @step_presenter = @presenter.send(wizard_step) 
    else
      @step_presenter = nil
    end
    
    render_product_specific_partial_if_available(
      resource, "#{controller_name}/#{partial_path}"
    )
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voluntary-0.1.0 app/helpers/wizard_helper.rb
voluntary-0.1.0.rc4 app/helpers/wizard_helper.rb
voluntary-0.1.0.rc3 app/helpers/wizard_helper.rb
voluntary-0.1.0.rc2 app/helpers/wizard_helper.rb
voluntary-0.1.0.rc1 app/helpers/wizard_helper.rb
voluntary-0.0.3 app/helpers/wizard_helper.rb
voluntary-0.0.2 app/helpers/wizard_helper.rb
voluntary-0.0.1 app/helpers/wizard_helper.rb