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 f789389697..dcef03b1b1 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 @@ -17,6 +17,7 @@ import { StartsWithType } from '../../shared/starts-with/starts-with-decorator'; import { BrowseByDataType, rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator'; import { PaginationService } from '../../core/pagination/pagination.service'; import { map } from 'rxjs/operators'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'ds-browse-by-metadata-page', @@ -52,7 +53,7 @@ export class BrowseByMetadataPageComponent implements OnInit { paginationConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { id: 'bbm', currentPage: 1, - pageSize: 20 + pageSize: environment.browseBy.pageSize, }); /** diff --git a/src/config/browse-by-config.interface.ts b/src/config/browse-by-config.interface.ts index 6adba66b92..eadcdff1a9 100644 --- a/src/config/browse-by-config.interface.ts +++ b/src/config/browse-by-config.interface.ts @@ -1,21 +1,30 @@ import { Config } from './config.interface'; /** - * Config that determines how the dropdown list of years are created for browse-by-date components + * Config that determines how the dropdown list of years are created for + * browse-by-date components. */ export interface BrowseByConfig extends Config { /** - * The max amount of years to display using jumps of one year (current year - oneYearLimit) + * The max amount of years to display using jumps of one year + * (current year - oneYearLimit) */ oneYearLimit: number; /** - * Limit for years to display using jumps of five years (current year - fiveYearLimit) + * Limit for years to display using jumps of five years + * (current year - fiveYearLimit) */ fiveYearLimit: number; /** - * The absolute lowest year to display in the dropdown when no lowest date can be found for all items + * The absolute lowest year to display in the dropdown when no lowest date can + * be found for all items. */ defaultLowerLimit: number; + + /** + * Number of entries in the viewport of a paginated browse-by list. + */ + pageSize: number; } diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index dc54c2fcb0..ac9c691d9d 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -193,7 +193,9 @@ export class DefaultAppConfig implements AppConfig { // Limit for years to display using jumps of five years (current year - fiveYearLimit) fiveYearLimit: 30, // The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items) - defaultLowerLimit: 1900 + defaultLowerLimit: 1900, + // The number of entries in a paginated browse results list. + pageSize: 20 }; // Item Page Config diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 7c24ef8f05..47d33cb7a5 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -192,6 +192,8 @@ export const environment: BuildConfig = { fiveYearLimit: 30, // The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items) defaultLowerLimit: 1900, + // The number of entries in a paginated browse results list. + pageSize: 20, }, item: { edit: {