Show icon / state title on every ticket and task overview. Also added meta info about "escalated" or "reminder reached" to icon title.
This commit is contained in:
parent
6fef8de600
commit
19d4cb4559
8 changed files with 21 additions and 8 deletions
|
@ -290,7 +290,7 @@ class Table extends App.Controller
|
|||
value = ' '
|
||||
attribute.class = object.iconClass()
|
||||
attribute.link = ''
|
||||
attribute.title = App.i18n.translateInline( object.iconTitle() )
|
||||
attribute.title = object.iconTitle()
|
||||
value
|
||||
|
||||
new App.ControllerTable(
|
||||
|
|
|
@ -82,6 +82,7 @@ class App.TicketZoom extends App.Controller
|
|||
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
||||
meta.class = "task-state-#{ @ticket.getState() }"
|
||||
meta.type = 'task'
|
||||
meta.iconTitle = @ticket.iconTitle()
|
||||
meta.iconClass = @ticket.iconClass()
|
||||
meta
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class App.TicketList extends App.Controller
|
|||
value = ' '
|
||||
attribute.class = object.iconClass()
|
||||
attribute.link = ''
|
||||
attribute.title = App.i18n.translateInline( object.iconTitle() )
|
||||
attribute.title = object.iconTitle()
|
||||
value
|
||||
|
||||
list = []
|
||||
|
|
|
@ -38,7 +38,13 @@ class App.Ticket extends App.Model
|
|||
# if ticket is escalated, overwrite state
|
||||
if @escalation_time && new Date( Date.parse( @escalation_time ) ) < new Date
|
||||
state = 'escalating'
|
||||
else if stateType.name is 'pending reminder' || stateType.name is 'pending action'
|
||||
else if stateType.name is 'pending reminder'
|
||||
state = 'pending'
|
||||
|
||||
# if ticket pending_time is reached, overwrite state
|
||||
if @pending_time && new Date( Date.parse( @pending_time ) ) < new Date
|
||||
state = 'open'
|
||||
else if stateType.name is 'pending action'
|
||||
state = 'pending'
|
||||
state
|
||||
|
||||
|
@ -49,7 +55,13 @@ class App.Ticket extends App.Model
|
|||
@getState()
|
||||
|
||||
iconTitle: ->
|
||||
App.TicketState.find( @state_id ).displayName()
|
||||
type = App.TicketState.find( @state_id )
|
||||
stateType = App.TicketStateType.find( type.state_type_id )
|
||||
if stateType.name is 'pending reminder' && @pending_time && new Date( Date.parse( @pending_time ) ) < new Date
|
||||
return "#{App.i18n.translateInline(type.displayName())} - #{App.i18n.translateInline('reached')}"
|
||||
if @escalation_time && new Date( Date.parse( @escalation_time ) ) < new Date
|
||||
return "#{App.i18n.translateInline(type.displayName())} - #{App.i18n.translateInline('escalated')}"
|
||||
App.i18n.translateInline(type.displayName())
|
||||
|
||||
iconTextClass: ->
|
||||
"task-state-#{ @getState() }-color"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div>
|
||||
<%- @Icon(@ticket.icon(), @ticket.iconClass()) %> <span class="<%- @T(@ticket.iconTextClass()) %>"><%- @T(@ticket.iconTitle()) %></span>
|
||||
<%- @Icon(@ticket.icon(), @ticket.iconClass()) %> <span class="<%- @T(@ticket.iconTextClass()) %>"><%- @ticket.iconTitle() %></span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="popover-block">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<ol class="tasks tasks--standalone">
|
||||
<% for ticket in @tickets: %>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="icon-holder" title="<%- ticket.iconTitle() %>">
|
||||
<%- @Icon('task-state', ticket.iconClass()) %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% for item in @item_list: %>
|
||||
<a href="<%- item.data.url %>" title="<%= item.data.title %>" class="nav-tab task <%= item.data.class %><% if item.task.active: %> is-active<% end %><% if item.task.notify: %> is-modified<% end %>" data-key="<%- item.task.key %>">
|
||||
<div class="nav-tab-icon">
|
||||
<div class="nav-tab-icon" title="<%- @T(item.data.iconTitle) %>">
|
||||
<% if item.data.type is 'task': %>
|
||||
<% if item.task.notify: %>
|
||||
<%- @Icon('task-state-modified-outer-circle', "icon-#{item.data.iconClass}") %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% for ticket_id in @ticket_ids_show: %>
|
||||
<% ticket = App.Ticket.fullLocal(ticket_id) %>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="icon-holder" title="<%- ticket.iconTitle() %>">
|
||||
<%- @Icon('task-state', ticket.iconClass()) %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
|
|
Loading…
Reference in a new issue