Ghost/ghost/admin/app/components/gh-members-import-table.hbs
Peter Zimon 4ee30dc5bd Added table header data to member import mapping
no refs.
- added counter ("x of y") to "Data" header for member import mapping table
- set disabled style to prev/next buttons in "Data" header for first/last records
2020-07-08 12:23:02 +02:00

30 lines
1.7 KiB
Handlebars

<table class="f8 gh-members-import-table ma0">
<thead>
<tr>
<th class="table-cell-field"><span class="f-small midgrey ttu fw5">Field</span></th>
<th class="table-cell-data">
<div class="flex items-center justify-between">
<span class="f-small midgrey ttu fw5 nudge-top--1">Data <span class="midlightgrey fw4">({{this.currentRecord}} of {{this.allRecords}})</span></span>
<div class="flex items-center bg-white br2 ml1 nr1 gh-members-import-datanav">
<a href="#" {{action "prev"}} class="pa1 flex items-center justify-center br b--whitegrey {{unless this.hasPrevRecord "o-30"}}" data-test-import-prev>{{svg-jar "arrow-left" class="w3 h3 fill-middarkgrey" }}</a>
<a href="#" {{action "next"}} class="pa1 flex items-center justify-center {{unless this.hasNextRecord "o-30"}}" data-test-import-next>{{svg-jar "arrow-right" class="w3 h3 fill-middarkgrey" }}</a>
</div>
</div>
</th>
<th><span class="f-small midgrey ttu fw5">Import as...</span></th>
</tr>
</thead>
<tbody>
{{#each currentlyDisplayedData as |row|}}
<tr>
<td class="middarkgrey table-cell-field"><span>{{row.key}}</span></td>
<td class="middarkgrey table-cell-data {{unless row.value "empty-cell"}}"><span>{{row.value}}</span></td>
<td><span><GhMembersImportMappingInput @updateMapping={{this.updateMapping}} @mapFrom={{row.key}} @mapTo={{row.mapTo}} /></span></td>
</tr>
{{else}}
<tr>
<td><span>No data</span></td>
</tr>
{{/each}}
</tbody>
</table>