ManageIQ/manageiq-ui-classic

View on GitHub
app/views/miq_request/_service_reconfigure_show.html.haml

Summary

Maintainability
Test Coverage
#main_div
  - s = @miq_request.source
  - st = s.service_template
  - ra = st.resource_actions.find_by_action('Reconfigure') if st
  - if ra && ra.dialog
    - values = @miq_request.options[:dialog]
    - opts = {:reconfigure => true}
    - wf = ResourceActionWorkflow.new(values, current_user, ra, opts)
    %fieldset
      %h3
        = _("Dialog Options")
      .row
        .col-md-12.col-lg-12
          #dialog_tabs
            %ul.nav.nav-tabs{'role' => 'tablist'}
              - wf.dialog.dialog_tabs.each_with_index do |tab, tab_index|
                - options = tab_index == 0 ? {:class => "active"} : {}
                = miq_tab_header(tab.id, nil, options) do
                  = _(tab.label)
            .tab-content
              - wf.dialog.dialog_tabs.each_with_index do |tab, tab_index|
                - options = tab_index == 0 ? {:class => "active"} : {}
                = miq_tab_content(tab.id, nil, options) do
                  - tab.dialog_groups.each do |group|
                    %div{:id => "group_#{group.id}_div"}
                      %h3{:title => "#{group.description}"}
                        = _(group.label)
                      - unless group.dialog_fields.empty?
                        .form-horizontal
                          - group.dialog_fields.each do |field|
                            = render :partial => "miq_request/request_dialog_details",
                                     :locals => {:wf => wf, :field => field}
                      %hr