diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-02 19:24:40 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-02 19:24:40 +0200 |
commit | 021dc27bd0101f24cd615b187938fbadf5fdcc89 (patch) | |
tree | 6aca353e1eb8f1179391163051aa7d72b4ddcd56 /views | |
parent | d83ee160d4340c8f409c076303021e20512e2214 (diff) | |
download | collection-json-explorer-021dc27bd0101f24cd615b187938fbadf5fdcc89.tar.gz collection-json-explorer-021dc27bd0101f24cd615b187938fbadf5fdcc89.tar.bz2 collection-json-explorer-021dc27bd0101f24cd615b187938fbadf5fdcc89.tar.xz collection-json-explorer-021dc27bd0101f24cd615b187938fbadf5fdcc89.zip |
o Showing a message if there are no queries.
Diffstat (limited to 'views')
-rw-r--r-- | views/data.jade | 43 | ||||
-rw-r--r-- | views/index.jade | 10 |
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: |