mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 07:51:36 +08:00
52 lines
1.6 KiB
Handlebars
52 lines
1.6 KiB
Handlebars
<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}}
|
|
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
|
{{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 viewingBarChart}}
|
|
{{i18n 'admin.dashboard.reports.view_chart'}}
|
|
{{else}}
|
|
<a href {{action "viewAsBarChart"}}>{{i18n 'admin.dashboard.reports.view_chart'}}</a>
|
|
{{/if}}
|
|
</div>
|
|
|
|
{{#conditional-loading-spinner condition=refreshing}}
|
|
<table class='table report'>
|
|
<tr>
|
|
<th>{{model.xaxis}}</th>
|
|
<th>{{model.yaxis}}</th>
|
|
</tr>
|
|
|
|
{{#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>
|
|
{{/conditional-loading-spinner}}
|