mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Moved showAccessStatus from UI to item config
Renamed item-page to item to make it generic
This commit is contained in:
@@ -13,8 +13,6 @@ ui:
|
||||
rateLimiter:
|
||||
windowMs: 60000 # 1 minute
|
||||
max: 500 # limit each IP to 500 requests per windowMs
|
||||
# Show the file access status in items lists
|
||||
showAccessStatuses: false
|
||||
|
||||
# The REST API server settings
|
||||
# NOTE: these must be 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
|
||||
@@ -163,10 +161,12 @@ browseBy:
|
||||
# The absolute lowest year to display in the dropdown (only used when no lowest date can be found for all items)
|
||||
defaultLowerLimit: 1900
|
||||
|
||||
# Item Page Config
|
||||
# Item Config
|
||||
item:
|
||||
edit:
|
||||
undoTimeout: 10000 # 10 seconds
|
||||
# Show the item access status label in items lists
|
||||
showAccessStatuses: false
|
||||
|
||||
# Collection Page Config
|
||||
collection:
|
||||
|
@@ -32,6 +32,6 @@ export class ItemSearchResultGridElementComponent extends SearchResultGridElemen
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
this.itemPageRoute = getItemPageRoute(this.dso);
|
||||
this.showAccessStatus = environment.ui.showAccessStatuses;
|
||||
this.showAccessStatus = environment.item.showAccessStatuses;
|
||||
}
|
||||
}
|
||||
|
@@ -43,6 +43,6 @@ export class ItemListPreviewComponent {
|
||||
showAccessStatus: boolean;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.showAccessStatus = environment.ui.showAccessStatuses;
|
||||
this.showAccessStatus = environment.item.showAccessStatuses;
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,6 @@ export class ItemSearchResultListElementComponent extends SearchResultListElemen
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
this.itemPageRoute = getItemPageRoute(this.dso);
|
||||
this.showAccessStatus = environment.ui.showAccessStatuses;
|
||||
this.showAccessStatus = environment.item.showAccessStatuses;
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import { INotificationBoardOptions } from './notifications-config.interfaces';
|
||||
import { SubmissionConfig } from './submission-config.interface';
|
||||
import { FormConfig } from './form-config.interfaces';
|
||||
import { LangConfig } from './lang-config.interface';
|
||||
import { ItemPageConfig } from './item-page-config.interface';
|
||||
import { ItemConfig } from './item-config.interface';
|
||||
import { CollectionPageConfig } from './collection-page-config.interface';
|
||||
import { ThemeConfig } from './theme.model';
|
||||
import { AuthConfig } from './auth-config.interfaces';
|
||||
@@ -28,7 +28,7 @@ interface AppConfig extends Config {
|
||||
defaultLanguage: string;
|
||||
languages: LangConfig[];
|
||||
browseBy: BrowseByConfig;
|
||||
item: ItemPageConfig;
|
||||
item: ItemConfig;
|
||||
collection: CollectionPageConfig;
|
||||
themes: ThemeConfig[];
|
||||
mediaViewer: MediaViewerConfig;
|
||||
|
@@ -6,7 +6,7 @@ import { BrowseByConfig } from './browse-by-config.interface';
|
||||
import { CacheConfig } from './cache-config.interface';
|
||||
import { CollectionPageConfig } from './collection-page-config.interface';
|
||||
import { FormConfig } from './form-config.interfaces';
|
||||
import { ItemPageConfig } from './item-page-config.interface';
|
||||
import { ItemConfig } from './item-config.interface';
|
||||
import { LangConfig } from './lang-config.interface';
|
||||
import { MediaViewerConfig } from './media-viewer-config.interface';
|
||||
import { INotificationBoardOptions } from './notifications-config.interfaces';
|
||||
@@ -34,10 +34,7 @@ export class DefaultAppConfig implements AppConfig {
|
||||
rateLimiter: {
|
||||
windowMs: 1 * 60 * 1000, // 1 minute
|
||||
max: 500 // limit each IP to 500 requests per windowMs
|
||||
},
|
||||
|
||||
// Show the file access status in items lists
|
||||
showAccessStatuses: false
|
||||
}
|
||||
};
|
||||
|
||||
// The REST API server settings
|
||||
@@ -199,11 +196,13 @@ export class DefaultAppConfig implements AppConfig {
|
||||
defaultLowerLimit: 1900
|
||||
};
|
||||
|
||||
// Item Page Config
|
||||
item: ItemPageConfig = {
|
||||
// Item Config
|
||||
item: ItemConfig = {
|
||||
edit: {
|
||||
undoTimeout: 10000 // 10 seconds
|
||||
}
|
||||
},
|
||||
// Show the item access status label in items lists
|
||||
showAccessStatuses: false
|
||||
};
|
||||
|
||||
// Collection Page Config
|
||||
|
9
src/config/item-config.interface.ts
Normal file
9
src/config/item-config.interface.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Config } from './config.interface';
|
||||
|
||||
export interface ItemConfig extends Config {
|
||||
edit: {
|
||||
undoTimeout: number;
|
||||
};
|
||||
// This is used to show the access status label of items in results lists
|
||||
showAccessStatuses: boolean;
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
import { Config } from './config.interface';
|
||||
|
||||
export interface ItemPageConfig extends Config {
|
||||
edit: {
|
||||
undoTimeout: number;
|
||||
};
|
||||
}
|
@@ -10,7 +10,5 @@ export class UIServerConfig extends ServerConfig {
|
||||
windowMs: number;
|
||||
max: number;
|
||||
};
|
||||
// This section is used to show the access status of items in results lists
|
||||
showAccessStatuses: boolean;
|
||||
|
||||
}
|
||||
|
@@ -25,9 +25,7 @@ export const environment: BuildConfig = {
|
||||
rateLimiter: {
|
||||
windowMs: 1 * 60 * 1000, // 1 minute
|
||||
max: 500 // limit each IP to 500 requests per windowMs
|
||||
},
|
||||
// Show the file access status in items lists
|
||||
showAccessStatuses: false
|
||||
}
|
||||
},
|
||||
|
||||
// The REST API server settings.
|
||||
@@ -198,7 +196,9 @@ export const environment: BuildConfig = {
|
||||
item: {
|
||||
edit: {
|
||||
undoTimeout: 10000 // 10 seconds
|
||||
}
|
||||
},
|
||||
// Show the item access status label in items lists
|
||||
showAccessStatuses: false
|
||||
},
|
||||
collection: {
|
||||
edit: {
|
||||
|
Reference in New Issue
Block a user