Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding hierarchical collapsing params, but bootstrap isn't playing nice
- Loading branch information
1 parent
ffe651e
commit c1e057d
Showing
6 changed files
with
83 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,58 @@ | ||
-param_count = 0 | ||
-m.parameters.each do |p| | ||
-param_count=param_count+1 | ||
%legend | ||
Parameter: #{p.Name} | ||
.control-group | ||
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName"} Parameter Name | ||
.controls | ||
%input{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName", | | ||
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName", | | ||
: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 | ||
%ul.parameters | ||
-param_count = 0 | ||
-m.parameters.each do |p| | ||
-param_count=param_count+1 | ||
|
||
%li.parameter{:endpointIndex => endpointIndex, :methodIndex => methodIndex, :parameterIndex => param_count} | ||
%legend.clickable{"data-toggle" => "collapse", "data-parent" => "#endpoint#{endpointIndex}method#{methodIndex}", "data-target" => "#endpoint#{endpointIndex}method#{methodIndex}parameter#{param_count}"} | ||
Parameter: #{p.Name} | ||
|
||
.parameterContainer.collapse{:id => "endpoint#{endpointIndex}method#{methodIndex}parameter#{param_count}"} | ||
.control-group | ||
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName"} Parameter Name | ||
.controls | ||
%input{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName", | | ||
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].ParameterName", | | ||
: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}"} | | ||
%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 | ||
%input{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", | | ||
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", | | ||
:value => "#{p.Type}"} | ||
.control-group | ||
%label.control-label{:for => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type"} Data type | ||
-#should be a dropdown | ||
.controls | ||
%input{:name => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", | | ||
:id => "endpoints[#{endpointIndex}].methods[#{methodIndex}].parameters[#{param_count}].Type", | | ||
:value => "#{p.Type}"} | ||
|
||
%p.help-block | ||
Can be an aribitrary value, e.g. string or int. Values "boolean" and "enumerated" will render a dropdown. | ||
-#this is where logic is needed to hide/display fields based on type | ||
%p.help-block | ||
Can be an arbitrary value, e.g. string or int. Values "boolean" and "enumerated" will render a dropdown. | ||
-#this is where logic is needed to hide/display fields based on type | ||
|
||
%input{:type=>"hidden", :value => param_count, :id=>"endpoint#{endpointIndex}Method#{methodIndex}ParameterCounter"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters