2013-02-28 23:00:54 +08:00
|
|
|
{{#if loaded}}
|
|
|
|
<h3>{{title}}</h3>
|
2013-02-28 11:39:42 +08:00
|
|
|
|
2013-03-18 03:02:36 +08:00
|
|
|
<button class='btn'
|
|
|
|
{{action viewAsTable}}
|
2013-03-24 01:06:28 +08:00
|
|
|
{{bindAttr disabled="viewingTable"}}>{{i18n admin.dashboard.reports.view_table}}</button>
|
2013-03-18 03:02:36 +08:00
|
|
|
|
|
|
|
<button class='btn'
|
|
|
|
{{action viewAsBarChart}}
|
2013-03-24 01:06:28 +08:00
|
|
|
{{bindAttr disabled="viewingBarChart"}}>{{i18n admin.dashboard.reports.view_chart}}</button>
|
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>
|
|
|
|
|
2013-02-28 23:00:54 +08:00
|
|
|
{{#each data}}
|
2013-02-28 11:39:42 +08:00
|
|
|
<tr>
|
|
|
|
<td>{{x}}</td>
|
2013-03-18 03:02:36 +08:00
|
|
|
<td>
|
|
|
|
{{#if controller.viewingTable}}
|
|
|
|
{{y}}
|
|
|
|
{{/if}}
|
|
|
|
{{#if controller.viewingBarChart}}
|
|
|
|
<div class='bar-container'>
|
|
|
|
<div class='bar' style="width: {{unbound percentage}}%">{{y}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2013-02-28 11:39:42 +08:00
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{{else}}
|
|
|
|
{{i18n loading}}
|
|
|
|
{{/if}}
|