Improved url of ticket views.
This commit is contained in:
parent
7f4686ad71
commit
3335105d41
4 changed files with 9 additions and 13 deletions
|
@ -9,7 +9,7 @@ class Index extends App.Controller
|
||||||
|
|
||||||
# check role
|
# check role
|
||||||
if @isRole('Customer')
|
if @isRole('Customer')
|
||||||
@navigate '#ticket_view/my_tickets'
|
@navigate '#ticket/view/my_tickets'
|
||||||
return
|
return
|
||||||
|
|
||||||
if @Config.get('default_controller')
|
if @Config.get('default_controller')
|
||||||
|
|
|
@ -276,7 +276,7 @@ class App.Navigation extends App.Controller
|
||||||
# remove old views
|
# remove old views
|
||||||
NavBar = @Config.get( 'NavBar' ) || {}
|
NavBar = @Config.get( 'NavBar' ) || {}
|
||||||
for key of NavBar
|
for key of NavBar
|
||||||
if NavBar[key].parent is '#ticket_view'
|
if NavBar[key].parent is '#ticket/view'
|
||||||
delete NavBar[key]
|
delete NavBar[key]
|
||||||
|
|
||||||
# add new views
|
# add new views
|
||||||
|
|
|
@ -41,7 +41,7 @@ class Table extends App.ControllerContent
|
||||||
|
|
||||||
# set title
|
# set title
|
||||||
@title ''
|
@title ''
|
||||||
@navupdate '#ticket_view/' + @view
|
@navupdate '#ticket/view/' + @view
|
||||||
|
|
||||||
@meta = {}
|
@meta = {}
|
||||||
@bulk = {}
|
@bulk = {}
|
||||||
|
@ -542,7 +542,7 @@ class Navbar extends App.Controller
|
||||||
|
|
||||||
# add new views
|
# add new views
|
||||||
for item in data
|
for item in data
|
||||||
item.target = '#ticket_view/' + item.link
|
item.target = '#ticket/view/' + item.link
|
||||||
if item.link is @view
|
if item.link is @view
|
||||||
item.active = true
|
item.active = true
|
||||||
else
|
else
|
||||||
|
@ -605,12 +605,8 @@ class Router extends App.Controller
|
||||||
else
|
else
|
||||||
@navigate 'ticket/zoom/' + @ticket_ids[ @position - 1 ] + '/nav/true'
|
@navigate 'ticket/zoom/' + @ticket_ids[ @position - 1 ] + '/nav/true'
|
||||||
|
|
||||||
App.Config.set( 'ticket_view', Index, 'Routes' )
|
App.Config.set( 'ticket/view', Index, 'Routes' )
|
||||||
App.Config.set( 'ticket_view/:view', Index, 'Routes' )
|
App.Config.set( 'ticket/view/:view', Index, 'Routes' )
|
||||||
#App.Config.set( 'ticket_view/:view/:position/:direction', Router, 'Routes' )
|
#App.Config.set( 'ticket/view/:view/:position/:direction', Router, 'Routes' )
|
||||||
|
|
||||||
App.Config.set( 'TicketOverview', { prio: 1000, parent: '', name: 'Overviews', target: '#ticket_view', role: ['Agent', 'Customer'] }, 'NavBar' )
|
App.Config.set( 'TicketOverview', { prio: 1000, parent: '', name: 'Overviews', target: '#ticket/view', role: ['Agent', 'Customer'] }, 'NavBar' )
|
||||||
#App.Config.set( '', { prio: 1000, parent: '#ticket_view', name: 'My assigned Tickets (51)', target: '#ticket_view/my_assigned', role: ['Agent'] }
|
|
||||||
#App.Config.set( '', { prio: 1000, parent: '#ticket_view', name: 'Unassigned Tickets (133)', target: '#ticket_view/all_unassigned', role: ['Agent'] }
|
|
||||||
|
|
||||||
#App.Config.set( 'TicketOverview', { prio: 1700, parent: '', name: 'Overviews', target: '#ticket_view', role: ['Customer'] }, 'NavBar' )
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<% if @C( 'LastOverview' ) && @nav: %>
|
<% if @C( 'LastOverview' ) && @nav: %>
|
||||||
<div class="pagination pagination-small pagination-right">
|
<div class="pagination pagination-small pagination-right">
|
||||||
<span class="count"><%= @C( 'LastOverviewPosition' ) %>/<%= @C( 'LastOverviewTotal' ) %></span>
|
<span class="count"><%= @C( 'LastOverviewPosition' ) %>/<%= @C( 'LastOverviewTotal' ) %></span>
|
||||||
<% base_url ="#ticket_view/#{ @C('LastOverview') }/#{ @C('LastOverviewPosition') }/" %>
|
<% base_url ="#ticket/view/#{ @C('LastOverview') }/#{ @C('LastOverviewPosition') }/" %>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="<% if @C('LastOverviewPosition') <= 1: %>disabled<% end %>"><a href="<%- base_url %>previous" title="<%- @Ti( 'previous Ticket in Overview' ) %>">«</a></li>
|
<li class="<% if @C('LastOverviewPosition') <= 1: %>disabled<% end %>"><a href="<%- base_url %>previous" title="<%- @Ti( 'previous Ticket in Overview' ) %>">«</a></li>
|
||||||
<li class="<% if @C('LastOverviewPosition') is @C('LastOverviewTotal'): %>disabled<% end %>"><a href="<%- base_url %>next" title="<%- @Ti( 'next Ticket in Overview' ) %>">»</a></li>
|
<li class="<% if @C('LastOverviewPosition') is @C('LastOverviewTotal'): %>disabled<% end %>"><a href="<%- base_url %>next" title="<%- @Ti( 'next Ticket in Overview' ) %>">»</a></li>
|
||||||
|
|
Loading…
Reference in a new issue