Skip to content
Snippets Groups Projects
edit-item-page.routing.module.ts 4.86 KiB
Newer Older
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { EditItemPageComponent } from './edit-item-page.component';
import { ItemWithdrawComponent } from './item-withdraw/item-withdraw.component';
import { ItemReinstateComponent } from './item-reinstate/item-reinstate.component';
import { ItemPrivateComponent } from './item-private/item-private.component';
import { ItemPublicComponent } from './item-public/item-public.component';
import { ItemDeleteComponent } from './item-delete/item-delete.component';
lotte's avatar
lotte committed
import { ItemStatusComponent } from './item-status/item-status.component';
import { ItemMetadataComponent } from './item-metadata/item-metadata.component';
lotte's avatar
lotte committed
import { ItemBitstreamsComponent } from './item-bitstreams/item-bitstreams.component';
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
import { ItemMoveComponent } from './item-move/item-move.component';
import { ItemRelationshipsComponent } from './item-relationships/item-relationships.component';
lotte's avatar
lotte committed
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
import { ItemVersionHistoryComponent } from './item-version-history/item-version-history.component';
import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component';
lotte's avatar
lotte committed
export const ITEM_EDIT_WITHDRAW_PATH = 'withdraw';
export const ITEM_EDIT_REINSTATE_PATH = 'reinstate';
export const ITEM_EDIT_PRIVATE_PATH = 'private';
export const ITEM_EDIT_PUBLIC_PATH = 'public';
export const ITEM_EDIT_DELETE_PATH = 'delete';
export const ITEM_EDIT_MOVE_PATH = 'move';
export const ITEM_EDIT_AUTHORIZATIONS_PATH = 'authorizations';
/**
 * Routing module that handles the routing for the Edit Item page administrator functionality
 */
@NgModule({
  imports: [
    RouterModule.forChild([
      {
        path: '',
        resolve: {
lotte's avatar
lotte committed
          breadcrumb: I18nBreadcrumbResolver
lotte's avatar
lotte committed
        },
        data: { breadcrumbKey: 'item.edit' },
lotte's avatar
lotte committed
        children: [
          {
            path: '',
lotte's avatar
lotte committed
            component: EditItemPageComponent,
            children: [
              {
                path: '',
                redirectTo: 'status',
                pathMatch: 'full'
              },
              {
                path: 'status',
                component: ItemStatusComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.status.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              },
              {
                path: 'bitstreams',
                component: ItemBitstreamsComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.bitstreams.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              },
              {
                path: 'metadata',
                component: ItemMetadataComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.metadata.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              },
              {
                path: 'relationships',
                component: ItemRelationshipsComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.relationships.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              },
              {
                path: 'view',
                /* TODO - change when view page exists */
                component: ItemBitstreamsComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.view.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              },
              {
                path: 'curate',
                /* TODO - change when curate page exists */
                component: ItemBitstreamsComponent,
lotte's avatar
lotte committed
                data: { title: 'item.edit.tabs.curate.title', showBreadcrumbs: true }
              },
              {
                path: 'versionhistory',
                component: ItemVersionHistoryComponent,
                data: { title: 'item.edit.tabs.versionhistory.title', showBreadcrumbs: true }
lotte's avatar
lotte committed
              }
            ]
lotte's avatar
lotte committed
          },
          {
lotte's avatar
lotte committed
            path: 'mapper',
            component: ItemCollectionMapperComponent,
lotte's avatar
lotte committed
          },
          {
lotte's avatar
lotte committed
            path: ITEM_EDIT_WITHDRAW_PATH,
            component: ItemWithdrawComponent,
lotte's avatar
lotte committed
          },
          {
lotte's avatar
lotte committed
            path: ITEM_EDIT_REINSTATE_PATH,
            component: ItemReinstateComponent,
lotte's avatar
lotte committed
          },
lotte's avatar
lotte committed
            path: ITEM_EDIT_PRIVATE_PATH,
            component: ItemPrivateComponent,
lotte's avatar
lotte committed
          {
lotte's avatar
lotte committed
            path: ITEM_EDIT_PUBLIC_PATH,
            component: ItemPublicComponent,
lotte's avatar
lotte committed
          },
          {
lotte's avatar
lotte committed
            path: ITEM_EDIT_DELETE_PATH,
            component: ItemDeleteComponent,
lotte's avatar
lotte committed
          },
lotte's avatar
lotte committed
          {
            path: ITEM_EDIT_MOVE_PATH,
            component: ItemMoveComponent,
            data: { title: 'item.edit.move.title' },
          },
          {
            path: ITEM_EDIT_AUTHORIZATIONS_PATH,
            component: ItemAuthorizationsComponent,
            data: { title: 'item.edit.authorizations.title' },
lotte's avatar
lotte committed
          }
lotte's avatar
lotte committed
        ]
lotte's avatar
lotte committed
  providers: []
})
export class EditItemPageRoutingModule {

}