Skip to content

Commit f7e78dc

Browse files
committed
Use the same property for both item pages
1 parent 1e52338 commit f7e78dc

6 files changed

Lines changed: 23 additions & 37 deletions

File tree

config/config.example.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,11 @@ item:
207207
undoTimeout: 10000 # 10 seconds
208208
# Show the item access status label in items lists
209209
showAccessStatuses: false
210-
simpleView:
211-
bitstreamPageSize: 5
212-
fullView:
210+
bitstream:
213211
# Number of entries in the bitstream list in the full item view page.
214212
# Rounded to the nearest size in the list of selectable sizes on the
215213
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
216-
bitstreamPageSize: 5
214+
pageSize: 5
217215

218216
# Collection Page Config
219217
collection:

src/app/item-page/full/field-components/file-section/full-file-section.component.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
3535
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
3636
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
3737

38-
originalOptions: PaginationComponentOptions;
39-
licenseOptions: PaginationComponentOptions;
38+
originalOptions = Object.assign(new PaginationComponentOptions(), {
39+
id: 'obo',
40+
currentPage: 1,
41+
pageSize: this.appConfig.item.bitstream.pageSize
42+
});
43+
44+
licenseOptions = Object.assign(new PaginationComponentOptions(), {
45+
id: 'lbo',
46+
currentPage: 1,
47+
pageSize: this.appConfig.item.bitstream.pageSize
48+
});
4049

4150
constructor(
4251
bitstreamDataService: BitstreamDataService,
@@ -46,17 +55,6 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
4655
@Inject(APP_CONFIG) protected appConfig: AppConfig
4756
) {
4857
super(bitstreamDataService, notificationsService, translateService, appConfig);
49-
this.originalOptions = Object.assign(new PaginationComponentOptions(), {
50-
id: 'obo',
51-
currentPage: 1,
52-
pageSize: this.appConfig.item.fullView.bitstreamPageSize
53-
});
54-
55-
this.licenseOptions = Object.assign(new PaginationComponentOptions(), {
56-
id: 'lbo',
57-
currentPage: 1,
58-
pageSize: this.appConfig.item.fullView.bitstreamPageSize
59-
});
6058
}
6159

6260
ngOnInit(): void {

src/app/item-page/simple/field-components/file-section/file-section.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class FileSectionComponent implements OnInit {
4444
protected translateService: TranslateService,
4545
@Inject(APP_CONFIG) protected appConfig: AppConfig
4646
) {
47-
this.pageSize = this.appConfig.item.simpleView.bitstreamPageSize;
47+
this.pageSize = this.appConfig.item.bitstream.pageSize;
4848
}
4949

5050
ngOnInit(): void {

src/config/default-app-config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,11 @@ export class DefaultAppConfig implements AppConfig {
246246
},
247247
// Show the item access status label in items lists
248248
showAccessStatuses: false,
249-
simpleView: {
250-
bitstreamPageSize: 5
251-
},
252-
fullView: {
253-
// Number of entries in the bitstream list in the full item view page.
249+
bitstream: {
250+
// Number of entries in the bitstream list in the item view page.
254251
// Rounded to the nearest size in the list of selectable sizes on the
255252
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
256-
bitstreamPageSize: 5
253+
pageSize: 5
257254
}
258255
};
259256

src/config/item-config.interface.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ export interface ItemConfig extends Config {
77
// This is used to show the access status label of items in results lists
88
showAccessStatuses: boolean;
99

10-
simpleView: {
11-
bitstreamPageSize: number;
12-
};
13-
14-
fullView: {
15-
// Number of entries in the bitstream list in the full item view page.
10+
bitstream: {
11+
// Number of entries in the bitstream list in the item view page.
1612
// Rounded to the nearest size in the list of selectable sizes on the
1713
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
18-
bitstreamPageSize: number;
14+
pageSize: number;
1915
}
2016
}

src/environments/environment.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,11 @@ export const environment: BuildConfig = {
230230
},
231231
// Show the item access status label in items lists
232232
showAccessStatuses: false,
233-
simpleView: {
234-
bitstreamPageSize: 5
235-
},
236-
fullView: {
237-
// Number of entries in the bitstream list in the full item view page.
233+
bitstream: {
234+
// Number of entries in the bitstream list in the item view page.
238235
// Rounded to the nearest size in the list of selectable sizes on the
239236
// settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
240-
bitstreamPageSize: 5
237+
pageSize: 5
241238
}
242239
},
243240
collection: {

0 commit comments

Comments
 (0)