Module: ContainerStepsHelper

Defined in:
app/helpers/container_steps_helper.rb

Instance Method Summary collapse

Instance Method Details

#container_wizard(step) ⇒ Object



2
3
4
5
6
7
# File 'app/helpers/container_steps_helper.rb', line 2

def container_wizard(step)
  wizard_header(
    step,
    *wizard_steps.map { |s| s.to_s.humanize }
  )
end

#last_step?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/helpers/container_steps_helper.rb', line 21

def last_step?
  step == wizard_steps.last
end

#select_registry(f) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/container_steps_helper.rb', line 9

def select_registry(f)
  registries = DockerRegistry.with_taxonomy_scope_override(@location, @organization)
    .authorized(:view_registries)
  field(f, 'docker_container_wizard_states_image[registry_id]', :label => _("Registry")) do
    collection_select :wizard_states_image, :registry_id,
                      registries,
                      :id, :name,
                      { :prompt => _("Select a registry") },
                      :class => "form-control", :disabled => registries.size == 0
  end
end

#taxonomy_icon(taxonomy) ⇒ Object



25
26
27
# File 'app/helpers/container_steps_helper.rb', line 25

def taxonomy_icon(taxonomy)
  taxonomy == 'locations' ? 'globe' : 'briefcase'
end