Skip to content

Commit a15203b

Browse files
jrafanieFryguy
authored andcommitted
Merge pull request #9551 from GilbertCherrie/fix_inline_method_summary_screen
Fix builtin method summary screen (cherry picked from commit 5b9ab17)
1 parent 3118187 commit a15203b

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

app/helpers/catalog_helper/orchestration_template_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def orchestration_template_content(record)
4545
]
4646
miq_structured_list({
4747
:title => _('Content'),
48-
:mode => "method_built_in_data",
48+
:mode => "method_inline_data",
4949
:rows => rows
5050
})
5151
end

app/helpers/miq_ae_class_helper.rb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,24 @@ def method_details(ae_method, sb_data)
341341
})
342342
end
343343

344-
def method_built_in_data(ae_method)
344+
def method_inline_data(ae_method)
345345
rows = [
346346
row_data('', {:input => 'code_mirror', :props => {:mode => 'ruby', :payload => ae_method.data}})
347347
]
348348
miq_structured_list({
349349
:title => _('Data'),
350-
:mode => "method_built_in_data",
350+
:mode => "method_inline_data",
351+
:rows => rows
352+
})
353+
end
354+
355+
def method_builtin_data(ae_method)
356+
rows = [
357+
row_data(_('Builtin name'), ae_method.data),
358+
]
359+
miq_structured_list({
360+
:title => _('Data'),
361+
:mode => "method_builtin_data",
351362
:rows => rows
352363
})
353364
end

app/helpers/miq_ae_customization_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def miq_ae_customization_content(record)
4444
]
4545
miq_structured_list({
4646
:title => _('Content'),
47-
:mode => "method_built_in_data",
47+
:mode => "method_inline_data",
4848
:rows => rows
4949
})
5050
end

app/views/miq_ae_class/_method_inputs.html.haml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,9 @@
1212
= render :partial => "embedded_methods"
1313
= render :partial => "domain_overrides", :locals => {:node_prefix => "aem", :model => "Method"}
1414
- if @ae_method.location == "inline"
15-
- if @in_a_form
16-
%h3= @ae_method.location == 'builtin' ? _('Builtin name') : _('Data')
17-
= text_area("method1",
18-
"data",
19-
:value => @ae_method.data,
20-
:size => "90x20",
21-
:disabled => true,
22-
:style => "display:none;")
23-
-# Create a MyCodeMirror editor for the text area
24-
= render :partial => "/layouts/my_code_mirror",
25-
:locals => {:text_area_id => "method1_data",
26-
:mode => "ruby",
27-
:line_numbers => true,
28-
:read_only => true}
29-
- else
30-
= method_built_in_data(@ae_method)
15+
= method_inline_data(@ae_method)
16+
- elsif @ae_method.location == 'builtin'
17+
= method_builtin_data(@ae_method)
3118
- elsif @ae_method.location == 'expression'
3219
= @expression
3320
- elsif playbook_style_location?(@ae_method.location)

0 commit comments

Comments
 (0)