Moved to ticket state for colors.
This commit is contained in:
parent
2a194720b2
commit
a3ea6c8ec8
2 changed files with 12 additions and 3 deletions
|
@ -41,7 +41,7 @@ class App.TicketZoom extends App.Controller
|
||||||
@ticket = App.Ticket.fullLocal( @ticket.id )
|
@ticket = App.Ticket.fullLocal( @ticket.id )
|
||||||
meta.head = @ticket.title
|
meta.head = @ticket.title
|
||||||
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
||||||
meta.class = "level-#{@ticket.priority_id}"
|
meta.class = "level-#{@ticket.level()}"
|
||||||
meta
|
meta
|
||||||
|
|
||||||
url: =>
|
url: =>
|
||||||
|
|
|
@ -27,11 +27,20 @@ class App.Ticket extends App.Model
|
||||||
uiUrl: ->
|
uiUrl: ->
|
||||||
'#ticket/zoom/' + @id
|
'#ticket/zoom/' + @id
|
||||||
|
|
||||||
|
level: (user) ->
|
||||||
|
state = App.TicketState.find( @state_id )
|
||||||
|
level = 1
|
||||||
|
if state.name is 'new' || state.name is 'open'
|
||||||
|
level = 2
|
||||||
|
else if state.name is 'pending'
|
||||||
|
level = 3
|
||||||
|
level
|
||||||
|
|
||||||
icon: (user) ->
|
icon: (user) ->
|
||||||
"priority icon level-#{ @priority_id }"
|
"priority icon level-#{ @level() }"
|
||||||
|
|
||||||
iconTitle: (user) ->
|
iconTitle: (user) ->
|
||||||
App.TicketPriority.find( @priority_id ).displayName()
|
App.TicketState.find( @state_id ).displayName()
|
||||||
|
|
||||||
iconActivity: (user) ->
|
iconActivity: (user) ->
|
||||||
if @owner_id == user.id
|
if @owner_id == user.id
|
||||||
|
|
Loading…
Reference in a new issue