ManageIQ/manageiq-ui-classic

View on GitHub
app/views/pxe/_template_details.html.haml

Summary

Maintainability
Test Coverage
#template_details_div
  -# if Customization template is selected
  - if @ct
    #template_info_div
      - if @in_a_form
        = react 'PxeCustomizationTemplateForm', :recordId => @ct.try(:id).try(:to_s), :copy => @record.try(:id).try(:to_s)
      - else
        = render :partial => "layouts/flash_msg"
        = react 'GenericGroupWrapper', expand_generic_group(TextualGroup.new(_('Basic Information'), textual_template_basicinfo), @record)
        %hr
        %h3= _('Script')
        = text_area("script1", "data",
          :value => @ct.script,
          :size => "90x20",
          :disabled => true,
          :style => "display:none;")
        -# Create a MyCodeMirror editor for the text area
        = render(:partial => "/layouts/my_code_mirror",
          :locals => {:text_area_id => "script1_data",
            :mode => @ct.type == "CustomizationTemplateKickstart" ? "shell" : "xml",
            :line_numbers => true,
            :read_only => true})