Added total count of user/org tickets to tabs.

This commit is contained in:
Martin Edenhofer 2014-11-10 08:39:52 +01:00
parent 7b4015179f
commit 88ef274c63
2 changed files with 4 additions and 2 deletions

View file

@ -54,7 +54,9 @@ class App.TicketStats extends App.Controller
@html App.view('widget/ticket_stats')( @html App.view('widget/ticket_stats')(
user: @user user: @user
user_total: data.user_tickets_open_ids.length + data.user_tickets_closed_ids.length
organization: @organization organization: @organization
org_total: data.org_tickets_open_ids.length + data.org_tickets_closed_ids.length
) )
if @organization if @organization

View file

@ -1,7 +1,7 @@
<% if @user && @user.organization: %> <% if @user && @user.organization: %>
<div class="tabs wide-tabs horizontal"> <div class="tabs wide-tabs horizontal">
<div class="tab js-userTab active"><%- @T('Tickets of User') %></div> <div class="tab js-userTab active"><%- @T('Tickets of User') %> <%- "(" + @user_total + ")" %></div>
<div class="tab js-orgTab"><%- @T('Tickets of Organization') %></div> <div class="tab js-orgTab"><%- @T('Tickets of Organization') %> <%- "(" + @org_total + ")" %></div>
</div> </div>
<% end %> <% end %>