ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
Test Coverage
- if @edit && @edit[:stamp_typ]
  - url = url_for_only_path(:action => 'stamp_field_changed')

%fieldset
  %h3
    = _("Request Details")
  .form-horizontal
    - if @miq_request.requester
      .form-group
        %label.control-label.col-md-2
          = _("Requested by")
        .col-md-8
          = h(@miq_request.requester + (@user.nil? ? nil : " (#{@user.name})"))
    .form-group
      %label.control-label.col-md-2
        = _("Last Update")
      .col-md-8
        = h(format_timezone(@miq_request.updated_on))
    .form-group
      %label.control-label.col-md-2
        = _("Status")
      .col-md-8
        = h(@miq_request.state.titleize)
    - if @miq_request.stamped_by
      .form-group
        %label.control-label.col-md-2
          = _("Approved/Denied by")
        .col-md-8
          = h(@miq_request.stamped_by + (@user.nil? ? nil : " (#{@user.name})"))
    .form-group
      %label.control-label.col-md-2
        = _("Date Approved/Denied")
      .col-md-8
        = h(format_timezone(@miq_request.stamped_on))
    .form-group
      %label.control-label.col-md-2
        = _("Reason")
      - if @edit && @edit[:stamp_typ]
        .col-md-8
          = text_field_tag("reason", @edit[:reason],
            :maxlength         => ViewHelper::MAX_NAME_LEN,
            :class             => "form-control",
            "data-miq_focus"   => true,
            "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
      - else
        .col-md-8
          = h(@miq_request.reason)
    .form-group
      %label.control-label.col-md-2
        = _("Last Message")
      .col-md-8
        = h(@miq_request.message)