Skip to content

Commit

Permalink
[Issue comixed#14] Added descending options for the comic list.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpierce committed Nov 23, 2019
1 parent 8e9b716 commit 8c28067
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class ComicListToolbarComponent implements OnInit, OnDestroy {
selections => (this.selectedComics = selections)
);
this.sortSubscription = this.libraryDisplayAdaptor.sortField$.subscribe(
field => (this.sortField = field)
sortField => (this.sortField = sortField)
);
this.rowsSubscription = this.libraryDisplayAdaptor.rows$.subscribe(
rows => (this.rows = rows)
Expand Down Expand Up @@ -145,27 +145,51 @@ export class ComicListToolbarComponent implements OnInit, OnDestroy {
this.sortOptions = [
{
label: this.translateService.instant(
'comic-list-toolbar.options.sorting.volume'
'toolbar.options.sorting.volume-asc'
),
value: 'volume'
},
{
label: this.translateService.instant(
'comic-list-toolbar.options.sorting.issue-number'
'toolbar.options.sorting.volume-desc'
),
value: '!volume'
},
{
label: this.translateService.instant(
'toolbar.options.sorting.issue-number-asc'
),
value: 'sortableIssueNumber'
},
{
label: this.translateService.instant(
'comic-list-toolbar.options.sorting.added-date'
'toolbar.options.sorting.issue-number-desc'
),
value: '!sortableIssueNumber'
},
{
label: this.translateService.instant(
'toolbar.options.sorting.added-date-asc'
),
value: 'addedDate'
},
{
label: this.translateService.instant(
'comic-list-toolbar.options.sorting.cover-date'
'toolbar.options.sorting.added-date-desc'
),
value: '!addedDate'
},
{
label: this.translateService.instant(
'toolbar.options.sorting.cover-date-asc'
),
value: 'coverDate'
},
{
label: this.translateService.instant(
'toolbar.options.sorting.cover-date-desc'
),
value: '!coverDate'
}
];
}
Expand Down
12 changes: 12 additions & 0 deletions comixed-frontend/src/assets/i18n/app-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,18 @@
}
},
"toolbar": {
"options": {
"sorting": {
"volume-asc": "Volume",
"volume-desc": "Volume (desc)",
"issue-number-asc": "Issue #",
"issue-number-desc": "Issue # (desc)",
"added-date-asc": "Added date",
"added-date-desc": "Added date (desc)",
"cover-date-asc": "Cover date",
"cover-date-desc": "Cover date (desc)"
}
},
"button": {
"select-all": "All",
"deselect-all": "All"
Expand Down
6 changes: 0 additions & 6 deletions comixed-frontend/src/assets/i18n/library-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@
"layout": {
"tooltip": "Toggle between grid and list layouts."
},
"sorting": {
"volume": "Sort by Volume",
"issue-number": "Sort by Issue #",
"added-date": "Sort by Added Date",
"cover-date": "Sort by Cover Date"
},
"rows": {
"10-comics": "Show 10 Comics",
"25-comics": "Show 25 Comics",
Expand Down

0 comments on commit 8c28067

Please sign in to comment.