mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00

Add the Item Withdraw and Reistate action Add the make Item Private and Public action Add the Permanently Delete action
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { RouterModule } from '@angular/router';
|
|
|
|
import { ItemPageComponent } from './simple/item-page.component';
|
|
import { FullItemPageComponent } from './full/full-item-page.component';
|
|
import { ItemPageResolver } from './item-page.resolver';
|
|
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
|
import {URLCombiner} from '../core/url-combiner/url-combiner';
|
|
import {getItemModulePath} from '../app-routing.module';
|
|
|
|
export function getItemPageRoute(itemId: string) {
|
|
return new URLCombiner(getItemModulePath(), itemId).toString();
|
|
}
|
|
export function getItemEditPath(id: string) {
|
|
return new URLCombiner(getItemModulePath(),ITEM_EDIT_PATH.replace(/:id/, id)).toString()
|
|
}
|
|
|
|
const ITEM_EDIT_PATH = ':id/edit';
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forChild([
|
|
{
|
|
path: ':id',
|
|
component: ItemPageComponent,
|
|
pathMatch: 'full',
|
|
resolve: {
|
|
item: ItemPageResolver
|
|
}
|
|
},
|
|
{
|
|
path: ':id/full',
|
|
component: FullItemPageComponent,
|
|
resolve: {
|
|
item: ItemPageResolver
|
|
}
|
|
},
|
|
{
|
|
path: ITEM_EDIT_PATH,
|
|
loadChildren: './edit-item-page/edit-item-page.module#EditItemPageModule',
|
|
canActivate: [AuthenticatedGuard]
|
|
}
|
|
])
|
|
],
|
|
providers: [
|
|
ItemPageResolver,
|
|
]
|
|
})
|
|
export class ItemPageRoutingModule {
|
|
|
|
}
|