mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Make create, edit community/collection/item dialogs theme-able.
This commit is contained in:
@@ -16,24 +16,24 @@ import { filter, find, map, take } from 'rxjs/operators';
|
||||
import { hasValue } from './shared/empty.util';
|
||||
import { FeatureID } from './core/data/feature-authorization/feature-id';
|
||||
import {
|
||||
CreateCommunityParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component';
|
||||
ThemedCreateCommunityParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component';
|
||||
import { OnClickMenuItemModel } from './shared/menu/menu-item/models/onclick.model';
|
||||
import {
|
||||
CreateCollectionParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component';
|
||||
ThemedCreateCollectionParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component';
|
||||
import {
|
||||
CreateItemParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component';
|
||||
ThemedCreateItemParentSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component';
|
||||
import {
|
||||
EditCommunitySelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component';
|
||||
ThemedEditCommunitySelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component';
|
||||
import {
|
||||
EditCollectionSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component';
|
||||
ThemedEditCollectionSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component';
|
||||
import {
|
||||
EditItemSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component';
|
||||
ThemedEditItemSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component';
|
||||
import {
|
||||
ExportMetadataSelectorComponent
|
||||
} from './shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component';
|
||||
@@ -188,7 +188,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.new_community',
|
||||
function: () => {
|
||||
this.modalService.open(CreateCommunityParentSelectorComponent);
|
||||
this.modalService.open(ThemedCreateCommunityParentSelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
@@ -201,7 +201,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.new_collection',
|
||||
function: () => {
|
||||
this.modalService.open(CreateCollectionParentSelectorComponent);
|
||||
this.modalService.open(ThemedCreateCollectionParentSelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
@@ -214,7 +214,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.new_item',
|
||||
function: () => {
|
||||
this.modalService.open(CreateItemParentSelectorComponent);
|
||||
this.modalService.open(ThemedCreateItemParentSelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
@@ -263,7 +263,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.edit_community',
|
||||
function: () => {
|
||||
this.modalService.open(EditCommunitySelectorComponent);
|
||||
this.modalService.open(ThemedEditCommunitySelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
@@ -276,7 +276,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.edit_collection',
|
||||
function: () => {
|
||||
this.modalService.open(EditCollectionSelectorComponent);
|
||||
this.modalService.open(ThemedEditCollectionSelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
@@ -289,7 +289,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
type: MenuItemType.ONCLICK,
|
||||
text: 'menu.section.edit_item',
|
||||
function: () => {
|
||||
this.modalService.open(EditItemSelectorComponent);
|
||||
this.modalService.open(ThemedEditItemSelectorComponent);
|
||||
}
|
||||
} as OnClickMenuItemModel,
|
||||
},
|
||||
|
@@ -0,0 +1,28 @@
|
||||
import {Component} from "@angular/core";
|
||||
import {CreateCollectionParentSelectorComponent} from "./create-collection-parent-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for CreateCollectionParentSelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-create-collection-parent-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedCreateCollectionParentSelectorComponent
|
||||
extends ThemedComponent<CreateCollectionParentSelectorComponent> {
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'CreateCollectionParentSelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./create-collection-parent-selector.component');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
import {Component} from "@angular/core";
|
||||
import {CreateCommunityParentSelectorComponent} from "./create-community-parent-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for CreateCommunityParentSelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-create-community-parent-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedCreateCommunityParentSelectorComponent
|
||||
extends ThemedComponent<CreateCommunityParentSelectorComponent> {
|
||||
protected getComponentName(): string {
|
||||
return 'CreateCommunityParentSelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./create-community-parent-selector.component');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
import {Component, Input} from "@angular/core";
|
||||
import {CreateItemParentSelectorComponent} from "./create-item-parent-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for CreateItemParentSelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-create-item-parent-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedCreateItemParentSelectorComponent
|
||||
extends ThemedComponent<CreateItemParentSelectorComponent> {
|
||||
@Input() entityType: string;
|
||||
|
||||
protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'CreateItemParentSelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./create-item-parent-selector.component');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
import {Component} from "@angular/core";
|
||||
import {EditCollectionSelectorComponent} from "./edit-collection-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for EditCollectionSelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-edit-collection-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedEditCollectionSelectorComponent
|
||||
extends ThemedComponent<EditCollectionSelectorComponent> {
|
||||
protected getComponentName(): string {
|
||||
return 'EditCollectionSelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./edit-collection-selector.component');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
import {Component} from "@angular/core";
|
||||
import {EditCommunitySelectorComponent} from "./edit-community-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for EditCommunitySelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-edit-community-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedEditCommunitySelectorComponent
|
||||
extends ThemedComponent<EditCommunitySelectorComponent> {
|
||||
protected getComponentName(): string {
|
||||
return 'EditCommunitySelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./edit-community-selector.component');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
import {Component} from "@angular/core";
|
||||
import {EditItemSelectorComponent} from "./edit-item-selector.component";
|
||||
import {ThemedComponent} from "src/app/shared/theme-support/themed.component";
|
||||
|
||||
/**
|
||||
* Themed wrapper for EditItemSelectorComponent
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-edit-item-selector',
|
||||
styleUrls: [],
|
||||
templateUrl: '../../../theme-support/themed.component.html'
|
||||
})
|
||||
export class ThemedEditItemSelectorComponent
|
||||
extends ThemedComponent<EditItemSelectorComponent> {
|
||||
protected getComponentName(): string {
|
||||
return 'EditItemSelectorComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import('./edit-item-selector.component');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user