mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
37 lines
No EOL
835 B
Handlebars
37 lines
No EOL
835 B
Handlebars
{{#if loaded}}
|
|
<h3>{{title}}</h3>
|
|
|
|
<button class='btn'
|
|
{{action viewAsTable}}
|
|
{{bindAttr disabled="viewingTable"}}>View as Table</button>
|
|
|
|
<button class='btn'
|
|
{{action viewAsBarChart}}
|
|
{{bindAttr disabled="viewingBarChart"}}>View as Bar Chart</button>
|
|
|
|
<table class='table report'>
|
|
<tr>
|
|
<th>{{xaxis}}</th>
|
|
<th>{{yaxis}}</th>
|
|
</tr>
|
|
|
|
{{#each data}}
|
|
<tr>
|
|
<td>{{x}}</td>
|
|
<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>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
|
|
{{else}}
|
|
{{i18n loading}}
|
|
{{/if}} |