Skip to content

Commit

Permalink
add most of the containers and input fields for endpoints/methods/params
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonmwest committed Jan 6, 2012
1 parent e85121a commit cafbf6c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 20 deletions.
4 changes: 4 additions & 0 deletions public/css/default.css
@@ -1,3 +1,7 @@
body {
padding-top: 60px;
}

.hidden {
display:none;
}
90 changes: 88 additions & 2 deletions views/endpoints.haml
@@ -1,2 +1,88 @@
- @result.endpoints.each do |e|
%h2 #{e.name}
.container-fluid
.sidebar
.well
%h3 Endpoints
%ul
- @result.endpoints.each do |e|
%li
#{e.name}
%ul
- e["methods"].each do |m|
%li #{m.MethodName}

.content
%form
-count=0
- @result.endpoints.each do |e|
-count=count+1
.endpoint{:id => "ep#{count}"}
%h2
Endpoint: #{e.name}
%fieldset

.clearfix
%label{:for => "name#{count}"} Endpoint Name
.input
%input{:name => "name#{count}", :id => "name#{count}", :value => "#{e.name}"}

-# should break this out into another subview
-method_count = 0
- e["methods"].each do |m|
-method_count=method_count+1
%legend
Method: #{m.MethodName}
%br/
.clearfix
%label{:for => "MethodName#{method_count}"} Method Name
.input
%input{:name => "MethodName#{method_count}", :id => "MethodName#{method_count}", :value => "#{m.MethodName}"}
.clearfix
%label{:for => "Synopsis#{method_count}"} Synopsis
.input
%input{:name => "Synopsis#{method_count}", :id => "Synopsis#{method_count}", :value => "#{m.Synopsis}"}
.clearfix
%label{:for => "HTTPMethod#{method_count}"} HTTP Method (GET, POST, PUT, etc)
.input
%input{:name => "HTTPMethod#{method_count}", :id => "HTTPMethod#{method_count}", :value => "#{m.HTTPMethod}"}
.clearfix
%label{:for => "URI#{method_count}"} URI
.input
%input{:name => "URI#{method_count}", :id => "URI#{method_count}", :value => "#{m.URI}"}
.clearfix
%label{:for => "RequiresOAuth#{method_count}"} Requires OAuth? (Y or N)
.input
%input{:name => "RequiresOAuth#{method_count}", :id => "RequiresOAuth#{method_count}", :value => "#{m.RequiresOAuth}"}

-# and yet another subview here for all the method params

-param_count = 0
- m.parameters.each do |p|
-param_count=param_count+1
%legend
Parameter: #{p.Name}
%br/
.clearfix
%label{:for => "ParameterName#{param_count}"} Parameter Name
.input
%input{:name => "ParameterName#{param_count}", :id => "ParameterName#{param_count}", :value => "#{p.Name}"}
.clearfix
-#make this a textarea
%label{:for => "Description#{param_count}"} Description
.input
%input{:name => "Description#{param_count}", :id => "Description#{param_count}", :value => "#{p.Description}"}
.clearfix
%label{:for => "Required#{param_count}"} Required? (Y or N)
.input
%input{:name => "Required#{param_count}", :id => "Required#{param_count}", :value => "#{p.Required}"}
.clearfix
%label{:for => "Default#{param_count}"} Default value
.input
%input{:name => "Default#{param_count}", :id => "Default#{param_count}", :value => "#{p.Default}"}

-#this is where logic is needed to hide/display fields based on type
.clearfix
%label{:for => "Type#{param_count}"} Data type
-#should be a dropdown
.input
%input{:name => "Type#{param_count}", :id => "Type#{param_count}", :value => "#{p.Type}"}

18 changes: 0 additions & 18 deletions views/index.haml

This file was deleted.

Empty file added views/methods.haml
Empty file.
Empty file added views/parameters.haml
Empty file.

0 comments on commit cafbf6c

Please sign in to comment.