mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
89720: Added ThemedItemMetadataComponent
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="col-12" *ngVar="(itemRD$ | async) as itemRD">
|
||||
<ng-container *ngIf="itemRD?.hasSucceeded">
|
||||
<h2 class="border-bottom">{{ 'collection.edit.template.head' | translate:{ collection: collection?.name } }}</h2>
|
||||
<ds-item-metadata [updateService]="itemTemplateService" [item]="itemRD?.payload"></ds-item-metadata>
|
||||
<ds-themed-item-metadata [updateService]="itemTemplateService" [item]="itemRD?.payload"></ds-themed-item-metadata>
|
||||
<button [routerLink]="getCollectionEditUrl(collection)" class="btn btn-outline-secondary">{{ 'collection.edit.template.cancel' | translate }}</button>
|
||||
</ng-container>
|
||||
<ds-loading *ngIf="itemRD?.isLoading" [message]="'collection.edit.template.loading' | translate"></ds-loading>
|
||||
|
@@ -15,6 +15,7 @@ import { ItemPrivateComponent } from './item-private/item-private.component';
|
||||
import { ItemPublicComponent } from './item-public/item-public.component';
|
||||
import { ItemDeleteComponent } from './item-delete/item-delete.component';
|
||||
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
|
||||
import { ThemedItemMetadataComponent } from './item-metadata/themed-item-metadata.component';
|
||||
import { EditInPlaceFieldComponent } from './item-metadata/edit-in-place-field/edit-in-place-field.component';
|
||||
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
|
||||
import { ItemEditBitstreamComponent } from './item-bitstreams/item-edit-bitstream/item-edit-bitstream.component';
|
||||
@@ -62,6 +63,7 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-
|
||||
ItemDeleteComponent,
|
||||
ItemStatusComponent,
|
||||
ItemMetadataComponent,
|
||||
ThemedItemMetadataComponent,
|
||||
ItemRelationshipsComponent,
|
||||
ItemBitstreamsComponent,
|
||||
ItemVersionHistoryComponent,
|
||||
@@ -83,7 +85,8 @@ import { ResourcePoliciesModule } from '../../shared/resource-policies/resource-
|
||||
ObjectValuesPipe
|
||||
],
|
||||
exports: [
|
||||
ItemMetadataComponent
|
||||
EditInPlaceFieldComponent,
|
||||
ThemedItemMetadataComponent,
|
||||
]
|
||||
})
|
||||
export class EditItemPageModule {
|
||||
|
@@ -0,0 +1,34 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { UpdateDataService } from '../../../core/data/update-data.service';
|
||||
import { ItemMetadataComponent } from './item-metadata.component';
|
||||
import { ThemedComponent } from '../../../shared/theme-support/themed.component';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-themed-item-metadata',
|
||||
styleUrls: [],
|
||||
templateUrl: './../../../shared/theme-support/themed.component.html',
|
||||
})
|
||||
/**
|
||||
* Component for displaying an item's metadata edit page
|
||||
*/
|
||||
export class ThemedItemMetadataComponent extends ThemedComponent<ItemMetadataComponent> {
|
||||
|
||||
@Input() item: Item;
|
||||
|
||||
@Input() updateService: UpdateDataService<Item>;
|
||||
|
||||
protected inAndOutputNames: (keyof ItemMetadataComponent & keyof this)[] = ['item', 'updateService'];
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'ItemMetadataComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../../themes/${themeName}/app/item-page/edit-item-page/item-metadata/item-metadata.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import(`./item-metadata.component`);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user