diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 13d38b69d..8e3ddc051 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -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 diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index 584f3a051..940e956dc 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -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: => diff --git a/app/assets/javascripts/app/models/organization.coffee b/app/assets/javascripts/app/models/organization.coffee index b14c7ce35..129cd6160 100644 --- a/app/assets/javascripts/app/models/organization.coffee +++ b/app/assets/javascripts/app/models/organization.coffee @@ -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' diff --git a/app/assets/javascripts/app/models/ticket.coffee b/app/assets/javascripts/app/models/ticket.coffee index 985868aef..c6765c26f 100644 --- a/app/assets/javascripts/app/models/ticket.coffee +++ b/app/assets/javascripts/app/models/ticket.coffee @@ -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() diff --git a/app/assets/javascripts/app/models/user.coffee b/app/assets/javascripts/app/models/user.coffee index 67bf21035..db84ee9ee 100644 --- a/app/assets/javascripts/app/models/user.coffee +++ b/app/assets/javascripts/app/models/user.coffee @@ -131,4 +131,4 @@ class App.User extends App.Model id: @id class: 'user user-popover' url: @uiUrl() - iconClass: 'user' + icon: 'user' diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index 503c5bae1..a42ecb081 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -73,7 +73,7 @@