summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/data.jade43
-rw-r--r--views/index.jade10
2 files changed, 28 insertions, 25 deletions
diff --git a/views/data.jade b/views/data.jade
index 5ef6ab6..49d0579 100644
--- a/views/data.jade
+++ b/views/data.jade
@@ -90,26 +90,29 @@ block items
dd #{data.value}
block queries
- each query in collection.queries
- - var name = query.prompt || query.name || 'Unnamed query'
- h2= name
-
- div(class='row')
- div(class='span12')
- form(action='/render', class='well form-horizontal')
- input(type='hidden', name='url', value=query.href)
- fieldset
- each data in query.data
- - var value = params[data.name] || data.value
- div(class='control-group')
- label(class='control-label', for=data.name) #{data.name}
- div(class='controls')
- input(type='text', name='param-' + data.name, value=value, class='input-xlarge')
-
- div(class='control-group')
- div(class='controls')
- input(type='submit') Execute
- // button(class='execute-query') Execute
+ if collection.queries.length == 0
+ p Collection has to queries.
+ else
+ each query in collection.queries
+ - var name = query.prompt || query.name || 'Unnamed query'
+ h2= name
+
+ div(class='row')
+ div(class='span12')
+ form(action='/render', class='well form-horizontal')
+ input(type='hidden', name='url', value=query.href)
+ fieldset
+ each data in query.data
+ - var value = params[data.name] || data.value
+ div(class='control-group')
+ label(class='control-label', for=data.name) #{data.name}
+ div(class='controls')
+ input(type='text', name='param-' + data.name, value=value, class='input-xlarge')
+
+ div(class='control-group')
+ div(class='controls')
+ input(type='submit') Execute
+ // button(class='execute-query') Execute
block headers
// a(id='headers'): h1: a(href='#headers') Headers
diff --git a/views/index.jade b/views/index.jade
index 76e56bf..640b3f8 100644
--- a/views/index.jade
+++ b/views/index.jade
@@ -34,8 +34,8 @@ block content
div(class='span6')
h2 About
p This is an interactive explorer for the Collection+JSON
- | hypermedia. Give it an URL and it will render is as good as it
- | can.
+ |hypermedia. Give it an URL and it will render is as good as it
+ |can.
h3 REST/Collection+JSON Resources
@@ -52,9 +52,9 @@ block content
p The
a(href='http://employee.herokuapp.com') Employee
- | application is a set of resources with employees and
- | departments. The application was made specifically for this
- | explorer.
+ |application is a set of resources with employees and
+ |departments. The application was made specifically for this
+ |explorer.
a(href='http://' + host + '/render?url=http%3A%2F%2Femployee.herokuapp.com') Explore now!
p The specification contains a few example collections too which you can explore: