Use the same property for both item pages

This commit is contained in:
Sergio Fernández Celorio
2022-11-07 19:27:54 +00:00
parent 1e523382d0
commit f7e78dccd1
6 changed files with 23 additions and 37 deletions

View File

@@ -207,13 +207,11 @@ item:
undoTimeout: 10000 # 10 seconds
# Show the item access status label in items lists
showAccessStatuses: false
simpleView:
bitstreamPageSize: 5
fullView:
bitstream:
# Number of entries in the bitstream list in the full item view page.
# Rounded to the nearest size in the list of selectable sizes on the
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
bitstreamPageSize: 5
pageSize: 5
# Collection Page Config
collection:

View File

@@ -35,8 +35,17 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
originalOptions: PaginationComponentOptions;
licenseOptions: PaginationComponentOptions;
originalOptions = Object.assign(new PaginationComponentOptions(), {
id: 'obo',
currentPage: 1,
pageSize: this.appConfig.item.bitstream.pageSize
});
licenseOptions = Object.assign(new PaginationComponentOptions(), {
id: 'lbo',
currentPage: 1,
pageSize: this.appConfig.item.bitstream.pageSize
});
constructor(
bitstreamDataService: BitstreamDataService,
@@ -46,17 +55,6 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
@Inject(APP_CONFIG) protected appConfig: AppConfig
) {
super(bitstreamDataService, notificationsService, translateService, appConfig);
this.originalOptions = Object.assign(new PaginationComponentOptions(), {
id: 'obo',
currentPage: 1,
pageSize: this.appConfig.item.fullView.bitstreamPageSize
});
this.licenseOptions = Object.assign(new PaginationComponentOptions(), {
id: 'lbo',
currentPage: 1,
pageSize: this.appConfig.item.fullView.bitstreamPageSize
});
}
ngOnInit(): void {

View File

@@ -44,7 +44,7 @@ export class FileSectionComponent implements OnInit {
protected translateService: TranslateService,
@Inject(APP_CONFIG) protected appConfig: AppConfig
) {
this.pageSize = this.appConfig.item.simpleView.bitstreamPageSize;
this.pageSize = this.appConfig.item.bitstream.pageSize;
}
ngOnInit(): void {

View File

@@ -246,14 +246,11 @@ export class DefaultAppConfig implements AppConfig {
},
// Show the item access status label in items lists
showAccessStatuses: false,
simpleView: {
bitstreamPageSize: 5
},
fullView: {
// Number of entries in the bitstream list in the full item view page.
bitstream: {
// Number of entries in the bitstream list in the item view page.
// Rounded to the nearest size in the list of selectable sizes on the
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
bitstreamPageSize: 5
pageSize: 5
}
};

View File

@@ -7,14 +7,10 @@ export interface ItemConfig extends Config {
// This is used to show the access status label of items in results lists
showAccessStatuses: boolean;
simpleView: {
bitstreamPageSize: number;
};
fullView: {
// Number of entries in the bitstream list in the full item view page.
bitstream: {
// Number of entries in the bitstream list in the item view page.
// Rounded to the nearest size in the list of selectable sizes on the
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
bitstreamPageSize: number;
pageSize: number;
}
}

View File

@@ -230,14 +230,11 @@ export const environment: BuildConfig = {
},
// Show the item access status label in items lists
showAccessStatuses: false,
simpleView: {
bitstreamPageSize: 5
},
fullView: {
// Number of entries in the bitstream list in the full item view page.
bitstream: {
// Number of entries in the bitstream list in the item view page.
// Rounded to the nearest size in the list of selectable sizes on the
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
bitstreamPageSize: 5
pageSize: 5
}
},
collection: {