mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Numbre of bitstreams in item page is now configurable
This commit is contained in:
@@ -207,6 +207,13 @@ item:
|
|||||||
undoTimeout: 10000 # 10 seconds
|
undoTimeout: 10000 # 10 seconds
|
||||||
# Show the item access status label in items lists
|
# Show the item access status label in items lists
|
||||||
showAccessStatuses: false
|
showAccessStatuses: false
|
||||||
|
simpleView:
|
||||||
|
bitstreamPageSize: 5
|
||||||
|
fullView:
|
||||||
|
# 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
|
||||||
|
|
||||||
# Collection Page Config
|
# Collection Page Config
|
||||||
collection:
|
collection:
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { BitstreamDataService } from '../../../../core/data/bitstream-data.service';
|
import { BitstreamDataService } from '../../../../core/data/bitstream-data.service';
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ import { NotificationsService } from '../../../../shared/notifications/notificat
|
|||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { hasValue, isEmpty } from '../../../../shared/empty.util';
|
import { hasValue, isEmpty } from '../../../../shared/empty.util';
|
||||||
import { PaginationService } from '../../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../../core/pagination/pagination.service';
|
||||||
|
import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders the file section of the item
|
* This component renders the file section of the item
|
||||||
@@ -34,26 +35,28 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
|
|||||||
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||||
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||||
|
|
||||||
pageSize = 5;
|
originalOptions: PaginationComponentOptions;
|
||||||
originalOptions = Object.assign(new PaginationComponentOptions(), {
|
licenseOptions: PaginationComponentOptions;
|
||||||
id: 'obo',
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: this.pageSize
|
|
||||||
});
|
|
||||||
|
|
||||||
licenseOptions = Object.assign(new PaginationComponentOptions(), {
|
|
||||||
id: 'lbo',
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: this.pageSize
|
|
||||||
});
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
bitstreamDataService: BitstreamDataService,
|
bitstreamDataService: BitstreamDataService,
|
||||||
protected notificationsService: NotificationsService,
|
protected notificationsService: NotificationsService,
|
||||||
protected translateService: TranslateService,
|
protected translateService: TranslateService,
|
||||||
protected paginationService: PaginationService
|
protected paginationService: PaginationService,
|
||||||
|
@Inject(APP_CONFIG) protected appConfig: AppConfig
|
||||||
) {
|
) {
|
||||||
super(bitstreamDataService, notificationsService, translateService);
|
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 {
|
ngOnInit(): void {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
import { BitstreamDataService } from '../../../../core/data/bitstream-data.service';
|
import { BitstreamDataService } from '../../../../core/data/bitstream-data.service';
|
||||||
|
|
||||||
@@ -10,6 +10,7 @@ import { PaginatedList } from '../../../../core/data/paginated-list.model';
|
|||||||
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../../core/shared/operators';
|
||||||
|
import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders the file section of the item
|
* This component renders the file section of the item
|
||||||
@@ -35,13 +36,15 @@ export class FileSectionComponent implements OnInit {
|
|||||||
|
|
||||||
isLastPage: boolean;
|
isLastPage: boolean;
|
||||||
|
|
||||||
pageSize = 5;
|
pageSize: number;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected bitstreamDataService: BitstreamDataService,
|
protected bitstreamDataService: BitstreamDataService,
|
||||||
protected notificationsService: NotificationsService,
|
protected notificationsService: NotificationsService,
|
||||||
protected translateService: TranslateService
|
protected translateService: TranslateService,
|
||||||
|
@Inject(APP_CONFIG) protected appConfig: AppConfig
|
||||||
) {
|
) {
|
||||||
|
this.pageSize = this.appConfig.item.simpleView.bitstreamPageSize
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@@ -245,7 +245,16 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
undoTimeout: 10000 // 10 seconds
|
undoTimeout: 10000 // 10 seconds
|
||||||
},
|
},
|
||||||
// Show the item access status label in items lists
|
// Show the item access status label in items lists
|
||||||
showAccessStatuses: false
|
showAccessStatuses: false,
|
||||||
|
simpleView: {
|
||||||
|
bitstreamPageSize: 5
|
||||||
|
},
|
||||||
|
fullView: {
|
||||||
|
// 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
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Collection Page Config
|
// Collection Page Config
|
||||||
|
@@ -6,4 +6,15 @@ export interface ItemConfig extends Config {
|
|||||||
};
|
};
|
||||||
// This is used to show the access status label of items in results lists
|
// This is used to show the access status label of items in results lists
|
||||||
showAccessStatuses: boolean;
|
showAccessStatuses: boolean;
|
||||||
|
|
||||||
|
simpleView: {
|
||||||
|
bitstreamPageSize: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
fullView: {
|
||||||
|
// 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: number;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -229,7 +229,16 @@ export const environment: BuildConfig = {
|
|||||||
undoTimeout: 10000 // 10 seconds
|
undoTimeout: 10000 // 10 seconds
|
||||||
},
|
},
|
||||||
// Show the item access status label in items lists
|
// Show the item access status label in items lists
|
||||||
showAccessStatuses: false
|
showAccessStatuses: false,
|
||||||
|
simpleView: {
|
||||||
|
bitstreamPageSize: 5
|
||||||
|
},
|
||||||
|
fullView: {
|
||||||
|
// 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
|
||||||
|
}
|
||||||
},
|
},
|
||||||
collection: {
|
collection: {
|
||||||
edit: {
|
edit: {
|
||||||
|
Reference in New Issue
Block a user