mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
55946: Edit item page cleanup
This commit is contained in:
@@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { SharedModule } from '../../shared/shared.module';
|
import { SharedModule } from '../../shared/shared.module';
|
||||||
import { EditItemPageRoutingModule } from './edit-item-page.routing.module';
|
import { EditItemPageRoutingModule } from './edit-item-page.routing.module';
|
||||||
import { EditItemPageComponent } from './edit-item-page.component';
|
import { EditItemPageComponent } from './edit-item-page.component';
|
||||||
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
|
|
||||||
import { ItemStatusComponent } from './item-status/item-status.component';
|
import { ItemStatusComponent } from './item-status/item-status.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@@ -14,8 +13,7 @@ import { ItemStatusComponent } from './item-status/item-status.component';
|
|||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
EditItemPageComponent,
|
EditItemPageComponent,
|
||||||
ItemStatusComponent,
|
ItemStatusComponent
|
||||||
ItemCollectionMapperComponent
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class EditItemPageModule {
|
export class EditItemPageModule {
|
||||||
|
@@ -2,7 +2,6 @@ import { ItemPageResolver } from '../item-page.resolver';
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { EditItemPageComponent } from './edit-item-page.component';
|
import { EditItemPageComponent } from './edit-item-page.component';
|
||||||
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -13,13 +12,6 @@ import { ItemCollectionMapperComponent } from './item-collection-mapper/item-col
|
|||||||
resolve: {
|
resolve: {
|
||||||
item: ItemPageResolver
|
item: ItemPageResolver
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'map',
|
|
||||||
component: ItemCollectionMapperComponent,
|
|
||||||
resolve: {
|
|
||||||
item: ItemPageResolver
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<p>It works!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@@ -1,19 +0,0 @@
|
|||||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
||||||
import { fadeIn, fadeInOut } from '../../../shared/animations/fade';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'ds-item-collection-mapper',
|
|
||||||
styleUrls: ['./item-collection-mapper.component.scss'],
|
|
||||||
templateUrl: './item-collection-mapper.component.html',
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
animations: [
|
|
||||||
fadeIn,
|
|
||||||
fadeInOut
|
|
||||||
]
|
|
||||||
})
|
|
||||||
/**
|
|
||||||
* Component for mapping collections to an item
|
|
||||||
*/
|
|
||||||
export class ItemCollectionMapperComponent {
|
|
||||||
|
|
||||||
}
|
|
@@ -53,8 +53,14 @@ export class ItemStatusComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.statusDataKeys = Object.keys(this.statusData);
|
this.statusDataKeys = Object.keys(this.statusData);
|
||||||
|
|
||||||
|
/*
|
||||||
|
The key is used to build messages
|
||||||
|
i18n example: 'item.edit.tabs.status.buttons.<key>.label'
|
||||||
|
The value is supposed to be a href for the button
|
||||||
|
*/
|
||||||
this.actions = Object.assign({
|
this.actions = Object.assign({
|
||||||
mappedCollections: this.getCurrentUrl() + '/map'
|
// TODO: Create mapping component on item level
|
||||||
|
mappedCollections: this.getCurrentUrl() + '/'
|
||||||
});
|
});
|
||||||
this.actionsKeys = Object.keys(this.actions);
|
this.actionsKeys = Object.keys(this.actions);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user