mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 12:24:55 +00:00
66 lines
2.0 KiB
Handlebars
66 lines
2.0 KiB
Handlebars
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
{{#if model.computedLabels}}
|
|
{{#each model.computedLabels as |label|}}
|
|
<AdminReportTableHeader @showSortingUI={{showSortingUI}} @currentSortDirection={{sortDirection}} @currentSortLabel={{sortLabel}} @label={{label}} @sortByLabel={{action "sortByLabel" label}} />
|
|
{{/each}}
|
|
{{else}}
|
|
{{#each model.data as |data|}}
|
|
<th>{{data.x}}</th>
|
|
{{/each}}
|
|
{{/if}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each paginatedData as |data|}}
|
|
<AdminReportTableRow @data={{data}} @labels={{model.computedLabels}} @options={{options}} />
|
|
{{/each}}
|
|
|
|
{{#if showTotalForSample}}
|
|
<tr class="total-row">
|
|
<td colspan={{totalsForSample.length}}>
|
|
{{i18n "admin.dashboard.reports.totals_for_sample"}}
|
|
</td>
|
|
</tr>
|
|
<tr class="admin-report-table-row">
|
|
{{#each totalsForSample as |total|}}
|
|
<td class="admin-report-table-cell {{total.type}} {{total.property}}">
|
|
{{total.formattedValue}}
|
|
</td>
|
|
{{/each}}
|
|
</tr>
|
|
{{/if}}
|
|
|
|
{{#if showTotal}}
|
|
<tr class="total-row">
|
|
<td colspan="2">
|
|
{{i18n "admin.dashboard.reports.total"}}
|
|
</td>
|
|
</tr>
|
|
<tr class="admin-report-table-row">
|
|
<td class="admin-report-table-cell date x">—</td>
|
|
<td class="admin-report-table-cell number y">{{number model.total}}</td>
|
|
</tr>
|
|
{{/if}}
|
|
|
|
{{#if showAverage}}
|
|
<tr class="total-row">
|
|
<td colspan="2">
|
|
{{i18n "admin.dashboard.reports.average_for_sample"}}
|
|
</td>
|
|
</tr>
|
|
<tr class="admin-report-table-row">
|
|
<td class="admin-report-table-cell date x">—</td>
|
|
<td class="admin-report-table-cell number y">{{number averageForSample}}</td>
|
|
</tr>
|
|
{{/if}}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="pagination">
|
|
{{#each pages as |pageState|}}
|
|
<DButton @translatedLabel={{pageState.page}} @action={{action "changePage"}} @actionParam={{pageState.index}} @class={{pageState.class}} />
|
|
{{/each}}
|
|
</div>
|