Improved displayName().

This commit is contained in:
Martin Edenhofer 2012-10-16 13:04:29 +02:00
parent 8a76d83a3e
commit 2e4e6225a1
2 changed files with 3 additions and 2 deletions

View file

@ -40,6 +40,7 @@ class App extends Spine.Controller
# define print name helper
params.P = ( item ) ->
return item if !item
if typeof item is 'object'
if item.displayNameLong
item.displayNameLong()

View file

@ -9,7 +9,7 @@ class App.Model extends Spine.Model
if @lastname
if name
name = name + ' '
name = name + @lastname
name = name + @lastname
return name
return '???'
@ -20,7 +20,7 @@ class App.Model extends Spine.Model
if @lastname
if name
name = name + ' '
name = name + @lastname
name = name + @lastname
if @organization
if typeof @organization is 'object'
name = "#{name} (#{@organization.name})"