diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index 2256beecd..9398a578c 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -1,5 +1,5 @@ - + sprite Created with Sketch (http://www.bohemiancoding.com/sketch) @@ -93,5 +93,7 @@ + + \ No newline at end of file diff --git a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee index cbd90d78b..fc086d6ac 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee @@ -71,12 +71,17 @@ class App.DashboardTicket extends App.Controller @overview = data.overview @tickets_count = data.tickets_count @ticket_ids = data.ticket_ids - per_page = @overview.view.per_page || 10 + per_page = Math.min(@overview.view.per_page || 10, @tickets_count) + tickets_from = @start_page * per_page + tickets_till = Math.max(tickets_from + per_page-1, 0) pages_total = parseInt( ( @tickets_count / per_page ) + 0.99999 ) || 1 html = App.view('dashboard/ticket')( - overview: @overview, - pages_total: pages_total, - start_page: @start_page, + overview: @overview, + pages_total: pages_total, + start_page: @start_page, + tickets_from: tickets_from, + tickets_till: tickets_till, + tickets_count: @tickets_count ) html = $(html) html.find('li').removeClass('active') diff --git a/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco b/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco index 2cca743b8..c55584211 100644 --- a/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_view/content.jst.eco @@ -1,4 +1,4 @@ - -
+