2013-02-28 10:00:54 -05:00
|
|
|
{{#if loaded}}
|
|
|
|
<h3>{{title}}</h3>
|
2013-02-27 22:39:42 -05:00
|
|
|
|
2013-03-17 15:02:36 -04:00
|
|
|
<button class='btn'
|
2014-09-30 16:04:04 -04:00
|
|
|
{{action "viewAsTable"}}
|
2014-01-14 12:48:57 -05:00
|
|
|
{{bind-attr disabled="viewingTable"}}>{{i18n admin.dashboard.reports.view_table}}</button>
|
2013-03-17 15:02:36 -04:00
|
|
|
|
|
|
|
<button class='btn'
|
2014-09-30 16:04:04 -04:00
|
|
|
{{action "viewAsBarChart"}}
|
2014-01-14 12:48:57 -05:00
|
|
|
{{bind-attr disabled="viewingBarChart"}}>{{i18n admin.dashboard.reports.view_chart}}</button>
|
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>
|
|
|
|
|
|
|
|
{{else}}
|
|
|
|
{{i18n loading}}
|
2014-01-14 12:48:57 -05:00
|
|
|
{{/if}}
|