mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
114077: Made ProfilePageMetadataFormComponent themeable
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
import { ThemedComponent } from '../../shared/theme-support/themed.component';
|
||||||
|
import { Component, Input } from '@angular/core';
|
||||||
|
import { ProfilePageMetadataFormComponent } from './profile-page-metadata-form.component';
|
||||||
|
import { EPerson } from '../../core/eperson/models/eperson.model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Themed wrapper for {@link ProfilePageMetadataFormComponent}
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-themed-profile-page-metadata-form',
|
||||||
|
templateUrl: '../../shared/theme-support/themed.component.html',
|
||||||
|
})
|
||||||
|
export class ThemedProfilePageMetadataFormComponent extends ThemedComponent<ProfilePageMetadataFormComponent> {
|
||||||
|
|
||||||
|
@Input() user: EPerson;
|
||||||
|
|
||||||
|
protected inAndOutputNames: (keyof ProfilePageMetadataFormComponent & keyof this)[] = [
|
||||||
|
'user',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected getComponentName(): string {
|
||||||
|
return 'ProfilePageMetadataFormComponent';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importThemedComponent(themeName: string): Promise<any> {
|
||||||
|
return import(`../../../themes/${themeName}/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component`);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected importUnthemedComponent(): Promise<any> {
|
||||||
|
return import('./profile-page-metadata-form.component');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -14,7 +14,7 @@
|
|||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<div class="card-header">{{'profile.card.identify' | translate}}</div>
|
<div class="card-header">{{'profile.card.identify' | translate}}</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ds-profile-page-metadata-form [user]="user"></ds-profile-page-metadata-form>
|
<ds-themed-profile-page-metadata-form [user]="user"></ds-themed-profile-page-metadata-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="canChangePassword$ | async" class="card mb-4 security-section">
|
<div *ngIf="canChangePassword$ | async" class="card mb-4 security-section">
|
||||||
|
@@ -12,6 +12,7 @@ import { ThemedProfilePageComponent } from './themed-profile-page.component';
|
|||||||
import { FormModule } from '../shared/form/form.module';
|
import { FormModule } from '../shared/form/form.module';
|
||||||
import { UiSwitchModule } from 'ngx-ui-switch';
|
import { UiSwitchModule } from 'ngx-ui-switch';
|
||||||
import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profile-claim-item-modal.component';
|
import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profile-claim-item-modal.component';
|
||||||
|
import { ThemedProfilePageMetadataFormComponent } from './profile-page-metadata-form/themed-profile-page-metadata-form.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -26,6 +27,7 @@ import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profi
|
|||||||
ProfilePageComponent,
|
ProfilePageComponent,
|
||||||
ThemedProfilePageComponent,
|
ThemedProfilePageComponent,
|
||||||
ProfilePageMetadataFormComponent,
|
ProfilePageMetadataFormComponent,
|
||||||
|
ThemedProfilePageMetadataFormComponent,
|
||||||
ProfilePageSecurityFormComponent,
|
ProfilePageSecurityFormComponent,
|
||||||
ProfilePageResearcherFormComponent
|
ProfilePageResearcherFormComponent
|
||||||
],
|
],
|
||||||
@@ -34,6 +36,7 @@ import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profi
|
|||||||
ThemedProfilePageComponent,
|
ThemedProfilePageComponent,
|
||||||
ProfileClaimItemModalComponent,
|
ProfileClaimItemModalComponent,
|
||||||
ProfilePageMetadataFormComponent,
|
ProfilePageMetadataFormComponent,
|
||||||
|
ThemedProfilePageMetadataFormComponent,
|
||||||
ProfilePageSecurityFormComponent,
|
ProfilePageSecurityFormComponent,
|
||||||
ProfilePageResearcherFormComponent
|
ProfilePageResearcherFormComponent
|
||||||
]
|
]
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { ProfilePageMetadataFormComponent as BaseComponent } from '../../../../../app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-profile-page-metadata-form',
|
||||||
|
templateUrl: '../../../../../app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.html'
|
||||||
|
// templateUrl: './profile-page-metadata-form.component.html'
|
||||||
|
})
|
||||||
|
export class ProfilePageMetadataFormComponent extends BaseComponent {
|
||||||
|
}
|
@@ -156,6 +156,7 @@ import { ItemStatusComponent } from './app/item-page/edit-item-page/item-status/
|
|||||||
import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
|
import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component';
|
||||||
import { FormModule } from '../../app/shared/form/form.module';
|
import { FormModule } from '../../app/shared/form/form.module';
|
||||||
import { RequestCopyModule } from 'src/app/request-copy/request-copy.module';
|
import { RequestCopyModule } from 'src/app/request-copy/request-copy.module';
|
||||||
|
import { ProfilePageMetadataFormComponent } from './app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component';
|
||||||
|
|
||||||
const DECLARATIONS = [
|
const DECLARATIONS = [
|
||||||
FileSectionComponent,
|
FileSectionComponent,
|
||||||
@@ -239,6 +240,7 @@ const DECLARATIONS = [
|
|||||||
SubmissionSectionUploadFileComponent,
|
SubmissionSectionUploadFileComponent,
|
||||||
ItemStatusComponent,
|
ItemStatusComponent,
|
||||||
EditBitstreamPageComponent,
|
EditBitstreamPageComponent,
|
||||||
|
ProfilePageMetadataFormComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Reference in New Issue
Block a user