/
endpoints.haml
39 lines (32 loc) · 1.27 KB
/
endpoints.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.row-fluid
%ul.tabs.nav.nav-tabs
%li.active
%a(href="#editor" data-toggle="tab") Editor
%li
%a.viewOutput(href="#output-container" data-toggle="tab") Output
.tab-content
#output-container.tab-pane
%form{:method => "post", :action => "/file"}
%input#json{:type => "hidden", :name => "json", :value => " "}
%input.btn-success{:type => "submit", :value => "Save File"}
#output
#editor.tab-pane.active
= partial :menu, :locals => {:result => @result}
.content.forms.span8
#start
%h3 Click on a Endpoint or Method from the list on the left, or add a new Endpoint to get started.
-#%input.btn(type='submit' value='Add Endpoint' id="addEndpoint")
%form.form-horizontal#config
-count=0
- @result["endpoints"].each do |e|
-count=count+1
.endpoint.hide{:id => "ep#{count}"}
.control-group
%label.control-label{:for => "endpoints[#{count}].name"}
Endpoint Name:
.controls
.input
%input.endpointName{:name => "endpoints[#{count}].name", :id => "endpoints[#{count}].name", :value => "#{e.name}"}
= partial :methods, :locals => {:endpoint => e, :endpointIndex => count}
%input{:type=>"hidden", :value=>count, :id=>"endpointCounter"}
= partial :templates