#class_methods_div
  - if !@in_a_form
    %h3= _('Methods')
    - if @record.ae_methods.present?
      %table#class_methods_grid.table.table-striped.table-bordered.table-hover.table-clickable.table-checkable
        %thead
          %th.table-view-pf-select
            %input.checkall{:type => 'checkbox', :title => _('Check All')}
          %th
          %th
        %tbody{'data-click-url' => '/miq_ae_class/tree_select/'}
          - @record.ae_methods.each do |record|
            - next if record.name == '$'
            - cls_cid = "#{class_prefix(record.class)}-#{ApplicationRecord.compress_id(record.id)}"
            %tr{'data-click-id' => cls_cid}
              %td.table-view-pf-select.noclick
                %input{:type => 'checkbox', :value => cls_cid}
              %td.table-view-pf-select
                %i{:class => record.decorate.fonticon}
              %td
                = record_name(record)
      :javascript
        $(function () {
          $('#class_methods_grid').miqGrid();
        });
    - else
      = render :partial => "layouts/info_msg",
               :locals  => {:message => _("No methods found")}
  - elsif @edit[:new][:fields]
    .form_div
      = render :partial => "method_form", :locals  => {:prefix => "cls_"}

#class_methods_div
  - if !@in_a_form
    %h3= _('Methods')
    - if @record.ae_methods.present?
      %table#class_methods_grid.table.table-striped.table-bordered.table-hover.table-clickable.table-checkable
        %thead
          %th.table-view-pf-select
            %input.checkall{:type => 'checkbox', :title => _('Check All')}
          %th
          %th
        %tbody{'data-click-url' => '/miq_ae_class/tree_select/'}
          - @record.ae_methods.order(:name).each do |record|
            - next if record.name == '$'
            - cls_cid = "#{class_prefix(record.class)}-#{ApplicationRecord.compress_id(record.id)}"
            %tr{'data-click-id' => cls_cid}
              %td.table-view-pf-select.noclick
                %input{:type => 'checkbox', :value => cls_cid}
              %td.table-view-pf-select
                %i{:class => record.decorate.fonticon}
              %td
                = record_name(record)
      :javascript
        $(function () {
          $('#class_methods_grid').miqGrid();
        });
    - else
      = render :partial => "layouts/info_msg",
               :locals  => {:message => _("No methods found")}
  - elsif @edit[:new][:fields]
    .form_div
      = render :partial => "method_form", :locals  => {:prefix => "cls_"}

Order Methods displayed under Automate Class
Order Methods displayed under Automate Class

fixing https://bugzilla.redhat.com/show_bug.cgi?id=1439911

Order methods displayed in the right side frame under the Methods
tab when reaching Automation -> Automate -> Explorer and choosing
a class with different methods.
