Fixed print of boolean's.
This commit is contained in:
parent
cd92cdbca7
commit
1d8b44c9a6
2 changed files with 9 additions and 2 deletions
|
@ -52,7 +52,7 @@ class App extends Spine.Controller
|
||||||
@viewPrintItem: (item, attribute_config = {}, valueRef) ->
|
@viewPrintItem: (item, attribute_config = {}, valueRef) ->
|
||||||
return '-' if item is undefined
|
return '-' if item is undefined
|
||||||
return '-' if item is ''
|
return '-' if item is ''
|
||||||
return item if !item
|
return item if item is null
|
||||||
result = item
|
result = item
|
||||||
|
|
||||||
# lookup relation
|
# lookup relation
|
||||||
|
@ -92,6 +92,13 @@ class App extends Spine.Controller
|
||||||
if attribute_config.options[result]
|
if attribute_config.options[result]
|
||||||
result = attribute_config.options[result]
|
result = attribute_config.options[result]
|
||||||
|
|
||||||
|
# transform boolean
|
||||||
|
if attribute_config.tag is 'boolean'
|
||||||
|
if result is true
|
||||||
|
result = 'yes'
|
||||||
|
else if result is false
|
||||||
|
result = 'no'
|
||||||
|
|
||||||
# translate content
|
# translate content
|
||||||
if attribute_config.translate || (isObject && item.translate && item.translate())
|
if attribute_config.translate || (isObject && item.translate && item.translate())
|
||||||
isHtmlEscape = true
|
isHtmlEscape = true
|
||||||
|
|
Loading…
Reference in a new issue