discourse/app/assets/javascripts/admin/templates/components/dashboard-inline-table.hbs
Joffrey JAFFEUX 9554d9c56a
UX: tooltips and improvements to new dashboard
- tooltips
- revert chart title UI
- reduce period chooser font-size
- localize dates of data points
- fix a bug where multiple reports were loaded at the same time
- fix a bug where % was not showing anymore
- remove spacing at the top
- remove loadingTitle feature (Loading...%report name%) incompatible with new hijack design
2018-05-16 16:45:21 +02:00

41 lines
1000 B
Handlebars

{{#conditional-loading-section isLoading=isLoading}}
<div class="table-title">
<h3>{{title}}</h3>
{{#if help}}
<a href="{{helpPage}}">{{i18n help}}</a>
{{/if}}
</div>
{{#each reportsForPeriod as |report|}}
<div class="table-container">
<table>
<thead>
<tr>
{{#if report.labels}}
{{#each report.labels as |label|}}
<th>{{label}}</th>
{{/each}}
{{else}}
{{#each report.data as |data|}}
<th>{{data.x}}</th>
{{/each}}
{{/if}}
</tr>
</thead>
<tbody>
{{#unless hasBlock}}
{{#each report.data as |data|}}
<tr>
<td>{{number data.y}}</td>
</tr>
{{/each}}
{{else}}
{{yield (hash report=report)}}
{{/unless}}
</tbody>
</table>
</div>
{{/each}}
{{/conditional-loading-section}}