diff --git a/config/environment.default.js b/config/environment.default.js index 5f60335652..84fd7405e2 100644 --- a/config/environment.default.js +++ b/config/environment.default.js @@ -153,25 +153,25 @@ module.exports = { // List of all the active Browse-By types // Adding a type will activate their Browse-By page and add them to the global navigation menu, as well as community and collection pages // Allowed fields and their purpose: - // metadata: The browse id to use for fetching info from the rest api + // id: The browse id to use for fetching info from the rest api // type: The type of Browse-By page to display // metadataField: The metadata-field used to create starts-with options (only necessary when the type is set to 'date') types: [ { - metadata: 'title', + id: 'title', type: 'title' }, { - metadata: 'dateissued', + id: 'dateissued', type: 'date', metadataField: 'dc.date.issued' }, { - metadata: 'author', + id: 'author', type: 'metadata' }, { - metadata: 'subject', + id: 'subject', type: 'metadata' } ] diff --git a/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.ts b/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.ts index ab22216afa..98d0cc9cd1 100644 --- a/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.ts +++ b/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.ts @@ -22,7 +22,7 @@ import { BrowseByType, rendersBrowseBy } from '../+browse-by-switcher/browse-by- }) /** * Component for browsing items by metadata definition of type 'date' - * A metadata definition is a short term used to describe one or multiple metadata fields. + * A metadata definition (a.k.a. browse id) is a short term used to describe one or multiple metadata fields. * An example would be 'dateissued' for 'dc.date.issued' */ @rendersBrowseBy(BrowseByType.Date) @@ -55,12 +55,12 @@ export class BrowseByDatePageComponent extends BrowseByMetadataPageComponent { }) .subscribe((params) => { const metadataField = params.metadataField || this.defaultMetadataField; - this.metadata = params.metadata || this.defaultMetadata; + this.browseId = params.id || this.defaultBrowseId; this.startsWith = +params.startsWith || params.startsWith; - const searchOptions = browseParamsToOptions(params, Object.assign({}), this.sortConfig, this.metadata); + const searchOptions = browseParamsToOptions(params, Object.assign({}), this.sortConfig, this.browseId); this.updatePageWithItems(searchOptions, this.value); this.updateParent(params.scope); - this.updateStartsWithOptions(this.metadata, metadataField, params.scope); + this.updateStartsWithOptions(this.browseId, metadataField, params.scope); })); } diff --git a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.html b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.html index cf43f74eb0..c589c543d4 100644 --- a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.html +++ b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.html @@ -1,7 +1,7 @@