Add moderator and admin count to dashboard

This commit is contained in:
Neil Lalonde
2013-03-22 17:50:22 -04:00
parent 86eaf10c3e
commit 158cda7628
6 changed files with 33 additions and 11 deletions

View File

@@ -26,7 +26,8 @@ Discourse.AdminDashboardRoute = Discourse.Route.extend({
d.reports.each(function(report){
c.set(report.type, Discourse.Report.create(report));
});
c.set('totalUsers', d.total_users);
c.set('admins', d.admins);
c.set('moderators', d.moderators);
c.set('problems', d.problems);
c.set('loading', false);
});

View File

@@ -71,7 +71,6 @@
<th>2</th>
<th>3</th>
<th>4</th>
<th>{{i18n admin.dashboard.moderator_short}}</th>
</tr>
</thead>
{{#unless loading}}
@@ -80,6 +79,21 @@
</table>
</div>
<div class="dashboard-stats totals">
<table class="table table-condensed table-hover">
<tbody>
<tr>
<td class="title">{{i18n admin.dashboard.moderators}}</td>
<td class="value">{{moderators}}</td>
</tr>
<tr>
<td class="title">{{i18n admin.dashboard.admins}}</td>
<td class="value">{{admins}}</td>
</tr>
</tbody>
</table>
</div>
<div class="dashboard-stats">
<table class="table table-condensed table-hover">
<thead>

View File

@@ -5,5 +5,4 @@
<td class="value">{{valueAtTrustLevel data 2}}</td>
<td class="value">{{valueAtTrustLevel data 3}}</td>
<td class="value">{{valueAtTrustLevel data 4}}</td>
<td class="value">{{valueAtTrustLevel data 5}}</td>
</tr>