Fixed print of boolean's.

This commit is contained in:
Martin Edenhofer 2016-08-11 15:43:55 +02:00
parent cd92cdbca7
commit 1d8b44c9a6
2 changed files with 9 additions and 2 deletions

View file

@ -52,7 +52,7 @@ class App extends Spine.Controller
@viewPrintItem: (item, attribute_config = {}, valueRef) ->
return '-' if item is undefined
return '-' if item is ''
return item if !item
return item if item is null
result = item
# lookup relation
@ -92,6 +92,13 @@ class App extends Spine.Controller
if 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
if attribute_config.translate || (isObject && item.translate && item.translate())
isHtmlEscape = true