discourse/app/assets/javascripts/admin/templates/reports.hbs

48 lines
1.4 KiB
Handlebars
Raw Normal View History

2015-07-03 12:00:59 -04:00
<h3>{{model.title}}</h3>
<div>
{{i18n 'admin.dashboard.reports.start_date'}} {{input type="date" value=startDate}}
{{i18n 'admin.dashboard.reports.end_date'}} {{input type="date" value=endDate}}
{{combo-box valueAttribute="value" content=categoryOptions value=categoryId}}
2015-01-14 15:36:38 -05:00
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
</div>
<div class='view-options'>
{{#if viewingTable}}
{{i18n 'admin.dashboard.reports.view_table'}}
{{else}}
<a href {{action "viewAsTable"}}>{{i18n 'admin.dashboard.reports.view_table'}}</a>
{{/if}}
|
{{#if viewingBarChart}}
{{i18n 'admin.dashboard.reports.view_chart'}}
{{else}}
<a href {{action "viewAsBarChart"}}>{{i18n 'admin.dashboard.reports.view_chart'}}</a>
{{/if}}
</div>
2015-04-28 17:05:06 -04:00
{{#conditional-loading-spinner condition=refreshing}}
<table class='table report'>
<tr>
2015-07-03 12:00:59 -04:00
<th>{{model.xaxis}}</th>
<th>{{model.yaxis}}</th>
</tr>
2015-07-03 12:00:59 -04:00
{{#each row in model.dataReversed}}
<tr>
<td>{{row.x}}</td>
<td>
{{#if viewingTable}}
{{row.y}}
{{/if}}
{{#if viewingBarChart}}
<div class='bar-container'>
<div class='bar' style="width: {{unbound row.percentage}}%">{{row.y}}</div>
</div>
{{/if}}
</td>
</tr>
{{/each}}
</table>
2015-04-28 17:05:06 -04:00
{{/conditional-loading-spinner}}