mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
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
This commit is contained in:
parent
1b98800bfb
commit
4ee30dc5bd
2 changed files with 27 additions and 3 deletions
|
@ -4,10 +4,10 @@
|
||||||
<th class="table-cell-field"><span class="f-small midgrey ttu fw5">Field</span></th>
|
<th class="table-cell-field"><span class="f-small midgrey ttu fw5">Field</span></th>
|
||||||
<th class="table-cell-data">
|
<th class="table-cell-data">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<span class="f-small midgrey ttu fw5 nudge-top--1">Data</span>
|
<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">
|
<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" data-test-import-prev>{{svg-jar "arrow-left" class="w3 h3 fill-middarkgrey" }}</a>
|
<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" data-test-import-next>{{svg-jar "arrow-right" 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>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
|
@ -23,6 +23,30 @@ export default class GhMembersImportTable extends Component {
|
||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hasNextRecord() {
|
||||||
|
const nextValue = this.dataPreviewIndex + 1;
|
||||||
|
if (this.args.importData[nextValue]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get hasPrevRecord() {
|
||||||
|
const nextValue = this.dataPreviewIndex - 1;
|
||||||
|
if (this.args.importData[nextValue]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get currentRecord() {
|
||||||
|
return this.dataPreviewIndex + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
get allRecords() {
|
||||||
|
return this.args.importData.length;
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
updateMapping(mapFrom, mapTo) {
|
updateMapping(mapFrom, mapTo) {
|
||||||
this.args.updateMapping(mapFrom, mapTo);
|
this.args.updateMapping(mapFrom, mapTo);
|
||||||
|
|
Loading…
Add table
Reference in a new issue