rename priority to task-state and add new colors
This commit is contained in:
parent
e647c1eb94
commit
edcd7d925e
16 changed files with 72 additions and 77 deletions
|
@ -275,7 +275,7 @@ class Table extends App.Controller
|
|||
header
|
||||
callbackIcon = (value, object, attribute, header, refObject) ->
|
||||
value = ' '
|
||||
attribute.class = object.icon()
|
||||
attribute.class = object.iconClass()
|
||||
attribute.link = ''
|
||||
attribute.title = App.i18n.translateInline( object.iconTitle() )
|
||||
value
|
||||
|
|
|
@ -80,8 +80,9 @@ 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.level()}"
|
||||
meta.iconClass = 'priority'
|
||||
meta.class = "task-state-#{ @ticket.getState() }"
|
||||
meta.type = 'task'
|
||||
meta.iconClass = @ticket.iconClass()
|
||||
meta
|
||||
|
||||
url: =>
|
||||
|
|
|
@ -44,4 +44,4 @@ Mit **Organisationen** können Sie Kunden **gruppieren**. Dies hat u. a. zwei be
|
|||
id: @id
|
||||
class: 'organization organization-popover'
|
||||
url: @uiUrl()
|
||||
iconClass: 'organization'
|
||||
icon: 'organization'
|
||||
|
|
|
@ -28,24 +28,27 @@ class App.Ticket extends App.Model
|
|||
uiUrl: ->
|
||||
'#ticket/zoom/' + @id
|
||||
|
||||
level: ->
|
||||
state = App.TicketState.find( @state_id )
|
||||
stateType = App.TicketStateType.find( state.state_type_id )
|
||||
level = 1
|
||||
getState: ->
|
||||
type = App.TicketState.find( @state_id )
|
||||
stateType = App.TicketStateType.find( type.state_type_id )
|
||||
state = 'closed'
|
||||
if stateType.name is 'new' || stateType.name is 'open'
|
||||
level = 2
|
||||
state = 'open'
|
||||
else if stateType.name is 'pending reminder' || stateType.name is 'pending action'
|
||||
level = 3
|
||||
level
|
||||
state = 'pending'
|
||||
state
|
||||
|
||||
icon: ->
|
||||
"icon-priority level-#{ @level() }"
|
||||
"task-state"
|
||||
|
||||
iconClass: ->
|
||||
@getState()
|
||||
|
||||
iconTitle: ->
|
||||
App.TicketState.find( @state_id ).displayName()
|
||||
|
||||
iconTextClass: ->
|
||||
"level-#{ @level() }"
|
||||
"task-state-#{ @getState() }-color"
|
||||
|
||||
iconActivity: (user) ->
|
||||
if @owner_id == user.id
|
||||
|
@ -54,6 +57,7 @@ class App.Ticket extends App.Model
|
|||
searchResultAttributes: ->
|
||||
display: "##{@number} - #{@title}"
|
||||
id: @id
|
||||
class: "level-#{@level()} ticket-popover"
|
||||
class: "task-state-#{ @getState() } ticket-popover"
|
||||
url: @uiUrl()
|
||||
iconClass: 'priority'
|
||||
icon: 'task-state'
|
||||
iconClass: @getState()
|
||||
|
|
|
@ -131,4 +131,4 @@ class App.User extends App.Model
|
|||
id: @id
|
||||
class: 'user user-popover'
|
||||
url: @uiUrl()
|
||||
iconClass: 'user'
|
||||
icon: 'user'
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
<td <% if item.parentClass: %>class="<%= item.parentClass %>"<% end %> <% if item.title: %>title="<%= item.title %>"<% end %>>
|
||||
<% if item.name is 'icon': %>
|
||||
<%- @Icon('priority', item.class) %>
|
||||
<%- @Icon('task-state', item.class) %>
|
||||
<% else: %>
|
||||
<% if item.link: %>
|
||||
<a href="<%- item.link %>" <% if item.target: %>target="<%= item.target %>"<% end %>>
|
||||
|
|
|
@ -372,33 +372,33 @@
|
|||
<div class="profile-ticketList">
|
||||
<label>Bearbeitete Tickets (12)</label>
|
||||
<ol class="tasks tasks--standalone">
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="priority icon"></div>
|
||||
<%- @Icon('task-state', 'escalating') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Micro-SIM doesn't work</div>
|
||||
<div class="time">23 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="priority icon"></div>
|
||||
<%- @Icon('task-state', 'open') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Superb Service!</div>
|
||||
<div class="time">43 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="priority icon"></div>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Print sheets strip off</div>
|
||||
<div class="time">1 hour ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<div class="priority icon"></div>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Block not properly wrought</div>
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<ol class="tasks tasks--standalone">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-2"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'open') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Micro-SIM doesn't work</div>
|
||||
|
@ -84,7 +84,7 @@
|
|||
</div>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-2"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'pending') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Superb Service here_with_some_extrem_example_sting_witch_can_really_be!</div>
|
||||
|
@ -92,7 +92,7 @@
|
|||
</div>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-2"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Print sheets strip off</div>
|
||||
|
@ -100,7 +100,7 @@
|
|||
</div>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-2"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Block not properly wrought</div>
|
||||
|
@ -114,7 +114,7 @@
|
|||
<ol class="tasks tasks--standalone">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-1"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'pending') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Micro-SIM doesn't work</div>
|
||||
|
@ -122,7 +122,7 @@
|
|||
</div>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority level-1"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Superb Service!</div>
|
||||
|
|
|
@ -326,9 +326,7 @@
|
|||
<tbody>
|
||||
<tr class="item" data-id="1" data-position="1" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-1">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
@ -347,9 +345,7 @@
|
|||
</tr>
|
||||
<tr class="item" data-id="6" data-position="6" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-2">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
|
|
@ -72,9 +72,7 @@
|
|||
<tbody>
|
||||
<tr class="item" data-id="1" data-position="1" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-1">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
@ -93,9 +91,7 @@
|
|||
</tr>
|
||||
<tr class="item" data-id="3" data-position="3" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-2">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="4" data-original-title="" title="">
|
||||
Hans Huber
|
||||
|
@ -114,9 +110,7 @@
|
|||
</tr>
|
||||
<tr class="item" data-id="4" data-position="4" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-3">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
@ -135,9 +129,7 @@
|
|||
</tr>
|
||||
<tr class="item" data-id="5" data-position="5" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-3">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
@ -156,9 +148,7 @@
|
|||
</tr>
|
||||
<tr class="item" data-id="6" data-position="6" style="cursor: pointer;">
|
||||
<td>
|
||||
<svg class="icon-priority level-2">
|
||||
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-priority"></use>
|
||||
</svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</td>
|
||||
<td> <span class="user-popover" data-id="2" data-original-title="" title="">
|
||||
Nicole Braun (Zammad Foundation)
|
||||
|
|
|
@ -66,33 +66,33 @@
|
|||
<div class="profile-ticketList">
|
||||
<label>Bearbeitete Tickets (12)</label>
|
||||
<ol class="tasks tasks--standalone">
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Micro-SIM doesn't work</div>
|
||||
<div class="time">23 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Superb Service!</div>
|
||||
<div class="time">43 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Print sheets strip_off_with_a_lot_of_text_in_the_headline</div>
|
||||
<div class="time">1 hour ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Block not properly wrought</div>
|
||||
|
@ -104,33 +104,33 @@
|
|||
<div class="profile-ticketList">
|
||||
<label>Bearbeitete Tickets (12)</label>
|
||||
<ol class="tasks tasks--standalone">
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Micro-SIM doesn't work</div>
|
||||
<div class="time">23 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Superb Service!</div>
|
||||
<div class="time">43 minutes ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Print sheets strip off with a lot of text in the headline</div>
|
||||
<div class="time">1 hour ago</div>
|
||||
</div>
|
||||
<li class="task level-1">
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<svg class="icon-priority"><use xlink:href="#icon-priority" /></svg>
|
||||
<%- @Icon('task-state', 'closed') %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<div class="name">Block not properly wrought</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% for item in @links[type]: %>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<%- @Icon('priority', item.icon()) %>
|
||||
<%- @Icon('task-state', item.iconClass()) %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<a class="name ticket-popover" data-id="<%- item.id %>" href="#ticket/zoom/<%= item.id %>"><%= item.title %></a>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<li>
|
||||
<a href="<%- item.url %>" class="nav-tab nav-tab--search <%= item.class %>" data-id="<%= item.id %>">
|
||||
<div class="nav-tab-icon">
|
||||
<%- @Icon(item.iconClass) %>
|
||||
<%- @Icon(item.icon, item.iconClass) %>
|
||||
</div>
|
||||
<span class="nav-tab-name flex u-textTruncate"><%= item.display %></span>
|
||||
</a>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div>
|
||||
<span class="<%- @ticket.icon() %>" title="<%- @ticket.iconTitle() %>"></span> <span class="<%- @ticket.iconTextClass() %>"><%- @ticket.iconTitle() %></span>
|
||||
<%- @Icon(@ticket.icon, @ticket.iconClass) %> <span class="<%- @ticket.iconTextClass() %>"><%- @ticket.iconTitle() %></span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="popover-block">
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
<% 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">
|
||||
<% if item.task.notify && item.data.iconClass is 'priority': %>
|
||||
<%- @Icon('priority-modified-outer-circle', "icon-#{item.data.iconClass}") %>
|
||||
<% if item.data.type is 'task': %>
|
||||
<% if item.task.notify: %>
|
||||
<%- @Icon('task-state-modified-outer-circle', "icon-#{item.data.iconClass}") %>
|
||||
<% else: %>
|
||||
<%- @Icon('task-state', item.data.iconClass) %>
|
||||
<% end %>
|
||||
<% if item.task.notify: %>
|
||||
<%- @Icon('task-state-modified-inner-circle', "modified-inner-circle icon-#{item.data.iconClass}") %>
|
||||
<% end %>
|
||||
<% else: %>
|
||||
<%- @Icon(item.data.iconClass) %>
|
||||
<% end %>
|
||||
<% if item.task.notify && item.data.iconClass is 'priority': %>
|
||||
<%- @Icon('priority-modified-inner-circle', "modified-inner-circle icon-#{item.data.iconClass}") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="nav-tab-name u-textTruncate flex"><%= item.data.head %></div>
|
||||
<div class="nav-tab-close js-close" title="<%- @Ti('close') %>">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<% ticket = App.Ticket.fullLocal(ticket_id) %>
|
||||
<li class="task">
|
||||
<div class="icon-holder">
|
||||
<%- @Icon('priority', ticket.icon()) %>
|
||||
<%- @Icon('task-state', ticket.iconClass()) %>
|
||||
</div>
|
||||
<div class="task-text">
|
||||
<a class="name ticket-popover" data-id="<%- ticket_id %>" href="<%- ticket.uiUrl() %>"><%= ticket.title %></a>
|
||||
|
|
Loading…
Reference in a new issue