Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def orchestration_template_content(record)
]
miq_structured_list({
:title => _('Content'),
:mode => "method_built_in_data",
:mode => "method_inline_data",
:rows => rows
})
end
Expand Down
15 changes: 13 additions & 2 deletions app/helpers/miq_ae_class_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,24 @@ def method_details(ae_method, sb_data)
})
end

def method_built_in_data(ae_method)
def method_inline_data(ae_method)
rows = [
row_data('', {:input => 'code_mirror', :props => {:mode => 'ruby', :payload => ae_method.data}})
]
miq_structured_list({
:title => _('Data'),
:mode => "method_built_in_data",
:mode => "method_inline_data",
:rows => rows
})
end

def method_builtin_data(ae_method)
rows = [
row_data(_('Builtin name'), ae_method.data),
]
miq_structured_list({
:title => _('Data'),
:mode => "method_builtin_data",
:rows => rows
})
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/miq_ae_customization_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def miq_ae_customization_content(record)
]
miq_structured_list({
:title => _('Content'),
:mode => "method_built_in_data",
:mode => "method_inline_data",
:rows => rows
})
end
Expand Down
19 changes: 3 additions & 16 deletions app/views/miq_ae_class/_method_inputs.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,9 @@
= render :partial => "embedded_methods"
= render :partial => "domain_overrides", :locals => {:node_prefix => "aem", :model => "Method"}
- if @ae_method.location == "inline"
- if @in_a_form
%h3= @ae_method.location == 'builtin' ? _('Builtin name') : _('Data')
= text_area("method1",
"data",
:value => @ae_method.data,
: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 => "method1_data",
:mode => "ruby",
:line_numbers => true,
:read_only => true}
- else
= method_built_in_data(@ae_method)
= method_inline_data(@ae_method)
- elsif @ae_method.location == 'builtin'
= method_builtin_data(@ae_method)
- elsif @ae_method.location == 'expression'
= @expression
- elsif playbook_style_location?(@ae_method.location)
Expand Down
Loading