diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 229d278327..ec88ed4f09 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -285,6 +285,14 @@ "title": "Title", "author": "Author", "subject": "Subject" + }, + "comcol": { + "head": "Browse", + "by": { + "title": "By Title", + "author": "By Author", + "subject": "By Subject" + } } }, "admin": { @@ -382,6 +390,7 @@ "browse_global_by_issue_date": "By Issue Date", "browse_global_by_author": "By Author", "browse_global_by_title": "By Title", + "browse_global_by_subject": "By Subject", "statistics": "Statistics", "browse_community": "This Community", "browse_community_by_issue_date": "By Issue Date", diff --git a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.ts index f548699800..67deed97d2 100644 --- a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.ts +++ b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.ts @@ -129,8 +129,10 @@ export class BrowseByMetadataPageComponent implements OnInit { /** * Updates the current page with searchOptions * @param searchOptions Options to narrow down your search: - * { pagination: PaginationComponentOptions, - * sort: SortOptions } + * { metadata: string + * pagination: PaginationComponentOptions, + * sort: SortOptions, + * scope: string } */ updatePage(searchOptions) { this.browseEntries$ = this.browseService.getBrowseEntriesFor(searchOptions.metadata, searchOptions); @@ -138,14 +140,16 @@ export class BrowseByMetadataPageComponent implements OnInit { } /** - * Updates the current page with searchOptions and display items linked to author + * Updates the current page with searchOptions and display items linked to the given value * @param searchOptions Options to narrow down your search: - * { pagination: PaginationComponentOptions, - * sort: SortOptions } - * @param author The author's name for displaying items + * { metadata: string + * pagination: PaginationComponentOptions, + * sort: SortOptions, + * scope: string } + * @param value The value of the browse-entry to display items for */ - updatePageWithItems(searchOptions, author: string) { - this.items$ = this.browseService.getBrowseItemsFor(searchOptions.metadata, author, searchOptions); + updatePageWithItems(searchOptions, value: string) { + this.items$ = this.browseService.getBrowseItemsFor(searchOptions.metadata, value, searchOptions); } ngOnDestroy(): void { diff --git a/src/app/navbar/navbar.component.ts b/src/app/navbar/navbar.component.ts index 92bd0cd633..76b4e6f46d 100644 --- a/src/app/navbar/navbar.component.ts +++ b/src/app/navbar/navbar.component.ts @@ -84,6 +84,17 @@ export class NavbarComponent extends MenuComponent implements OnInit { link: '/browse/author' } as LinkMenuItemModel, }, + { + id: 'browse_global_by_subject', + parentID: 'browse_global', + active: false, + visible: true, + model: { + type: MenuItemType.LINK, + text: 'menu.section.browse_global_by_subject', + link: '/browse/subject' + } as LinkMenuItemModel, + }, /* Statistics */ { diff --git a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.html b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.html index 5750a909b5..653bd1ed53 100644 --- a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.html +++ b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.html @@ -1,5 +1,6 @@ -