diff --git a/resources/i18n/en.json b/resources/i18n/en.json index a357a9c622..031a30945a 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -282,6 +282,7 @@ "browse": { "title": "Browsing {{ collection }} by {{ field }} {{ value }}", "startsWith": { + "jump": "Jump to a point in the index:", "choose_year": "(Choose year)", "type_year": "Or type in a year:", "submit": "Go" @@ -296,6 +297,7 @@ "head": "Browse", "by": { "title": "By Title", + "dateissued": "By Issue Date", "author": "By Author", "subject": "By Subject" } diff --git a/src/app/core/data/browse-items-response-parsing-service.ts b/src/app/core/data/browse-items-response-parsing-service.ts index e513ad0898..9228204b32 100644 --- a/src/app/core/data/browse-items-response-parsing-service.ts +++ b/src/app/core/data/browse-items-response-parsing-service.ts @@ -1,7 +1,7 @@ import { Inject, Injectable } from '@angular/core'; import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; -import { isNotEmpty } from '../../shared/empty.util'; +import { hasValue, isNotEmpty } from '../../shared/empty.util'; import { ObjectCacheService } from '../cache/object-cache.service'; import { ErrorResponse, @@ -45,6 +45,8 @@ export class BrowseItemsResponseParsingService extends BaseResponseParsingServic const serializer = new DSpaceRESTv2Serializer(DSpaceObject); const items = serializer.deserializeArray(data.payload._embedded[Object.keys(data.payload._embedded)[0]]); return new GenericSuccessResponse(items, data.statusCode, this.processPageInfo(data.payload)); + } else if (hasValue(data.payload) && hasValue(data.payload.page) && data.payload.page.totalElements === 0) { + return new GenericSuccessResponse([], data.statusCode, this.processPageInfo(data.payload)); } else { return new ErrorResponse( Object.assign( diff --git a/src/app/navbar/navbar.component.ts b/src/app/navbar/navbar.component.ts index df6226aedc..008a86599d 100644 --- a/src/app/navbar/navbar.component.ts +++ b/src/app/navbar/navbar.component.ts @@ -73,6 +73,17 @@ export class NavbarComponent extends MenuComponent implements OnInit { link: '/browse/title' } as LinkMenuItemModel, }, + { + id: 'browse_global_global_by_issue_date', + parentID: 'browse_global', + active: false, + visible: true, + model: { + type: MenuItemType.LINK, + text: 'menu.section.browse_global_by_issue_date', + link: '/browse/dateissued' + } as LinkMenuItemModel, + }, { id: 'browse_global_by_author', parentID: 'browse_global', diff --git a/src/app/shared/browse-by/browse-by-starts-with/date/browse-by-starts-with-date.component.html b/src/app/shared/browse-by/browse-by-starts-with/date/browse-by-starts-with-date.component.html index 768d6c4049..43e53ea54d 100644 --- a/src/app/shared/browse-by/browse-by-starts-with/date/browse-by-starts-with-date.component.html +++ b/src/app/shared/browse-by/browse-by-starts-with/date/browse-by-starts-with-date.component.html @@ -1,7 +1,10 @@
-
-
- @@ -11,12 +14,12 @@ {{option}} -
- - - - -
+
+
+ + + +
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 653bd1ed53..f9ef4e5232 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,6 +1,7 @@

{{'browse.comcol.head' | translate}}