diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-07 14:58:03 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-07-07 14:58:03 +0200 |
commit | 8c53aec1ce4d34cc245a755498c068a15ca99997 (patch) | |
tree | d4732033142f784e9985ae11d87bc9b4753e7ee8 /views | |
parent | 0ba8317f8b725f2048b0ddbf5beec5681afab293 (diff) | |
download | collection-json-explorer-8c53aec1ce4d34cc245a755498c068a15ca99997.tar.gz collection-json-explorer-8c53aec1ce4d34cc245a755498c068a15ca99997.tar.bz2 collection-json-explorer-8c53aec1ce4d34cc245a755498c068a15ca99997.tar.xz collection-json-explorer-8c53aec1ce4d34cc245a755498c068a15ca99997.zip |
o Consistent usage of italics for missing fields.
Diffstat (limited to 'views')
-rw-r--r-- | views/data.jade | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/views/data.jade b/views/data.jade index bf22302..dd79c12 100644 --- a/views/data.jade +++ b/views/data.jade @@ -8,15 +8,13 @@ mixin get_name(link, prefix, i) block href if typeof href != 'string' - div <no href> + div: i no href else div a(href=urlgenerator.render(href)) #{href} | (opens in explorer) block link - - var name = typeof link.name == 'string' ? link.name : '<no name attribute>' - - var prompt = typeof link.prompt == 'string' ? link.prompt : '<no prompt attribute>' - var href = link.href div a(class='btn btn-primary btn-mini', href=urlgenerator.render(href)) Explore @@ -34,12 +32,20 @@ block link else | #{link.rel} dt name - dd #{name} + dd + if link.name + | #{link.name} + else + i Not set dt prompt - dd #{prompt} + dd + if link.prompt + | #{link.prompt} + else + i Not set if link.render == 'image' dt - dd: img(src=link.href, alt=link.name, title=name) + dd: img(src=link.href, alt=link.name, title=link.name) block meta div(class='row-fluid') @@ -47,7 +53,11 @@ block meta - var href=collection.href dl dt version - dd #{collection.version} + dd + if collection.version + | #{collection.version} + else + i Not set dt href dd: block href @@ -161,19 +171,19 @@ block error if collection.error.title | #{collection.error.title} else - i No title + i Not set dt code dd if collection.error.code | #{collection.error.code} else - i No code + i Not set dt message dd if collection.error.message | #{collection.error.message} else - i No message + i Not set block httpResponse div(class='row-fluid') |