diff --git a/app/helpers/miq_ae_class_helper.rb b/app/helpers/miq_ae_class_helper.rb index 498f93bd847..aff1e5c031f 100644 --- a/app/helpers/miq_ae_class_helper.rb +++ b/app/helpers/miq_ae_class_helper.rb @@ -324,4 +324,26 @@ def datastore_form(ae_ns, sb_data, type) :nameReadOnly => domain && !ae_ns.editable_property?(:name), :descReadOnly => domain && !ae_ns.editable_property?(:description)}) end + + def first_user_summary(ae_method, sb_data) + rows = [ + row_data(_('Type'), ae_method.location), + row_data(_('Fully Qualified Name'), sb_data[:namespace_path]), + row_data(_('Name'), ae_method.name), + row_data(_('Display Name'), ae_method.display_name), + row_data(_('Created On'), format_timezone(ae_method.created_on, Time.zone, "gtl")), + ] + + miq_structured_list({ + :title => _('Main Info'), + :mode => "first_user_summary", + :rows => rows + }) + end + + private + + def row_data(label, value) + {:cells => {:label => label, :value => value}} + end end diff --git a/app/views/miq_ae_class/_method_inputs.html.haml b/app/views/miq_ae_class/_method_inputs.html.haml index 08f3489ed0d..adb44cfa321 100644 --- a/app/views/miq_ae_class/_method_inputs.html.haml +++ b/app/views/miq_ae_class/_method_inputs.html.haml @@ -7,19 +7,7 @@ - else = render :partial => "method_form", :locals => {:prefix => ""} - else - %h3 - = _('Main Info') - .form-horizontal - .form-group - = format_form_group(_('Type'), location_fancy_name(@ae_method.location)) - .form-group - = format_form_group(_('Fully Qualified Name'), @sb[:namespace_path]) - .form-group - = format_form_group(_('Name'), @ae_method.name) - .form-group - = format_form_group(_('Display Name'), @ae_method.display_name) - .form-group - = format_form_group(_('Created On'), format_timezone(@ae_method.created_on, Time.zone, "gtl")) + = first_user_summary(@ae_method, @sb) - if @ae_method.location == 'inline' = render :partial => "embedded_methods" = render :partial => "domain_overrides", :locals => {:node_prefix => "aem", :model => "Method"}