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/data.jade | |
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/data.jade')
-rw-r--r-- | views/data.jade | 43 |
1 files changed, 23 insertions, 20 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 |