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 )
|
||||
meta.head = @ticket.title
|
||||
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
||||
meta.class = "level-#{@ticket.priority_id}"
|
||||
meta.class = "level-#{@ticket.level()}"
|
||||
meta
|
||||
|
||||
url: =>
|
||||
|
|
|
@ -27,11 +27,20 @@ class App.Ticket extends App.Model
|
|||
uiUrl: ->
|
||||
'#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) ->
|
||||
"priority icon level-#{ @priority_id }"
|
||||
"priority icon level-#{ @level() }"
|
||||
|
||||
iconTitle: (user) ->
|
||||
App.TicketPriority.find( @priority_id ).displayName()
|
||||
App.TicketState.find( @state_id ).displayName()
|
||||
|
||||
iconActivity: (user) ->
|
||||
if @owner_id == user.id
|
||||
|
|
Loading…
Reference in a new issue