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 = ' '
|
value = ' '
|
||||||
attribute.class = object.iconClass()
|
attribute.class = object.iconClass()
|
||||||
attribute.link = ''
|
attribute.link = ''
|
||||||
attribute.title = App.i18n.translateInline( object.iconTitle() )
|
attribute.title = object.iconTitle()
|
||||||
value
|
value
|
||||||
|
|
||||||
new App.ControllerTable(
|
new App.ControllerTable(
|
||||||
|
|
|
@ -82,6 +82,7 @@ class App.TicketZoom extends App.Controller
|
||||||
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
meta.title = '#' + @ticket.number + ' - ' + @ticket.title
|
||||||
meta.class = "task-state-#{ @ticket.getState() }"
|
meta.class = "task-state-#{ @ticket.getState() }"
|
||||||
meta.type = 'task'
|
meta.type = 'task'
|
||||||
|
meta.iconTitle = @ticket.iconTitle()
|
||||||
meta.iconClass = @ticket.iconClass()
|
meta.iconClass = @ticket.iconClass()
|
||||||
meta
|
meta
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class App.TicketList extends App.Controller
|
||||||
value = ' '
|
value = ' '
|
||||||
attribute.class = object.iconClass()
|
attribute.class = object.iconClass()
|
||||||
attribute.link = ''
|
attribute.link = ''
|
||||||
attribute.title = App.i18n.translateInline( object.iconTitle() )
|
attribute.title = object.iconTitle()
|
||||||
value
|
value
|
||||||
|
|
||||||
list = []
|
list = []
|
||||||
|
|
|
@ -38,7 +38,13 @@ class App.Ticket extends App.Model
|
||||||
# if ticket is escalated, overwrite state
|
# if ticket is escalated, overwrite state
|
||||||
if @escalation_time && new Date( Date.parse( @escalation_time ) ) < new Date
|
if @escalation_time && new Date( Date.parse( @escalation_time ) ) < new Date
|
||||||
state = 'escalating'
|
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 = 'pending'
|
||||||
state
|
state
|
||||||
|
|
||||||
|
@ -49,7 +55,13 @@ class App.Ticket extends App.Model
|
||||||
@getState()
|
@getState()
|
||||||
|
|
||||||
iconTitle: ->
|
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: ->
|
iconTextClass: ->
|
||||||
"task-state-#{ @getState() }-color"
|
"task-state-#{ @getState() }-color"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div>
|
<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>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="popover-block">
|
<div class="popover-block">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<ol class="tasks tasks--standalone">
|
<ol class="tasks tasks--standalone">
|
||||||
<% for ticket in @tickets: %>
|
<% for ticket in @tickets: %>
|
||||||
<li class="task">
|
<li class="task">
|
||||||
<div class="icon-holder">
|
<div class="icon-holder" title="<%- ticket.iconTitle() %>">
|
||||||
<%- @Icon('task-state', ticket.iconClass()) %>
|
<%- @Icon('task-state', ticket.iconClass()) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="task-text">
|
<div class="task-text">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% for item in @item_list: %>
|
<% 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 %>">
|
<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.data.type is 'task': %>
|
||||||
<% if item.task.notify: %>
|
<% if item.task.notify: %>
|
||||||
<%- @Icon('task-state-modified-outer-circle', "icon-#{item.data.iconClass}") %>
|
<%- @Icon('task-state-modified-outer-circle', "icon-#{item.data.iconClass}") %>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<% for ticket_id in @ticket_ids_show: %>
|
<% for ticket_id in @ticket_ids_show: %>
|
||||||
<% ticket = App.Ticket.fullLocal(ticket_id) %>
|
<% ticket = App.Ticket.fullLocal(ticket_id) %>
|
||||||
<li class="task">
|
<li class="task">
|
||||||
<div class="icon-holder">
|
<div class="icon-holder" title="<%- ticket.iconTitle() %>">
|
||||||
<%- @Icon('task-state', ticket.iconClass()) %>
|
<%- @Icon('task-state', ticket.iconClass()) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="task-text">
|
<div class="task-text">
|
||||||
|
|
Loading…
Reference in a new issue