From 88ef274c633ce79b709f11fc36c7d082d0c3c11a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 10 Nov 2014 08:39:52 +0100 Subject: [PATCH] Added total count of user/org tickets to tabs. --- .../javascripts/app/controllers/widget/ticket_stats.js.coffee | 2 ++ app/assets/javascripts/app/views/widget/ticket_stats.jst.eco | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee index 53904cc51..8ff1600be 100644 --- a/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/ticket_stats.js.coffee @@ -54,7 +54,9 @@ class App.TicketStats extends App.Controller @html App.view('widget/ticket_stats')( user: @user + user_total: data.user_tickets_open_ids.length + data.user_tickets_closed_ids.length organization: @organization + org_total: data.org_tickets_open_ids.length + data.org_tickets_closed_ids.length ) if @organization diff --git a/app/assets/javascripts/app/views/widget/ticket_stats.jst.eco b/app/assets/javascripts/app/views/widget/ticket_stats.jst.eco index 7c823d2c5..8eb80ec61 100644 --- a/app/assets/javascripts/app/views/widget/ticket_stats.jst.eco +++ b/app/assets/javascripts/app/views/widget/ticket_stats.jst.eco @@ -1,7 +1,7 @@ <% if @user && @user.organization: %>
-
<%- @T('Tickets of User') %>
-
<%- @T('Tickets of Organization') %>
+
<%- @T('Tickets of User') %> <%- "(" + @user_total + ")" %>
+
<%- @T('Tickets of Organization') %> <%- "(" + @org_total + ")" %>
<% end %>