Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

96 lines (85 sloc) 5.288 kB
%ul.parameters
-param_count = 0
-if defined?(m.parameters.length) && m.parameters.length > 0
-m.parameters.each do |p|
-param_count=param_count+1
%li.parameter{:endpointIndex => endpointIndex, :methodIndex => methodIndex, :parameterIndex => param_count}
%legend
.section.clickable{"parent" => "#endpoint#{endpointIndex}method#{methodIndex}", "target" => "#endpoint#{endpointIndex}method#{methodIndex}parameter#{param_count}"}
Parameter:
%span.parameterNameSpan #{p.Name}
.parameterContainer.hide{:id => "endpoint#{endpointIndex}method#{methodIndex}parameter#{param_count}"}
%span.method-controls
%span.method-controls
%a.btn.btn-danger.removeParameter
%i.icon-trash.icon-white
Delete Parameter
.control-group
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Name"} Parameter Name
.controls
%input.name{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Name", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Name", |
:value => "#{p.Name}"} |
.control-group
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Description"} Description
.controls
%textarea{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Description", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Description"} |
#{p.Description} |
.control-group
%label.control-label Required?
.controls
%label.radio
%input{:type => "radio", :name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Required", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Required.Yes", |
:value => "Y", |
:checked => p.Required == "Y"}
Yes
%label.radio
%input{:type => "radio", :name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Required", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Required.No", |
:value => "N", |
:checked => p.Required == "N"}
No
.control-group
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Default"} Default value
.controls
%input{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Default", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Default", |
:value => "#{p.Default}"} |
.control-group
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type"} Data type
-#should be a dropdown
.controls
%label.radio
%input.dataType{:type => "radio", |
:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type.Boolean", |
:value => "boolean", |
:checked => p.Type == "boolean"}
Boolean
%label.radio
%input.dataType{:type => "radio", |
:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type.Enumerated", |
:value => "enumerated", |
:checked => p.Type == "enumerated"}
Enumerated ( JSON list of options, e.g. ["option1","option2"] )
.enumeratedList
%input.enumeratedInput{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].EnumeratedList", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].EnumeratedList", |
:value => "#{p.EnumeratedList}", |
:style => p.Type != "enumerated" ? 'display:none' : ''}
%label.radio
%input.dataType{:type => "radio", |
:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type.Custom", |
:value => "custom", |
:checked => p.Type != "boolean" && p.Type != "enumerated"}
Custom
.custom
%input.customInput{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", |
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", |
:value => "#{p.Type}" , |
:style => p.Type == "boolean" || p.Type == "enumerated" ? 'display:none' : ''}
%input{:type=>"hidden", :value => param_count, :id=>"endpoint#{endpointIndex}Method#{methodIndex}ParameterCounter"}
Jump to Line
Something went wrong with that request. Please try again.