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

49 lines
1.4 KiB
Handlebars
Raw Normal View History

2015-07-04 00:00:59 +08:00
<h3>{{model.title}}</h3>
<div class="admin-reports-filter">
{{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}}
{{#if showGroupOptions}}
{{combo-box valueAttribute="value" content=groupOptions value=groupId}}
{{/if}}
2015-01-15 04:36:38 +08:00
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
2015-09-16 04:52:46 +08:00
{{d-button action="exportCsv" label="admin.export_csv.button_text" icon="download"}}
</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 viewingGraph}}
{{i18n 'admin.dashboard.reports.view_graph'}}
{{else}}
<a href {{action "viewAsGraph"}}>{{i18n 'admin.dashboard.reports.view_graph'}}</a>
{{/if}}
</div>
2015-04-29 05:05:06 +08:00
{{#conditional-loading-spinner condition=refreshing}}
{{#if viewingGraph}}
{{admin-graph model=model}}
{{else}}
<table class='table report'>
<tr>
2015-07-04 00:00:59 +08:00
<th>{{model.xaxis}}</th>
<th>{{model.yaxis}}</th>
</tr>
2015-07-04 00:00:59 +08:00
{{#each row in model.dataReversed}}
<tr>
<td>{{row.x}}</td>
<td>
{{row.y}}
</td>
</tr>
{{/each}}
</table>
{{/if}}
2015-04-29 05:05:06 +08:00
{{/conditional-loading-spinner}}