2014-11-06 03:46:27 +08:00
|
|
|
<h3>{{title}}</h3>
|
2013-02-28 11:39:42 +08:00
|
|
|
|
2014-11-06 03:46:27 +08:00
|
|
|
<div>
|
|
|
|
{{i18n admin.dashboard.reports.start_date}} {{input type="date" value=startDate}}
|
|
|
|
{{i18n admin.dashboard.reports.end_date}} {{input type="date" value=endDate}}
|
2014-11-13 04:10:36 +08:00
|
|
|
<button {{action "refreshReport"}} class='btn btn-primary'>{{i18n admin.dashboard.reports.refresh_report}}</button>
|
2014-11-06 03:46:27 +08:00
|
|
|
</div>
|
2013-03-18 03:02:36 +08:00
|
|
|
|
2014-11-06 03:46:27 +08:00
|
|
|
<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>
|
2013-03-18 03:02:36 +08:00
|
|
|
|
2014-11-13 04:10:36 +08:00
|
|
|
{{#loading-spinner condition=refreshing}}
|
2013-03-18 03:02:36 +08:00
|
|
|
<table class='table report'>
|
2013-02-28 11:39:42 +08:00
|
|
|
<tr>
|
2013-02-28 23:00:54 +08:00
|
|
|
<th>{{xaxis}}</th>
|
|
|
|
<th>{{yaxis}}</th>
|
2013-02-28 11:39:42 +08:00
|
|
|
</tr>
|
|
|
|
|
2014-06-07 05:08:35 +08:00
|
|
|
{{#each row in dataReversed}}
|
2013-02-28 11:39:42 +08:00
|
|
|
<tr>
|
2013-05-21 01:42:26 +08:00
|
|
|
<td>{{row.x}}</td>
|
2013-03-18 03:02:36 +08:00
|
|
|
<td>
|
2013-05-21 01:42:26 +08:00
|
|
|
{{#if viewingTable}}
|
|
|
|
{{row.y}}
|
2013-03-18 03:02:36 +08:00
|
|
|
{{/if}}
|
2013-05-21 01:42:26 +08:00
|
|
|
{{#if viewingBarChart}}
|
2013-03-18 03:02:36 +08:00
|
|
|
<div class='bar-container'>
|
2013-05-21 01:42:26 +08:00
|
|
|
<div class='bar' style="width: {{unbound row.percentage}}%">{{row.y}}</div>
|
2013-03-18 03:02:36 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2013-02-28 11:39:42 +08:00
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
2014-11-13 04:10:36 +08:00
|
|
|
{{/loading-spinner}}
|