2014-11-05 14:46:27 -05:00
|
|
|
<h3>{{title}}</h3>
|
2013-02-27 22:39:42 -05:00
|
|
|
|
2014-11-05 14:46:27 -05:00
|
|
|
<div>
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.dashboard.reports.start_date'}} {{input type="date" value=startDate}}
|
|
|
|
{{i18n 'admin.dashboard.reports.end_date'}} {{input type="date" value=endDate}}
|
2015-06-24 09:19:39 -04:00
|
|
|
{{category-chooser valueAttribute="id" value=categoryId source=categoryId}}
|
2015-01-14 15:36:38 -05:00
|
|
|
{{d-button action="refreshReport" class="btn-primary" label="admin.dashboard.reports.refresh_report" icon="refresh"}}
|
2014-11-05 14:46:27 -05:00
|
|
|
</div>
|
2013-03-17 15:02:36 -04:00
|
|
|
|
2014-11-05 14:46:27 -05:00
|
|
|
<div class='view-options'>
|
|
|
|
{{#if viewingTable}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.dashboard.reports.view_table'}}
|
2014-11-05 14:46:27 -05:00
|
|
|
{{else}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<a href {{action "viewAsTable"}}>{{i18n 'admin.dashboard.reports.view_table'}}</a>
|
2014-11-05 14:46:27 -05:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
|
{{#if viewingBarChart}}
|
2014-12-08 16:35:49 -05:00
|
|
|
{{i18n 'admin.dashboard.reports.view_chart'}}
|
2014-11-05 14:46:27 -05:00
|
|
|
{{else}}
|
2014-12-08 16:35:49 -05:00
|
|
|
<a href {{action "viewAsBarChart"}}>{{i18n 'admin.dashboard.reports.view_chart'}}</a>
|
2014-11-05 14:46:27 -05:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-17 15:02:36 -04:00
|
|
|
|
2015-04-28 17:05:06 -04:00
|
|
|
{{#conditional-loading-spinner condition=refreshing}}
|
2013-03-17 15:02:36 -04:00
|
|
|
<table class='table report'>
|
2013-02-27 22:39:42 -05:00
|
|
|
<tr>
|
2013-02-28 10:00:54 -05:00
|
|
|
<th>{{xaxis}}</th>
|
|
|
|
<th>{{yaxis}}</th>
|
2013-02-27 22:39:42 -05:00
|
|
|
</tr>
|
|
|
|
|
2014-06-06 17:08:35 -04:00
|
|
|
{{#each row in dataReversed}}
|
2013-02-27 22:39:42 -05:00
|
|
|
<tr>
|
2013-05-20 13:42:26 -04:00
|
|
|
<td>{{row.x}}</td>
|
2013-03-17 15:02:36 -04:00
|
|
|
<td>
|
2013-05-20 13:42:26 -04:00
|
|
|
{{#if viewingTable}}
|
|
|
|
{{row.y}}
|
2013-03-17 15:02:36 -04:00
|
|
|
{{/if}}
|
2013-05-20 13:42:26 -04:00
|
|
|
{{#if viewingBarChart}}
|
2013-03-17 15:02:36 -04:00
|
|
|
<div class='bar-container'>
|
2013-05-20 13:42:26 -04:00
|
|
|
<div class='bar' style="width: {{unbound row.percentage}}%">{{row.y}}</div>
|
2013-03-17 15:02:36 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2013-02-27 22:39:42 -05:00
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
2015-04-28 17:05:06 -04:00
|
|
|
{{/conditional-loading-spinner}}
|