mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Make the size of a browse result page configurable.
This commit is contained in:
@@ -17,6 +17,7 @@ import { StartsWithType } from '../../shared/starts-with/starts-with-decorator';
|
|||||||
import { BrowseByDataType, rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
import { BrowseByDataType, rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator';
|
||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-browse-by-metadata-page',
|
selector: 'ds-browse-by-metadata-page',
|
||||||
@@ -52,7 +53,7 @@ export class BrowseByMetadataPageComponent implements OnInit {
|
|||||||
paginationConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
|
paginationConfig: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), {
|
||||||
id: 'bbm',
|
id: 'bbm',
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 20
|
pageSize: environment.browseBy.pageSize,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,21 +1,30 @@
|
|||||||
import { Config } from './config.interface';
|
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 {
|
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;
|
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;
|
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;
|
defaultLowerLimit: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of entries in the viewport of a paginated browse-by list.
|
||||||
|
*/
|
||||||
|
pageSize: number;
|
||||||
}
|
}
|
||||||
|
@@ -193,7 +193,9 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
// 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: 30,
|
fiveYearLimit: 30,
|
||||||
// The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
|
// 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
|
// Item Page Config
|
||||||
|
@@ -192,6 +192,8 @@ export const environment: BuildConfig = {
|
|||||||
fiveYearLimit: 30,
|
fiveYearLimit: 30,
|
||||||
// The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
|
// 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: {
|
item: {
|
||||||
edit: {
|
edit: {
|
||||||
|
Reference in New Issue
Block a user