diff --git a/src/app/+admin/admin-access-control/admin-access-control-routing-paths.ts b/src/app/+admin/admin-access-control/admin-access-control-routing-paths.ts
new file mode 100644
index 0000000000..2080cb14a7
--- /dev/null
+++ b/src/app/+admin/admin-access-control/admin-access-control-routing-paths.ts
@@ -0,0 +1,8 @@
+import { URLCombiner } from '../../core/url-combiner/url-combiner';
+import { getAccessControlModuleRoute } from '../admin-routing-paths';
+
+export const GROUP_EDIT_PATH = 'groups';
+
+export function getGroupEditRoute(id: string) {
+ return new URLCombiner(getAccessControlModuleRoute(), GROUP_EDIT_PATH, id).toString();
+}
diff --git a/src/app/+admin/admin-access-control/admin-access-control-routing.module.ts b/src/app/+admin/admin-access-control/admin-access-control-routing.module.ts
index f61a3c2f71..d2f2233eee 100644
--- a/src/app/+admin/admin-access-control/admin-access-control-routing.module.ts
+++ b/src/app/+admin/admin-access-control/admin-access-control-routing.module.ts
@@ -3,14 +3,7 @@ import { RouterModule } from '@angular/router';
import { EPeopleRegistryComponent } from './epeople-registry/epeople-registry.component';
import { GroupFormComponent } from './group-registry/group-form/group-form.component';
import { GroupsRegistryComponent } from './group-registry/groups-registry.component';
-import { URLCombiner } from '../../core/url-combiner/url-combiner';
-import { getAccessControlModulePath } from '../admin-routing.module';
-
-export const GROUP_EDIT_PATH = 'groups';
-
-export function getGroupEditPath(id: string) {
- return new URLCombiner(getAccessControlModulePath(), GROUP_EDIT_PATH, id).toString();
-}
+import { GROUP_EDIT_PATH } from './admin-access-control-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+admin/admin-registries/admin-registries-routing-paths.ts b/src/app/+admin/admin-registries/admin-registries-routing-paths.ts
new file mode 100644
index 0000000000..fa8ee0b209
--- /dev/null
+++ b/src/app/+admin/admin-registries/admin-registries-routing-paths.ts
@@ -0,0 +1,8 @@
+import { URLCombiner } from '../../core/url-combiner/url-combiner';
+import { getRegistriesModuleRoute } from '../admin-routing-paths';
+
+export const BITSTREAMFORMATS_MODULE_PATH = 'bitstream-formats';
+
+export function getBitstreamFormatsModuleRoute() {
+ return new URLCombiner(getRegistriesModuleRoute(), BITSTREAMFORMATS_MODULE_PATH).toString();
+}
diff --git a/src/app/+admin/admin-registries/admin-registries-routing.module.ts b/src/app/+admin/admin-registries/admin-registries-routing.module.ts
index 8833b307b9..d291827b12 100644
--- a/src/app/+admin/admin-registries/admin-registries-routing.module.ts
+++ b/src/app/+admin/admin-registries/admin-registries-routing.module.ts
@@ -2,15 +2,8 @@ import { MetadataRegistryComponent } from './metadata-registry/metadata-registry
import { RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { MetadataSchemaComponent } from './metadata-schema/metadata-schema.component';
-import { URLCombiner } from '../../core/url-combiner/url-combiner';
-import { getRegistriesModulePath } from '../admin-routing.module';
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
-
-const BITSTREAMFORMATS_MODULE_PATH = 'bitstream-formats';
-
-export function getBitstreamFormatsModulePath() {
- return new URLCombiner(getRegistriesModulePath(), BITSTREAMFORMATS_MODULE_PATH).toString();
-}
+import { BITSTREAMFORMATS_MODULE_PATH } from './admin-registries-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts b/src/app/+admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts
index 9712be70ca..ecc26bd5d9 100644
--- a/src/app/+admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts
+++ b/src/app/+admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts
@@ -5,8 +5,8 @@ import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
-import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
+import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
/**
* This component renders the page to create a new bitstream format.
@@ -37,7 +37,7 @@ export class AddBitstreamFormatComponent {
if (response.isSuccessful) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.create.success.head'),
this.translateService.get('admin.registries.bitstream-formats.create.success.content'));
- this.router.navigate([getBitstreamFormatsModulePath()]);
+ this.router.navigate([getBitstreamFormatsModuleRoute()]);
this.bitstreamFormatDataService.clearBitStreamFormatRequests().subscribe();
} else {
this.notificationService.error(this.translateService.get('admin.registries.bitstream-formats.create.failure.head'),
diff --git a/src/app/+admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts b/src/app/+admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts
index 0fdcc75689..0b63e4d4dd 100644
--- a/src/app/+admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts
+++ b/src/app/+admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts
@@ -7,8 +7,8 @@ import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'
import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service';
import { RestResponse } from '../../../../core/cache/response.models';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
-import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { TranslateService } from '@ngx-translate/core';
+import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
/**
* This component renders the edit page of a bitstream format.
@@ -51,7 +51,7 @@ export class EditBitstreamFormatComponent implements OnInit {
if (response.isSuccessful) {
this.notificationService.success(this.translateService.get('admin.registries.bitstream-formats.edit.success.head'),
this.translateService.get('admin.registries.bitstream-formats.edit.success.content'));
- this.router.navigate([getBitstreamFormatsModulePath()]);
+ this.router.navigate([getBitstreamFormatsModuleRoute()]);
} else {
this.notificationService.error('admin.registries.bitstream-formats.edit.failure.head',
'admin.registries.bitstream-formats.create.edit.content');
diff --git a/src/app/+admin/admin-registries/bitstream-formats/format-form/format-form.component.ts b/src/app/+admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
index 505ccccd91..7212288ab8 100644
--- a/src/app/+admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
+++ b/src/app/+admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
@@ -12,9 +12,9 @@ import {
DynamicTextAreaModel
} from '@ng-dynamic-forms/core';
import { Router } from '@angular/router';
-import { getBitstreamFormatsModulePath } from '../../admin-registries-routing.module';
import { hasValue, isEmpty } from '../../../../shared/empty.util';
import { TranslateService } from '@ngx-translate/core';
+import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
/**
* The component responsible for rendering the form to create/edit a bitstream format
@@ -189,6 +189,6 @@ export class FormatFormComponent implements OnInit {
* Cancels the edit/create action of the bitstream format and navigates back to the bitstream format registry
*/
onCancel() {
- this.router.navigate([getBitstreamFormatsModulePath()]);
+ this.router.navigate([getBitstreamFormatsModuleRoute()]);
}
}
diff --git a/src/app/+admin/admin-routing-paths.ts b/src/app/+admin/admin-routing-paths.ts
new file mode 100644
index 0000000000..11eac49fe2
--- /dev/null
+++ b/src/app/+admin/admin-routing-paths.ts
@@ -0,0 +1,13 @@
+import { URLCombiner } from '../core/url-combiner/url-combiner';
+import { getAdminModuleRoute } from '../app-routing-paths';
+
+export const REGISTRIES_MODULE_PATH = 'registries';
+export const ACCESS_CONTROL_MODULE_PATH = 'access-control';
+
+export function getRegistriesModuleRoute() {
+ return new URLCombiner(getAdminModuleRoute(), REGISTRIES_MODULE_PATH).toString();
+}
+
+export function getAccessControlModuleRoute() {
+ return new URLCombiner(getAdminModuleRoute(), ACCESS_CONTROL_MODULE_PATH).toString();
+}
diff --git a/src/app/+admin/admin-routing.module.ts b/src/app/+admin/admin-routing.module.ts
index 84b418772a..7495eab003 100644
--- a/src/app/+admin/admin-routing.module.ts
+++ b/src/app/+admin/admin-routing.module.ts
@@ -1,24 +1,12 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
-import { getAdminModulePath } from '../app-routing.module';
import { MetadataImportPageComponent } from './admin-import-metadata-page/metadata-import-page.component';
import { AdminSearchPageComponent } from './admin-search-page/admin-search-page.component';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow-page.component';
import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.service';
-import { URLCombiner } from '../core/url-combiner/url-combiner';
import { AdminCurationTasksComponent } from './admin-curation-tasks/admin-curation-tasks.component';
-
-const REGISTRIES_MODULE_PATH = 'registries';
-export const ACCESS_CONTROL_MODULE_PATH = 'access-control';
-
-export function getRegistriesModulePath() {
- return new URLCombiner(getAdminModulePath(), REGISTRIES_MODULE_PATH).toString();
-}
-
-export function getAccessControlModulePath() {
- return new URLCombiner(getAdminModulePath(), ACCESS_CONTROL_MODULE_PATH).toString();
-}
+import { ACCESS_CONTROL_MODULE_PATH, REGISTRIES_MODULE_PATH } from './admin-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts
index 1dcd978095..34db71db77 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts
@@ -12,7 +12,7 @@ import { CollectionSearchResult } from '../../../../../shared/object-collection/
import { Collection } from '../../../../../core/shared/collection.model';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
-import { getCollectionEditPath } from '../../../../../+collection-page/collection-page-routing.module';
+import { getCollectionEditRoute } from '../../../../../+collection-page/collection-page-routing-paths';
describe('CollectionAdminSearchResultGridElementComponent', () => {
let component: CollectionAdminSearchResultGridElementComponent;
@@ -61,6 +61,6 @@ describe('CollectionAdminSearchResultGridElementComponent', () => {
it('should render an edit button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.edit-link'));
const link = a.nativeElement.href;
- expect(link).toContain(getCollectionEditPath(id));
+ expect(link).toContain(getCollectionEditRoute(id));
})
});
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts
index 5e784165ab..9477544f60 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts
@@ -4,8 +4,8 @@ import { listableObjectComponent } from '../../../../../shared/object-collection
import { Context } from '../../../../../core/shared/context.model';
import { CollectionSearchResult } from '../../../../../shared/object-collection/shared/collection-search-result.model';
import { Collection } from '../../../../../core/shared/collection.model';
-import { getCollectionEditPath } from '../../../../../+collection-page/collection-page-routing.module';
import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component';
+import { getCollectionEditRoute } from '../../../../../+collection-page/collection-page-routing-paths';
@listableObjectComponent(CollectionSearchResult, ViewMode.GridElement, Context.AdminSearch)
@Component({
@@ -21,6 +21,6 @@ export class CollectionAdminSearchResultGridElementComponent extends SearchResul
ngOnInit() {
super.ngOnInit();
- this.editPath = getCollectionEditPath(this.dso.uuid);
+ this.editPath = getCollectionEditRoute(this.dso.uuid);
}
}
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts
index 99d33f841a..85c81d55a4 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts
@@ -13,9 +13,9 @@ import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { CommunityAdminSearchResultGridElementComponent } from './community-admin-search-result-grid-element.component';
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
-import { getCommunityEditPath } from '../../../../../+community-page/community-page-routing.module';
import { Community } from '../../../../../core/shared/community.model';
import { CommunityAdminSearchResultListElementComponent } from '../../admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component';
+import { getCommunityEditRoute } from '../../../../../+community-page/community-page-routing-paths';
describe('CommunityAdminSearchResultGridElementComponent', () => {
let component: CommunityAdminSearchResultGridElementComponent;
@@ -65,6 +65,6 @@ describe('CommunityAdminSearchResultGridElementComponent', () => {
it('should render an edit button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.edit-link'));
const link = a.nativeElement.href;
- expect(link).toContain(getCommunityEditPath(id));
+ expect(link).toContain(getCommunityEditRoute(id));
})
});
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts
index 8df12e703f..59117b1f65 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts
@@ -4,8 +4,8 @@ import { listableObjectComponent } from '../../../../../shared/object-collection
import { Context } from '../../../../../core/shared/context.model';
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
import { Community } from '../../../../../core/shared/community.model';
-import { getCommunityEditPath } from '../../../../../+community-page/community-page-routing.module';
import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component';
+import { getCommunityEditRoute } from '../../../../../+community-page/community-page-routing-paths';
@listableObjectComponent(CommunitySearchResult, ViewMode.GridElement, Context.AdminSearch)
@Component({
@@ -21,6 +21,6 @@ export class CommunityAdminSearchResultGridElementComponent extends SearchResult
ngOnInit() {
super.ngOnInit();
- this.editPath = getCommunityEditPath(this.dso.uuid);
+ this.editPath = getCommunityEditRoute(this.dso.uuid);
}
}
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts
index 04558f6320..67defa4573 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts
@@ -4,21 +4,21 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model';
import { getListableObjectComponent, listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator';
import { Context } from '../../../../../core/shared/context.model';
import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model';
-import { getItemEditPath } from '../../../../../+item-page/item-page-routing.module';
import { URLCombiner } from '../../../../../core/url-combiner/url-combiner';
-import {
- ITEM_EDIT_DELETE_PATH,
- ITEM_EDIT_MOVE_PATH,
- ITEM_EDIT_PRIVATE_PATH,
- ITEM_EDIT_PUBLIC_PATH,
- ITEM_EDIT_REINSTATE_PATH,
- ITEM_EDIT_WITHDRAW_PATH
-} from '../../../../../+item-page/edit-item-page/edit-item-page.routing.module';
import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component';
import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service';
import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service';
import { GenericConstructor } from '../../../../../core/shared/generic-constructor';
import { ListableObjectDirective } from '../../../../../shared/object-collection/shared/listable-object/listable-object.directive';
+import { getItemEditRoute } from '../../../../../+item-page/item-page-routing-paths';
+import {
+ ITEM_EDIT_MOVE_PATH,
+ ITEM_EDIT_DELETE_PATH,
+ ITEM_EDIT_PUBLIC_PATH,
+ ITEM_EDIT_PRIVATE_PATH,
+ ITEM_EDIT_REINSTATE_PATH,
+ ITEM_EDIT_WITHDRAW_PATH
+} from '../../../../../+item-page/edit-item-page/edit-item-page.routing-paths';
@listableObjectComponent(ItemSearchResult, ViewMode.GridElement, Context.AdminSearch)
@Component({
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts
index 259d1d64aa..e4c151eee9 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts
@@ -10,7 +10,7 @@ import { CollectionSearchResult } from '../../../../../shared/object-collection/
import { Collection } from '../../../../../core/shared/collection.model';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
-import { getCollectionEditPath } from '../../../../../+collection-page/collection-page-routing.module';
+import { getCollectionEditRoute } from '../../../../../+collection-page/collection-page-routing-paths';
describe('CollectionAdminSearchResultListElementComponent', () => {
let component: CollectionAdminSearchResultListElementComponent;
@@ -55,6 +55,6 @@ describe('CollectionAdminSearchResultListElementComponent', () => {
it('should render an edit button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a'));
const link = a.nativeElement.href;
- expect(link).toContain(getCollectionEditPath(id));
+ expect(link).toContain(getCollectionEditRoute(id));
})
});
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts
index e49f272184..9622888660 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts
@@ -5,7 +5,7 @@ import { Context } from '../../../../../core/shared/context.model';
import { SearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/search-result-list-element.component';
import { CollectionSearchResult } from '../../../../../shared/object-collection/shared/collection-search-result.model';
import { Collection } from '../../../../../core/shared/collection.model';
-import { getCollectionEditPath } from '../../../../../+collection-page/collection-page-routing.module';
+import { getCollectionEditRoute } from '../../../../../+collection-page/collection-page-routing-paths';
@listableObjectComponent(CollectionSearchResult, ViewMode.ListElement, Context.AdminSearch)
@Component({
@@ -21,6 +21,6 @@ export class CollectionAdminSearchResultListElementComponent extends SearchResul
ngOnInit() {
super.ngOnInit();
- this.editPath = getCollectionEditPath(this.dso.uuid);
+ this.editPath = getCollectionEditRoute(this.dso.uuid);
}
}
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts
index a7922d7cf5..31709914c5 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts
@@ -9,8 +9,8 @@ import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { CommunityAdminSearchResultListElementComponent } from './community-admin-search-result-list-element.component';
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
-import { getCommunityEditPath } from '../../../../../+community-page/community-page-routing.module';
import { Community } from '../../../../../core/shared/community.model';
+import { getCommunityEditRoute } from '../../../../../+community-page/community-page-routing-paths';
describe('CommunityAdminSearchResultListElementComponent', () => {
let component: CommunityAdminSearchResultListElementComponent;
@@ -55,6 +55,6 @@ describe('CommunityAdminSearchResultListElementComponent', () => {
it('should render an edit button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a'));
const link = a.nativeElement.href;
- expect(link).toContain(getCommunityEditPath(id));
+ expect(link).toContain(getCommunityEditRoute(id));
})
});
diff --git a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts
index 71fe4203ef..2e82e7f3b8 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts
@@ -5,7 +5,7 @@ import { Context } from '../../../../../core/shared/context.model';
import { SearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/search-result-list-element.component';
import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model';
import { Community } from '../../../../../core/shared/community.model';
-import { getCommunityEditPath } from '../../../../../+community-page/community-page-routing.module';
+import { getCommunityEditRoute } from '../../../../../+community-page/community-page-routing-paths';
@listableObjectComponent(CommunitySearchResult, ViewMode.ListElement, Context.AdminSearch)
@Component({
@@ -21,6 +21,6 @@ export class CommunityAdminSearchResultListElementComponent extends SearchResult
ngOnInit() {
super.ngOnInit();
- this.editPath = getCommunityEditPath(this.dso.uuid);
+ this.editPath = getCommunityEditRoute(this.dso.uuid);
}
}
diff --git a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.html b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.html
index a4a923e725..2ee828e870 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.html
+++ b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.html
@@ -1,27 +1,27 @@
-
+
{{"admin.search.item.edit" | translate}}
-
+
{{"admin.search.item.withdraw" | translate}}
-
+
{{"admin.search.item.reinstate" | translate}}
-
+
{{"admin.search.item.make-private" | translate}}
-
+
{{"admin.search.item.make-public" | translate}}
-
+
{{"admin.search.item.delete" | translate}}
-
+
{{"admin.search.item.move" | translate}}
diff --git a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts
index c1aceb477d..f26fde1311 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts
@@ -6,16 +6,16 @@ import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { ItemAdminSearchResultActionsComponent } from './item-admin-search-result-actions.component';
import { Item } from '../../../core/shared/item.model';
+import { URLCombiner } from '../../../core/url-combiner/url-combiner';
+import { getItemEditRoute } from '../../../+item-page/item-page-routing-paths';
import {
- ITEM_EDIT_DELETE_PATH,
ITEM_EDIT_MOVE_PATH,
- ITEM_EDIT_PRIVATE_PATH,
+ ITEM_EDIT_DELETE_PATH,
ITEM_EDIT_PUBLIC_PATH,
+ ITEM_EDIT_PRIVATE_PATH,
ITEM_EDIT_REINSTATE_PATH,
ITEM_EDIT_WITHDRAW_PATH
-} from '../../../+item-page/edit-item-page/edit-item-page.routing.module';
-import { getItemEditPath } from '../../../+item-page/item-page-routing.module';
-import { URLCombiner } from '../../../core/url-combiner/url-combiner';
+} from '../../../+item-page/edit-item-page/edit-item-page.routing-paths';
describe('ItemAdminSearchResultActionsComponent', () => {
let component: ItemAdminSearchResultActionsComponent;
@@ -55,19 +55,19 @@ describe('ItemAdminSearchResultActionsComponent', () => {
it('should render an edit button with the correct link', () => {
const button = fixture.debugElement.query(By.css('a.edit-link'));
const link = button.nativeElement.href;
- expect(link).toContain(getItemEditPath(id));
+ expect(link).toContain(getItemEditRoute(id));
});
it('should render a delete button with the correct link', () => {
const button = fixture.debugElement.query(By.css('a.delete-link'));
const link = button.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_DELETE_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_DELETE_PATH).toString());
});
it('should render a move button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.move-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_MOVE_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_MOVE_PATH).toString());
});
describe('when the item is not withdrawn', () => {
@@ -79,7 +79,7 @@ describe('ItemAdminSearchResultActionsComponent', () => {
it('should render a withdraw button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.withdraw-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_WITHDRAW_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_WITHDRAW_PATH).toString());
});
it('should not render a reinstate button with the correct link', () => {
@@ -102,7 +102,7 @@ describe('ItemAdminSearchResultActionsComponent', () => {
it('should render a reinstate button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.reinstate-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_REINSTATE_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_REINSTATE_PATH).toString());
});
});
@@ -115,7 +115,7 @@ describe('ItemAdminSearchResultActionsComponent', () => {
it('should render a make private button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.private-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_PRIVATE_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_PRIVATE_PATH).toString());
});
it('should not render a make public button with the correct link', () => {
@@ -138,7 +138,7 @@ describe('ItemAdminSearchResultActionsComponent', () => {
it('should render a make private button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.public-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getItemEditPath(id), ITEM_EDIT_PUBLIC_PATH).toString());
+ expect(link).toContain(new URLCombiner(getItemEditRoute(id), ITEM_EDIT_PUBLIC_PATH).toString());
});
})
});
diff --git a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts
index 40cddc816d..d3cbc025c2 100644
--- a/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts
+++ b/src/app/+admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts
@@ -1,15 +1,15 @@
import { Component, Input } from '@angular/core';
import { Item } from '../../../core/shared/item.model';
-import { getItemEditPath } from '../../../+item-page/item-page-routing.module';
import { URLCombiner } from '../../../core/url-combiner/url-combiner';
+import { getItemEditRoute } from '../../../+item-page/item-page-routing-paths';
import {
- ITEM_EDIT_DELETE_PATH,
ITEM_EDIT_MOVE_PATH,
- ITEM_EDIT_PRIVATE_PATH,
+ ITEM_EDIT_DELETE_PATH,
ITEM_EDIT_PUBLIC_PATH,
+ ITEM_EDIT_PRIVATE_PATH,
ITEM_EDIT_REINSTATE_PATH,
ITEM_EDIT_WITHDRAW_PATH
-} from '../../../+item-page/edit-item-page/edit-item-page.routing.module';
+} from '../../../+item-page/edit-item-page/edit-item-page.routing-paths';
@Component({
selector: 'ds-item-admin-search-result-actions-element',
@@ -33,49 +33,49 @@ export class ItemAdminSearchResultActionsComponent {
/**
* Returns the path to the edit page of this item
*/
- getEditPath(): string {
- return getItemEditPath(this.item.uuid)
+ getEditRoute(): string {
+ return getItemEditRoute(this.item.uuid)
}
/**
* Returns the path to the move page of this item
*/
- getMovePath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_MOVE_PATH).toString();
+ getMoveRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_MOVE_PATH).toString();
}
/**
* Returns the path to the delete page of this item
*/
- getDeletePath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_DELETE_PATH).toString();
+ getDeleteRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_DELETE_PATH).toString();
}
/**
* Returns the path to the withdraw page of this item
*/
- getWithdrawPath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_WITHDRAW_PATH).toString();
+ getWithdrawRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_WITHDRAW_PATH).toString();
}
/**
* Returns the path to the reinstate page of this item
*/
- getReinstatePath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_REINSTATE_PATH).toString();
+ getReinstateRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_REINSTATE_PATH).toString();
}
/**
* Returns the path to the page where the user can make this item private
*/
- getPrivatePath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_PRIVATE_PATH).toString();
+ getPrivateRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_PRIVATE_PATH).toString();
}
/**
* Returns the path to the page where the user can make this item public
*/
- getPublicPath(): string {
- return new URLCombiner(this.getEditPath(), ITEM_EDIT_PUBLIC_PATH).toString();
+ getPublicRoute(): string {
+ return new URLCombiner(this.getEditRoute(), ITEM_EDIT_PUBLIC_PATH).toString();
}
}
diff --git a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.html b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.html
index 1a90a4cff4..4d7266514c 100644
--- a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.html
+++ b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.html
@@ -1,7 +1,7 @@
-
+
{{"admin.workflow.item.delete" | translate}}
-
+
{{"admin.workflow.item.send-back" | translate}}
diff --git a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.spec.ts b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.spec.ts
index bca2684364..5e0ff481a0 100644
--- a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.spec.ts
+++ b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.spec.ts
@@ -5,19 +5,22 @@ import { TranslateModule } from '@ngx-translate/core';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { Item } from '../../../core/shared/item.model';
-import {
- ITEM_EDIT_DELETE_PATH,
- ITEM_EDIT_MOVE_PATH,
- ITEM_EDIT_PRIVATE_PATH,
- ITEM_EDIT_PUBLIC_PATH,
- ITEM_EDIT_REINSTATE_PATH,
- ITEM_EDIT_WITHDRAW_PATH
-} from '../../../+item-page/edit-item-page/edit-item-page.routing.module';
-import { getItemEditPath } from '../../../+item-page/item-page-routing.module';
import { URLCombiner } from '../../../core/url-combiner/url-combiner';
import { WorkflowItemAdminWorkflowActionsComponent } from './workflow-item-admin-workflow-actions.component';
import { WorkflowItem } from '../../../core/submission/models/workflowitem.model';
-import { getWorkflowItemDeletePath, getWorkflowItemSendBackPath } from '../../../+workflowitems-edit-page/workflowitems-edit-page-routing.module';
+import {
+ getWorkflowItemSendBackRoute,
+ getWorkflowItemDeleteRoute
+} from '../../../+workflowitems-edit-page/workflowitems-edit-page-routing-paths';
+import { getItemEditRoute } from '../../../+item-page/item-page-routing-paths';
+import {
+ ITEM_EDIT_MOVE_PATH,
+ ITEM_EDIT_DELETE_PATH,
+ ITEM_EDIT_PUBLIC_PATH,
+ ITEM_EDIT_PRIVATE_PATH,
+ ITEM_EDIT_REINSTATE_PATH,
+ ITEM_EDIT_WITHDRAW_PATH
+} from '../../../+item-page/edit-item-page/edit-item-page.routing-paths';
describe('WorkflowItemAdminWorkflowActionsComponent', () => {
let component: WorkflowItemAdminWorkflowActionsComponent;
@@ -57,12 +60,12 @@ describe('WorkflowItemAdminWorkflowActionsComponent', () => {
it('should render a delete button with the correct link', () => {
const button = fixture.debugElement.query(By.css('a.delete-link'));
const link = button.nativeElement.href;
- expect(link).toContain(new URLCombiner(getWorkflowItemDeletePath(wfi.id)).toString());
+ expect(link).toContain(new URLCombiner(getWorkflowItemDeleteRoute(wfi.id)).toString());
});
it('should render a move button with the correct link', () => {
const a = fixture.debugElement.query(By.css('a.send-back-link'));
const link = a.nativeElement.href;
- expect(link).toContain(new URLCombiner(getWorkflowItemSendBackPath(wfi.id)).toString());
+ expect(link).toContain(new URLCombiner(getWorkflowItemSendBackRoute(wfi.id)).toString());
});
});
diff --git a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts
index d44f870b14..9dba0e9fd4 100644
--- a/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts
+++ b/src/app/+admin/admin-workflow-page/admin-workflow-search-results/workflow-item-admin-workflow-actions.component.ts
@@ -1,6 +1,9 @@
import { Component, Input } from '@angular/core';
import { WorkflowItem } from '../../../core/submission/models/workflowitem.model';
-import { getWorkflowItemDeletePath, getWorkflowItemSendBackPath } from '../../../+workflowitems-edit-page/workflowitems-edit-page-routing.module';
+import {
+ getWorkflowItemSendBackRoute,
+ getWorkflowItemDeleteRoute
+} from '../../../+workflowitems-edit-page/workflowitems-edit-page-routing-paths';
@Component({
selector: 'ds-workflow-item-admin-workflow-actions-element',
@@ -25,15 +28,15 @@ export class WorkflowItemAdminWorkflowActionsComponent {
/**
* Returns the path to the delete page of this workflow item
*/
- getDeletePath(): string {
+ getDeleteRoute(): string {
- return getWorkflowItemDeletePath(this.wfi.id)
+ return getWorkflowItemDeleteRoute(this.wfi.id)
}
/**
* Returns the path to the send back page of this workflow item
*/
- getSendBackPath(): string {
- return getWorkflowItemSendBackPath(this.wfi.id);
+ getSendBackRoute(): string {
+ return getWorkflowItemSendBackRoute(this.wfi.id);
}
}
diff --git a/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts b/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
index cce6932cd1..3e8b686e48 100644
--- a/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
+++ b/src/app/+bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts
@@ -36,7 +36,7 @@ import { Observable } from 'rxjs/internal/Observable';
import { RemoteData } from '../../core/data/remote-data';
import { PaginatedList } from '../../core/data/paginated-list';
import { followLink } from '../../shared/utils/follow-link-config.model';
-import { getItemEditPath } from '../../+item-page/item-page-routing.module';
+import { getItemEditRoute } from '../../+item-page/item-page-routing-paths';
@Component({
selector: 'ds-edit-bitstream-page',
@@ -506,7 +506,7 @@ export class EditBitstreamPageComponent implements OnInit, OnDestroy {
*/
navigateToItemEditBitstreams() {
if (hasValue(this.itemId)) {
- this.router.navigate([getItemEditPath(this.itemId), 'bitstreams']);
+ this.router.navigate([getItemEditRoute(this.itemId), 'bitstreams']);
} else {
this.location.back();
}
diff --git a/src/app/+browse-by/browse-by-dso-breadcrumb.resolver.ts b/src/app/+browse-by/browse-by-dso-breadcrumb.resolver.ts
index 5759e28754..e64fa8a89d 100644
--- a/src/app/+browse-by/browse-by-dso-breadcrumb.resolver.ts
+++ b/src/app/+browse-by/browse-by-dso-breadcrumb.resolver.ts
@@ -9,7 +9,7 @@ import { Observable } from 'rxjs';
import { getRemoteDataPayload, getSucceededRemoteData } from '../core/shared/operators';
import { map } from 'rxjs/operators';
import { hasValue } from '../shared/empty.util';
-import { getDSOPath } from '../app-routing.module';
+import { getDSORoute } from '../app-routing-paths';
/**
* The class that resolves the BreadcrumbConfig object for a DSpaceObject on a browse by page
@@ -32,7 +32,7 @@ export class BrowseByDSOBreadcrumbResolver {
getSucceededRemoteData(),
getRemoteDataPayload(),
map((object: Community | Collection) => {
- return { provider: this.breadcrumbService, key: object, url: getDSOPath(object) };
+ return { provider: this.breadcrumbService, key: object, url: getDSORoute(object) };
})
);
}
diff --git a/src/app/+collection-page/collection-page-routing-paths.ts b/src/app/+collection-page/collection-page-routing-paths.ts
new file mode 100644
index 0000000000..7a1b2923bf
--- /dev/null
+++ b/src/app/+collection-page/collection-page-routing-paths.ts
@@ -0,0 +1,25 @@
+import { URLCombiner } from '../core/url-combiner/url-combiner';
+
+export const COLLECTION_PARENT_PARAMETER = 'parent';
+
+export const COLLECTION_MODULE_PATH = 'collections';
+
+export function getCollectionModuleRoute() {
+ return `/${COLLECTION_MODULE_PATH}`;
+}
+
+export function getCollectionPageRoute(collectionId: string) {
+ return new URLCombiner(getCollectionModuleRoute(), collectionId).toString();
+}
+
+export function getCollectionEditRoute(id: string) {
+ return new URLCombiner(getCollectionModuleRoute(), id, COLLECTION_EDIT_PATH).toString()
+}
+
+export function getCollectionCreateRoute() {
+ return new URLCombiner(getCollectionModuleRoute(), COLLECTION_CREATE_PATH).toString()
+}
+
+export const COLLECTION_CREATE_PATH = 'create';
+export const COLLECTION_EDIT_PATH = 'edit';
+export const ITEMTEMPLATE_PATH = 'itemtemplate';
diff --git a/src/app/+collection-page/collection-page-routing.module.ts b/src/app/+collection-page/collection-page-routing.module.ts
index 1ebd9b3630..479a136140 100644
--- a/src/app/+collection-page/collection-page-routing.module.ts
+++ b/src/app/+collection-page/collection-page-routing.module.ts
@@ -7,8 +7,6 @@ import { CreateCollectionPageComponent } from './create-collection-page/create-c
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
import { CreateCollectionPageGuard } from './create-collection-page/create-collection-page.guard';
import { DeleteCollectionPageComponent } from './delete-collection-page/delete-collection-page.component';
-import { URLCombiner } from '../core/url-combiner/url-combiner';
-import { getCollectionModulePath } from '../app-routing.module';
import { EditItemTemplatePageComponent } from './edit-item-template-page/edit-item-template-page.component';
import { ItemTemplatePageResolver } from './edit-item-template-page/item-template-page.resolver';
import { CollectionItemMapperComponent } from './collection-item-mapper/collection-item-mapper.component';
@@ -16,24 +14,11 @@ import { CollectionBreadcrumbResolver } from '../core/breadcrumbs/collection-bre
import { DSOBreadcrumbsService } from '../core/breadcrumbs/dso-breadcrumbs.service';
import { LinkService } from '../core/cache/builders/link.service';
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
-
-export const COLLECTION_PARENT_PARAMETER = 'parent';
-
-export function getCollectionPageRoute(collectionId: string) {
- return new URLCombiner(getCollectionModulePath(), collectionId).toString();
-}
-
-export function getCollectionEditPath(id: string) {
- return new URLCombiner(getCollectionModulePath(), id, COLLECTION_EDIT_PATH).toString()
-}
-
-export function getCollectionCreatePath() {
- return new URLCombiner(getCollectionModulePath(), COLLECTION_CREATE_PATH).toString()
-}
-
-const COLLECTION_CREATE_PATH = 'create';
-const COLLECTION_EDIT_PATH = 'edit';
-const ITEMTEMPLATE_PATH = 'itemtemplate';
+import {
+ ITEMTEMPLATE_PATH,
+ COLLECTION_EDIT_PATH,
+ COLLECTION_CREATE_PATH
+} from './collection-page-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts
index 209ce5149a..f225fc3e97 100644
--- a/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts
+++ b/src/app/+collection-page/edit-collection-page/edit-collection-page.component.ts
@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { EditComColPageComponent } from '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component';
import { Collection } from '../../core/shared/collection.model';
-import { getCollectionPageRoute } from '../collection-page-routing.module';
+import { getCollectionPageRoute } from '../collection-page-routing-paths';
/**
* Component that represents the page where a user can edit an existing Collection
diff --git a/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts b/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts
index 6d5ffc8768..3cd2a7a638 100644
--- a/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts
+++ b/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts
@@ -9,8 +9,8 @@ import { ActivatedRoute } from '@angular/router';
import { of as observableOf } from 'rxjs/internal/observable/of';
import { Collection } from '../../core/shared/collection.model';
import { NO_ERRORS_SCHEMA } from '@angular/core';
-import { getCollectionEditPath } from '../collection-page-routing.module';
import { createSuccessfulRemoteDataObject } from '../../shared/remote-data.utils';
+import { getCollectionEditRoute } from '../collection-page-routing-paths';
describe('EditItemTemplatePageComponent', () => {
let comp: EditItemTemplatePageComponent;
@@ -45,7 +45,7 @@ describe('EditItemTemplatePageComponent', () => {
describe('getCollectionEditUrl', () => {
it('should return the collection\'s edit url', () => {
const url = comp.getCollectionEditUrl(collection);
- expect(url).toEqual(getCollectionEditPath(collection.uuid));
+ expect(url).toEqual(getCollectionEditRoute(collection.uuid));
});
});
});
diff --git a/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.ts
index 329c72d683..ac8d9b47d4 100644
--- a/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.ts
+++ b/src/app/+collection-page/edit-item-template-page/edit-item-template-page.component.ts
@@ -5,7 +5,7 @@ import { Collection } from '../../core/shared/collection.model';
import { ActivatedRoute } from '@angular/router';
import { first, map } from 'rxjs/operators';
import { ItemTemplateDataService } from '../../core/data/item-template-data.service';
-import { getCollectionEditPath } from '../collection-page-routing.module';
+import { getCollectionEditRoute } from '../collection-page-routing-paths';
@Component({
selector: 'ds-edit-item-template-page',
@@ -35,7 +35,7 @@ export class EditItemTemplatePageComponent implements OnInit {
*/
getCollectionEditUrl(collection: Collection): string {
if (collection) {
- return getCollectionEditPath(collection.uuid);
+ return getCollectionEditRoute(collection.uuid);
} else {
return '';
}
diff --git a/src/app/+community-page/community-page-routing-paths.ts b/src/app/+community-page/community-page-routing-paths.ts
new file mode 100644
index 0000000000..2d0a3e5308
--- /dev/null
+++ b/src/app/+community-page/community-page-routing-paths.ts
@@ -0,0 +1,24 @@
+import { URLCombiner } from '../core/url-combiner/url-combiner';
+
+export const COMMUNITY_PARENT_PARAMETER = 'parent';
+
+export const COMMUNITY_MODULE_PATH = 'communities';
+
+export function getCommunityModuleRoute() {
+ return `/${COMMUNITY_MODULE_PATH}`;
+}
+
+export function getCommunityPageRoute(communityId: string) {
+ return new URLCombiner(getCommunityModuleRoute(), communityId).toString();
+}
+
+export function getCommunityEditRoute(id: string) {
+ return new URLCombiner(getCommunityModuleRoute(), id, COMMUNITY_EDIT_PATH).toString()
+}
+
+export function getCommunityCreateRoute() {
+ return new URLCombiner(getCommunityModuleRoute(), COMMUNITY_CREATE_PATH).toString()
+}
+
+export const COMMUNITY_CREATE_PATH = 'create';
+export const COMMUNITY_EDIT_PATH = 'edit';
diff --git a/src/app/+community-page/community-page-routing.module.ts b/src/app/+community-page/community-page-routing.module.ts
index 9922bc2c01..08520ab8d4 100644
--- a/src/app/+community-page/community-page-routing.module.ts
+++ b/src/app/+community-page/community-page-routing.module.ts
@@ -7,28 +7,10 @@ import { CreateCommunityPageComponent } from './create-community-page/create-com
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
import { CreateCommunityPageGuard } from './create-community-page/create-community-page.guard';
import { DeleteCommunityPageComponent } from './delete-community-page/delete-community-page.component';
-import { URLCombiner } from '../core/url-combiner/url-combiner';
-import { getCommunityModulePath } from '../app-routing.module';
import { CommunityBreadcrumbResolver } from '../core/breadcrumbs/community-breadcrumb.resolver';
import { DSOBreadcrumbsService } from '../core/breadcrumbs/dso-breadcrumbs.service';
import { LinkService } from '../core/cache/builders/link.service';
-
-export const COMMUNITY_PARENT_PARAMETER = 'parent';
-
-export function getCommunityPageRoute(communityId: string) {
- return new URLCombiner(getCommunityModulePath(), communityId).toString();
-}
-
-export function getCommunityEditPath(id: string) {
- return new URLCombiner(getCommunityModulePath(), id, COMMUNITY_EDIT_PATH).toString()
-}
-
-export function getCommunityCreatePath() {
- return new URLCombiner(getCommunityModulePath(), COMMUNITY_CREATE_PATH).toString()
-}
-
-const COMMUNITY_CREATE_PATH = 'create';
-const COMMUNITY_EDIT_PATH = 'edit';
+import { COMMUNITY_EDIT_PATH, COMMUNITY_CREATE_PATH } from './community-page-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+community-page/edit-community-page/edit-community-page.component.ts b/src/app/+community-page/edit-community-page/edit-community-page.component.ts
index c0adfe0ff1..b8bf3a08ac 100644
--- a/src/app/+community-page/edit-community-page/edit-community-page.component.ts
+++ b/src/app/+community-page/edit-community-page/edit-community-page.component.ts
@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { Community } from '../../core/shared/community.model';
import { ActivatedRoute, Router } from '@angular/router';
import { EditComColPageComponent } from '../../shared/comcol-forms/edit-comcol-page/edit-comcol-page.component';
-import { getCommunityPageRoute } from '../community-page-routing.module';
+import { getCommunityPageRoute } from '../community-page-routing-paths';
/**
* Component that represents the page where a user can edit an existing Community
diff --git a/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts b/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts
index 536fc0931f..eb42b1c30c 100644
--- a/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts
+++ b/src/app/+item-page/bitstreams/upload/upload-bitstream.component.ts
@@ -11,7 +11,6 @@ import { ItemDataService } from '../../../core/data/item-data.service';
import { AuthService } from '../../../core/auth/auth.service';
import { NotificationsService } from '../../../shared/notifications/notifications.service';
import { TranslateService } from '@ngx-translate/core';
-import { getBitstreamModulePath } from '../../../app-routing.module';
import { PaginatedList } from '../../../core/data/paginated-list';
import { Bundle } from '../../../core/shared/bundle.model';
import { BundleDataService } from '../../../core/data/bundle-data.service';
@@ -19,8 +18,9 @@ import {
getFirstSucceededRemoteDataPayload
} from '../../../core/shared/operators';
import { UploaderComponent } from '../../../shared/uploader/uploader.component';
-import { getItemEditPath } from '../../item-page-routing.module';
import { RequestService } from '../../../core/data/request.service';
+import { getBitstreamModuleRoute } from '../../../app-routing-paths';
+import { getItemEditRoute } from '../../item-page-routing-paths';
@Component({
selector: 'ds-upload-bitstream',
@@ -171,7 +171,7 @@ export class UploadBitstreamComponent implements OnInit, OnDestroy {
// Bring over the item ID as a query parameter
const queryParams = { itemId: this.itemId };
- this.router.navigate([getBitstreamModulePath(), bitstream.id, 'edit'], { queryParams: queryParams });
+ this.router.navigate([getBitstreamModuleRoute(), bitstream.id, 'edit'], { queryParams: queryParams });
}
/**
@@ -196,7 +196,7 @@ export class UploadBitstreamComponent implements OnInit, OnDestroy {
* When cancel is clicked, navigate back to the item's edit bitstreams page
*/
onCancel() {
- this.router.navigate([getItemEditPath(this.itemId), 'bitstreams']);
+ this.router.navigate([getItemEditRoute(this.itemId), 'bitstreams']);
}
/**
diff --git a/src/app/+item-page/edit-item-page/edit-item-page.component.ts b/src/app/+item-page/edit-item-page/edit-item-page.component.ts
index eafc04ae0b..655582064c 100644
--- a/src/app/+item-page/edit-item-page/edit-item-page.component.ts
+++ b/src/app/+item-page/edit-item-page/edit-item-page.component.ts
@@ -6,7 +6,7 @@ import { Item } from '../../core/shared/item.model';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { isNotEmpty } from '../../shared/empty.util';
-import { getItemPageRoute } from '../item-page-routing.module';
+import { getItemPageRoute } from '../item-page-routing-paths';
@Component({
selector: 'ds-edit-item-page',
diff --git a/src/app/+item-page/edit-item-page/edit-item-page.routing-paths.ts b/src/app/+item-page/edit-item-page/edit-item-page.routing-paths.ts
new file mode 100644
index 0000000000..ce76a614dd
--- /dev/null
+++ b/src/app/+item-page/edit-item-page/edit-item-page.routing-paths.ts
@@ -0,0 +1,7 @@
+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';
diff --git a/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts b/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts
index 87b4b7a592..7006c5dc89 100644
--- a/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts
+++ b/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts
@@ -20,14 +20,15 @@ import { ResourcePolicyResolver } from '../../shared/resource-policies/resolvers
import { ResourcePolicyCreateComponent } from '../../shared/resource-policies/create/resource-policy-create.component';
import { ResourcePolicyEditComponent } from '../../shared/resource-policies/edit/resource-policy-edit.component';
import { I18nBreadcrumbsService } from '../../core/breadcrumbs/i18n-breadcrumbs.service';
-
-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';
+import {
+ ITEM_EDIT_AUTHORIZATIONS_PATH,
+ ITEM_EDIT_MOVE_PATH,
+ ITEM_EDIT_DELETE_PATH,
+ ITEM_EDIT_PUBLIC_PATH,
+ ITEM_EDIT_PRIVATE_PATH,
+ ITEM_EDIT_REINSTATE_PATH,
+ ITEM_EDIT_WITHDRAW_PATH
+} from './edit-item-page.routing-paths';
/**
* Routing module that handles the routing for the Edit Item page administrator functionality
diff --git a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts
index 7233dbeaa1..18cbd6e855 100644
--- a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts
+++ b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts
@@ -16,7 +16,6 @@ import { NotificationsService } from '../../../shared/notifications/notification
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { By } from '@angular/platform-browser';
import { ItemDeleteComponent } from './item-delete.component';
-import { getItemEditPath } from '../../item-page-routing.module';
import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.utils';
import { VarDirective } from '../../../shared/utils/var.directive';
import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service';
@@ -26,6 +25,7 @@ import { RemoteData } from '../../../core/data/remote-data';
import { PaginatedList } from '../../../core/data/paginated-list';
import { PageInfo } from '../../../core/shared/page-info.model';
import { EntityTypeService } from '../../../core/data/entity-type.service';
+import { getItemEditRoute } from '../../item-page-routing-paths';
let comp: ItemDeleteComponent;
let fixture: ComponentFixture;
@@ -233,7 +233,7 @@ describe('ItemDeleteComponent', () => {
describe('notify', () => {
it('should navigate to the item edit page on failed deletion of the item', () => {
comp.notify(false);
- expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditPath('fake-id')]);
+ expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute('fake-id')]);
});
});
})
diff --git a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts
index 933919c572..ac73c561b2 100644
--- a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts
+++ b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.ts
@@ -1,7 +1,6 @@
import { Component, Input, OnInit } from '@angular/core';
import { defaultIfEmpty, filter, first, map, switchMap, take } from 'rxjs/operators';
import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component';
-import { getItemEditPath } from '../../item-page-routing.module';
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { combineLatest as observableCombineLatest, combineLatest, Observable, of as observableOf } from 'rxjs';
import { RelationshipType } from '../../../core/shared/item-relationships/relationship-type.model';
@@ -22,6 +21,7 @@ import { EntityTypeService } from '../../../core/data/entity-type.service';
import { LinkService } from '../../../core/cache/builders/link.service';
import { followLink } from '../../../shared/utils/follow-link-config.model';
import { RestResponse } from '../../../core/cache/response.models';
+import { getItemEditRoute } from '../../item-page-routing-paths';
@Component({
selector: 'ds-item-delete',
@@ -345,7 +345,7 @@ export class ItemDeleteComponent
this.router.navigate(['']);
} else {
this.notificationsService.error(this.translateService.get('item.edit.' + this.messageKey + '.error'));
- this.router.navigate([getItemEditPath(this.item.id)]);
+ this.router.navigate([getItemEditRoute(this.item.id)]);
}
}
}
diff --git a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts
index 4db7cf94da..1e9deabbf7 100644
--- a/src/app/+item-page/edit-item-page/item-move/item-move.component.ts
+++ b/src/app/+item-page/edit-item-page/item-move/item-move.component.ts
@@ -10,7 +10,6 @@ import { NotificationsService } from '../../../shared/notifications/notification
import { TranslateService } from '@ngx-translate/core';
import { getSucceededRemoteData } from '../../../core/shared/operators';
import { ItemDataService } from '../../../core/data/item-data.service';
-import { getItemEditPath } from '../../item-page-routing.module';
import { Observable, of as observableOf } from 'rxjs';
import { RestResponse } from '../../../core/cache/response.models';
import { Collection } from '../../../core/shared/collection.model';
@@ -18,6 +17,7 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
import { SearchService } from '../../../core/shared/search/search.service';
import { PaginatedSearchOptions } from '../../../shared/search/paginated-search-options.model';
import { SearchResult } from '../../../shared/search/search-result.model';
+import { getItemEditRoute } from '../../item-page-routing-paths';
@Component({
selector: 'ds-item-move',
@@ -116,7 +116,7 @@ export class ItemMoveComponent implements OnInit {
this.processing = true;
this.itemDataService.moveToCollection(this.itemId, this.selectedCollection).pipe(first()).subscribe(
(response: RestResponse) => {
- this.router.navigate([getItemEditPath(this.itemId)]);
+ this.router.navigate([getItemEditRoute(this.itemId)]);
if (response.isSuccessful) {
this.notificationsService.success(this.translateService.get('item.edit.move.success'));
} else {
diff --git a/src/app/+item-page/edit-item-page/item-status/item-status.component.ts b/src/app/+item-page/edit-item-page/item-status/item-status.component.ts
index 1be13e3a7a..2696c90353 100644
--- a/src/app/+item-page/edit-item-page/item-status/item-status.component.ts
+++ b/src/app/+item-page/edit-item-page/item-status/item-status.component.ts
@@ -6,7 +6,7 @@ import { ItemOperation } from '../item-operation/itemOperation.model';
import { first, map } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
-import { getItemEditPath, getItemPageRoute } from '../../item-page-routing.module';
+import { getItemEditRoute, getItemPageRoute } from '../../item-page-routing-paths';
@Component({
selector: 'ds-item-status',
@@ -99,7 +99,7 @@ export class ItemStatusComponent implements OnInit {
* @returns {string} url
*/
getCurrentUrl(item: Item): string {
- return getItemEditPath(item.id);
+ return getItemEditRoute(item.id);
}
}
diff --git a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts
index a6e64250cb..e6c5cfefc0 100644
--- a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts
+++ b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts
@@ -15,12 +15,12 @@ import { RemoteData } from '../../../core/data/remote-data';
import { AbstractSimpleItemActionComponent } from './abstract-simple-item-action.component';
import { By } from '@angular/platform-browser';
import { of as observableOf } from 'rxjs';
-import { getItemEditPath } from '../../item-page-routing.module';
import { RestResponse } from '../../../core/cache/response.models';
import {
createSuccessfulRemoteDataObject,
createSuccessfulRemoteDataObject$
} from '../../../shared/remote-data.utils';
+import { getItemEditRoute } from '../../item-page-routing-paths';
/**
* Test component that implements the AbstractSimpleItemActionComponent used to test the
@@ -136,14 +136,14 @@ describe('AbstractSimpleItemActionComponent', () => {
comp.processRestResponse(successfulRestResponse);
expect(notificationsServiceStub.success).toHaveBeenCalled();
- expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditPath(mockItem.id)]);
+ expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem.id)]);
});
it('should process a RestResponse to navigate and display success notification', () => {
comp.processRestResponse(failRestResponse);
expect(notificationsServiceStub.error).toHaveBeenCalled();
- expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditPath(mockItem.id)]);
+ expect(routerStub.navigate).toHaveBeenCalledWith([getItemEditRoute(mockItem.id)]);
});
});
diff --git a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts
index 7773dbb573..ca347e1298 100644
--- a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts
+++ b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts
@@ -9,8 +9,8 @@ import {Observable} from 'rxjs';
import {getSucceededRemoteData} from '../../../core/shared/operators';
import {first, map} from 'rxjs/operators';
import {findSuccessfulAccordingTo} from '../edit-item-operators';
-import {getItemEditPath} from '../../item-page-routing.module';
import { RestResponse } from '../../../core/cache/response.models';
+import { getItemEditRoute } from '../../item-page-routing-paths';
/**
* Component to render and handle simple item edit actions such as withdrawal and reinstatement.
@@ -73,11 +73,11 @@ export class AbstractSimpleItemActionComponent implements OnInit {
this.itemDataService.findById(this.item.id).pipe(
findSuccessfulAccordingTo(this.predicate)).subscribe(() => {
this.notificationsService.success(this.translateService.get('item.edit.' + this.messageKey + '.success'));
- this.router.navigate([getItemEditPath(this.item.id)]);
+ this.router.navigate([getItemEditRoute(this.item.id)]);
});
} else {
this.notificationsService.error(this.translateService.get('item.edit.' + this.messageKey + '.error'));
- this.router.navigate([getItemEditPath(this.item.id)]);
+ this.router.navigate([getItemEditRoute(this.item.id)]);
}
}
diff --git a/src/app/+item-page/item-page-routing-paths.ts b/src/app/+item-page/item-page-routing-paths.ts
new file mode 100644
index 0000000000..bb8f052eda
--- /dev/null
+++ b/src/app/+item-page/item-page-routing-paths.ts
@@ -0,0 +1,18 @@
+import { URLCombiner } from '../core/url-combiner/url-combiner';
+
+export const ITEM_MODULE_PATH = 'items';
+
+export function getItemModuleRoute() {
+ return `/${ITEM_MODULE_PATH}`;
+}
+
+export function getItemPageRoute(itemId: string) {
+ return new URLCombiner(getItemModuleRoute(), itemId).toString();
+}
+
+export function getItemEditRoute(id: string) {
+ return new URLCombiner(getItemModuleRoute(), id, ITEM_EDIT_PATH).toString()
+}
+
+export const ITEM_EDIT_PATH = 'edit';
+export const UPLOAD_BITSTREAM_PATH = 'bitstreams/new';
diff --git a/src/app/+item-page/item-page-routing.module.ts b/src/app/+item-page/item-page-routing.module.ts
index 52faf96236..088aab326d 100644
--- a/src/app/+item-page/item-page-routing.module.ts
+++ b/src/app/+item-page/item-page-routing.module.ts
@@ -4,24 +4,12 @@ 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 { URLCombiner } from '../core/url-combiner/url-combiner';
-import { getItemModulePath } from '../app-routing.module';
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
import { ItemBreadcrumbResolver } from '../core/breadcrumbs/item-breadcrumb.resolver';
import { DSOBreadcrumbsService } from '../core/breadcrumbs/dso-breadcrumbs.service';
import { LinkService } from '../core/cache/builders/link.service';
import { UploadBitstreamComponent } from './bitstreams/upload/upload-bitstream.component';
-
-export function getItemPageRoute(itemId: string) {
- return new URLCombiner(getItemModulePath(), itemId).toString();
-}
-
-export function getItemEditPath(id: string) {
- return new URLCombiner(getItemModulePath(), id, ITEM_EDIT_PATH).toString()
-}
-
-const ITEM_EDIT_PATH = 'edit';
-const UPLOAD_BITSTREAM_PATH = 'bitstreams/new';
+import { UPLOAD_BITSTREAM_PATH, ITEM_EDIT_PATH } from './item-page-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts
new file mode 100644
index 0000000000..7d09a6915e
--- /dev/null
+++ b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing-paths.ts
@@ -0,0 +1,22 @@
+import { URLCombiner } from '../core/url-combiner/url-combiner';
+import { getWorkflowItemModuleRoute } from '../app-routing-paths';
+
+export function getWorkflowItemPageRoute(wfiId: string) {
+ return new URLCombiner(getWorkflowItemModuleRoute(), wfiId).toString();
+}
+
+export function getWorkflowItemEditRoute(wfiId: string) {
+ return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_EDIT_PATH).toString()
+}
+
+export function getWorkflowItemDeleteRoute(wfiId: string) {
+ return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_DELETE_PATH).toString()
+}
+
+export function getWorkflowItemSendBackRoute(wfiId: string) {
+ return new URLCombiner(getWorkflowItemModuleRoute(), wfiId, WORKFLOW_ITEM_SEND_BACK_PATH).toString()
+}
+
+export const WORKFLOW_ITEM_EDIT_PATH = 'edit';
+export const WORKFLOW_ITEM_DELETE_PATH = 'delete';
+export const WORKFLOW_ITEM_SEND_BACK_PATH = 'sendback';
diff --git a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts
index e9989bf947..27b7fe1199 100644
--- a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts
+++ b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts
@@ -3,31 +3,14 @@ import { RouterModule } from '@angular/router';
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
import { SubmissionEditComponent } from '../submission/edit/submission-edit.component';
-import { URLCombiner } from '../core/url-combiner/url-combiner';
-import { getWorkflowItemModulePath } from '../app-routing.module';
import { WorkflowItemDeleteComponent } from './workflow-item-delete/workflow-item-delete.component';
import { WorkflowItemPageResolver } from './workflow-item-page.resolver';
import { WorkflowItemSendBackComponent } from './workflow-item-send-back/workflow-item-send-back.component';
-
-export function getWorkflowItemPageRoute(wfiId: string) {
- return new URLCombiner(getWorkflowItemModulePath(), wfiId).toString();
-}
-
-export function getWorkflowItemEditPath(wfiId: string) {
- return new URLCombiner(getWorkflowItemModulePath(), wfiId, WORKFLOW_ITEM_EDIT_PATH).toString()
-}
-
-export function getWorkflowItemDeletePath(wfiId: string) {
- return new URLCombiner(getWorkflowItemModulePath(), wfiId, WORKFLOW_ITEM_DELETE_PATH).toString()
-}
-
-export function getWorkflowItemSendBackPath(wfiId: string) {
- return new URLCombiner(getWorkflowItemModulePath(), wfiId, WORKFLOW_ITEM_SEND_BACK_PATH).toString()
-}
-
-const WORKFLOW_ITEM_EDIT_PATH = 'edit';
-const WORKFLOW_ITEM_DELETE_PATH = 'delete';
-const WORKFLOW_ITEM_SEND_BACK_PATH = 'sendback';
+import {
+ WORKFLOW_ITEM_SEND_BACK_PATH,
+ WORKFLOW_ITEM_DELETE_PATH,
+ WORKFLOW_ITEM_EDIT_PATH
+} from './workflowitems-edit-page-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/app-routing-paths.ts b/src/app/app-routing-paths.ts
new file mode 100644
index 0000000000..5d529edeb7
--- /dev/null
+++ b/src/app/app-routing-paths.ts
@@ -0,0 +1,62 @@
+import { DSpaceObject } from './core/shared/dspace-object.model';
+import { Community } from './core/shared/community.model';
+import { Collection } from './core/shared/collection.model';
+import { Item } from './core/shared/item.model';
+import { getCommunityPageRoute } from './+community-page/community-page-routing-paths';
+import { getCollectionPageRoute } from './+collection-page/collection-page-routing-paths';
+import { getItemPageRoute } from './+item-page/item-page-routing-paths';
+
+export const BITSTREAM_MODULE_PATH = 'bitstreams';
+
+export function getBitstreamModuleRoute() {
+ return `/${BITSTREAM_MODULE_PATH}`;
+}
+
+export const ADMIN_MODULE_PATH = 'admin';
+
+export function getAdminModuleRoute() {
+ return `/${ADMIN_MODULE_PATH}`;
+}
+
+export const PROFILE_MODULE_PATH = 'profile';
+
+export function getProfileModuleRoute() {
+ return `/${PROFILE_MODULE_PATH}`;
+}
+
+export const REGISTER_PATH = 'register';
+
+export function getRegisterRoute() {
+ return `/${REGISTER_PATH}`;
+
+}
+
+export const FORGOT_PASSWORD_PATH = 'forgot';
+
+export function getForgotPasswordRoute() {
+ return `/${FORGOT_PASSWORD_PATH}`;
+
+}
+
+export const WORKFLOW_ITEM_MODULE_PATH = 'workflowitems';
+
+export function getWorkflowItemModuleRoute() {
+ return `/${WORKFLOW_ITEM_MODULE_PATH}`;
+}
+
+export function getDSORoute(dso: DSpaceObject): string {
+ switch ((dso as any).type) {
+ case Community.type.value:
+ return getCommunityPageRoute(dso.uuid);
+ case Collection.type.value:
+ return getCollectionPageRoute(dso.uuid);
+ case Item.type.value:
+ return getItemPageRoute(dso.uuid);
+ }
+}
+
+export const UNAUTHORIZED_PATH = 'unauthorized';
+
+export function getUnauthorizedRoute() {
+ return `/${UNAUTHORIZED_PATH}`;
+}
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index c8ee6ecd8b..ae413116a8 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -3,86 +3,20 @@ import { RouterModule } from '@angular/router';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
import { AuthenticatedGuard } from './core/auth/authenticated.guard';
-import { DSpaceObject } from './core/shared/dspace-object.model';
-import { Community } from './core/shared/community.model';
-import { getCommunityPageRoute } from './+community-page/community-page-routing.module';
-import { Collection } from './core/shared/collection.model';
-import { Item } from './core/shared/item.model';
-import { getItemPageRoute } from './+item-page/item-page-routing.module';
-import { getCollectionPageRoute } from './+collection-page/collection-page-routing.module';
import { SiteAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
import { UnauthorizedComponent } from './unauthorized/unauthorized.component';
-
-const ITEM_MODULE_PATH = 'items';
-
-export function getItemModulePath() {
- return `/${ITEM_MODULE_PATH}`;
-}
-
-const COLLECTION_MODULE_PATH = 'collections';
-
-export function getCollectionModulePath() {
- return `/${COLLECTION_MODULE_PATH}`;
-}
-
-const COMMUNITY_MODULE_PATH = 'communities';
-
-export function getCommunityModulePath() {
- return `/${COMMUNITY_MODULE_PATH}`;
-}
-const BITSTREAM_MODULE_PATH = 'bitstreams';
-export function getBitstreamModulePath() {
- return `/${BITSTREAM_MODULE_PATH}`;
-}
-
-export const ADMIN_MODULE_PATH = 'admin';
-
-export function getAdminModulePath() {
- return `/${ADMIN_MODULE_PATH}`;
-}
-
-const PROFILE_MODULE_PATH = 'profile';
-
-export function getProfileModulePath() {
- return `/${PROFILE_MODULE_PATH}`;
-}
-
-const REGISTER_PATH = 'register';
-
-export function getRegisterPath() {
- return `/${REGISTER_PATH}`;
-
-}
-
-const FORGOT_PASSWORD_PATH = 'forgot';
-
-export function getForgotPasswordPath() {
- return `/${FORGOT_PASSWORD_PATH}`;
-
-}
-
-const WORKFLOW_ITEM_MODULE_PATH = 'workflowitems';
-
-export function getWorkflowItemModulePath() {
- return `/${WORKFLOW_ITEM_MODULE_PATH}`;
-}
-
-export function getDSOPath(dso: DSpaceObject): string {
- switch ((dso as any).type) {
- case Community.type.value:
- return getCommunityPageRoute(dso.uuid);
- case Collection.type.value:
- return getCollectionPageRoute(dso.uuid);
- case Item.type.value:
- return getItemPageRoute(dso.uuid);
- }
-}
-
-const UNAUTHORIZED_PATH = 'unauthorized';
-
-export function getUnauthorizedPath() {
- return `/${UNAUTHORIZED_PATH}`;
-}
+import {
+ UNAUTHORIZED_PATH,
+ WORKFLOW_ITEM_MODULE_PATH,
+ FORGOT_PASSWORD_PATH,
+ REGISTER_PATH,
+ PROFILE_MODULE_PATH,
+ ADMIN_MODULE_PATH,
+ BITSTREAM_MODULE_PATH
+} from './app-routing-paths';
+import { COLLECTION_MODULE_PATH } from './+collection-page/collection-page-routing-paths';
+import { COMMUNITY_MODULE_PATH } from './+community-page/community-page-routing-paths';
+import { ITEM_MODULE_PATH } from './+item-page/item-page-routing-paths';
@NgModule({
imports: [
diff --git a/src/app/community-list-page/community-list-service.ts b/src/app/community-list-page/community-list-service.ts
index a5c3506e3d..4699e6faaa 100644
--- a/src/app/community-list-page/community-list-service.ts
+++ b/src/app/community-list-page/community-list-service.ts
@@ -13,11 +13,11 @@ import { PageInfo } from '../core/shared/page-info.model';
import { hasValue, isNotEmpty } from '../shared/empty.util';
import { RemoteData } from '../core/data/remote-data';
import { PaginatedList } from '../core/data/paginated-list';
-import { getCommunityPageRoute } from '../+community-page/community-page-routing.module';
-import { getCollectionPageRoute } from '../+collection-page/collection-page-routing.module';
import { CollectionDataService } from '../core/data/collection-data.service';
import { CommunityListSaveAction } from './community-list.actions';
import { CommunityListState } from './community-list.reducer';
+import { getCommunityPageRoute } from '../+community-page/community-page-routing-paths';
+import { getCollectionPageRoute } from '../+collection-page/collection-page-routing-paths';
/**
* Each node in the tree is represented by a flatNode which contains info about the node itself and its position and
diff --git a/src/app/core/breadcrumbs/dso-breadcrumbs.service.spec.ts b/src/app/core/breadcrumbs/dso-breadcrumbs.service.spec.ts
index 5c31e40362..4bd7560e02 100644
--- a/src/app/core/breadcrumbs/dso-breadcrumbs.service.spec.ts
+++ b/src/app/core/breadcrumbs/dso-breadcrumbs.service.spec.ts
@@ -10,8 +10,8 @@ import { Community } from '../shared/community.model';
import { Collection } from '../shared/collection.model';
import { Breadcrumb } from '../../breadcrumbs/breadcrumb/breadcrumb.model';
import { getTestScheduler } from 'jasmine-marbles';
-import { getDSOPath } from '../../app-routing.module';
import { DSONameService } from './dso-name.service';
+import { getDSORoute } from '../../app-routing-paths';
describe('DSOBreadcrumbsService', () => {
let service: DSOBreadcrumbsService;
@@ -108,9 +108,9 @@ describe('DSOBreadcrumbsService', () => {
it('should return the breadcrumbs based on an Item', () => {
const breadcrumbs = service.getBreadcrumbs(testItem, testItem._links.self);
const expectedCrumbs = [
- new Breadcrumb(getName(testCommunity), getDSOPath(testCommunity)),
- new Breadcrumb(getName(testCollection), getDSOPath(testCollection)),
- new Breadcrumb(getName(testItem), getDSOPath(testItem)),
+ new Breadcrumb(getName(testCommunity), getDSORoute(testCommunity)),
+ new Breadcrumb(getName(testCollection), getDSORoute(testCollection)),
+ new Breadcrumb(getName(testItem), getDSORoute(testItem)),
];
getTestScheduler().expectObservable(breadcrumbs).toBe('(a|)', { a: expectedCrumbs });
})
diff --git a/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts b/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts
index 003c11bf83..fc1bb9e770 100644
--- a/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts
+++ b/src/app/core/breadcrumbs/dso-breadcrumbs.service.ts
@@ -7,10 +7,10 @@ import { LinkService } from '../cache/builders/link.service';
import { DSpaceObject } from '../shared/dspace-object.model';
import { followLink } from '../../shared/utils/follow-link-config.model';
import { find, map, switchMap } from 'rxjs/operators';
-import { getDSOPath } from '../../app-routing.module';
import { RemoteData } from '../data/remote-data';
import { hasValue } from '../../shared/empty.util';
import { Injectable } from '@angular/core';
+import { getDSORoute } from '../../app-routing-paths';
/**
* Service to calculate DSpaceObject breadcrumbs for a single part of the route
@@ -41,7 +41,7 @@ export class DSOBreadcrumbsService implements BreadcrumbsService) => {
if (hasValue(parentRD.payload)) {
const parent = parentRD.payload;
- return this.getBreadcrumbs(parent, getDSOPath(parent))
+ return this.getBreadcrumbs(parent, getDSORoute(parent))
}
return observableOf([]);
diff --git a/src/app/core/integration/models/authority.value.ts b/src/app/core/integration/models/authority.value.ts
index 4e0183603b..4af10034b2 100644
--- a/src/app/core/integration/models/authority.value.ts
+++ b/src/app/core/integration/models/authority.value.ts
@@ -1,12 +1,12 @@
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
import { isNotEmpty } from '../../../shared/empty.util';
-import { PLACEHOLDER_PARENT_METADATA } from '../../../shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { OtherInformation } from '../../../shared/form/builder/models/form-field-metadata-value.model';
import { typedObject } from '../../cache/builders/build-decorators';
import { HALLink } from '../../shared/hal-link.model';
import { MetadataValueInterface } from '../../shared/metadata.models';
import { AUTHORITY_VALUE } from './authority.resource-type';
import { IntegrationModel } from './integration.model';
+import { PLACEHOLDER_PARENT_METADATA } from '../../../shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants';
/**
* Class representing an authority object
diff --git a/src/app/core/shared/operators.ts b/src/app/core/shared/operators.ts
index 7516cc6532..b8120d4765 100644
--- a/src/app/core/shared/operators.ts
+++ b/src/app/core/shared/operators.ts
@@ -11,7 +11,7 @@ import { RequestEntry } from '../data/request.reducer';
import { RequestService } from '../data/request.service';
import { BrowseDefinition } from './browse-definition.model';
import { DSpaceObject } from './dspace-object.model';
-import { getUnauthorizedPath } from '../../app-routing.module';
+import { getUnauthorizedRoute } from '../../app-routing-paths';
/**
* This file contains custom RxJS operators that can be used in multiple places
@@ -189,7 +189,7 @@ export const returnUnauthorizedUrlTreeOnFalse = (router: Router) =>
(source: Observable): Observable =>
source.pipe(
map((authorized: boolean) => {
- return authorized ? authorized : router.parseUrl(getUnauthorizedPath())
+ return authorized ? authorized : router.parseUrl(getUnauthorizedRoute())
}));
export const getFinishedRemoteData = () =>
diff --git a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts
index 81d9b3d555..1dbcec8eb6 100644
--- a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts
+++ b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts
@@ -7,8 +7,8 @@ import { EPerson } from '../../../core/eperson/models/eperson.model';
import { AppState } from '../../../app.reducer';
import { isAuthenticationLoading } from '../../../core/auth/selectors';
import { MYDSPACE_ROUTE } from '../../../+my-dspace-page/my-dspace-page.component';
-import { getProfileModulePath } from '../../../app-routing.module';
import { AuthService } from '../../../core/auth/auth.service';
+import { getProfileModuleRoute } from '../../../app-routing-paths';
/**
* This component represents the user nav menu.
@@ -41,7 +41,7 @@ export class UserMenuComponent implements OnInit {
/**
* The profile page route
*/
- public profileRoute = getProfileModulePath();
+ public profileRoute = getProfileModuleRoute();
constructor(private store: Store,
private authService: AuthService) {
diff --git a/src/app/shared/chips/models/chips-item.model.ts b/src/app/shared/chips/models/chips-item.model.ts
index d60d29e41e..6bc513022c 100644
--- a/src/app/shared/chips/models/chips-item.model.ts
+++ b/src/app/shared/chips/models/chips-item.model.ts
@@ -2,7 +2,7 @@ import { isObject, uniqueId } from 'lodash';
import { hasValue, isNotEmpty } from '../../empty.util';
import { FormFieldMetadataValueObject } from '../../form/builder/models/form-field-metadata-value.model';
import { ConfidenceType } from '../../../core/integration/models/confidence-type';
-import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
+import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants';
export interface ChipsItemIcon {
metadata: string;
diff --git a/src/app/shared/chips/models/chips.model.ts b/src/app/shared/chips/models/chips.model.ts
index de694bdcfd..936e13a3cd 100644
--- a/src/app/shared/chips/models/chips.model.ts
+++ b/src/app/shared/chips/models/chips.model.ts
@@ -2,10 +2,10 @@ import { findIndex, isEqual, isObject } from 'lodash';
import { BehaviorSubject } from 'rxjs';
import { ChipsItem, ChipsItemIcon } from './chips-item.model';
import { hasValue, isNotEmpty } from '../../empty.util';
-import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { MetadataIconConfig } from '../../../../config/submission-config.interface';
import { FormFieldMetadataValueObject } from '../../form/builder/models/form-field-metadata-value.model';
import { AuthorityValue } from '../../../core/integration/models/authority.value';
+import { PLACEHOLDER_PARENT_METADATA } from '../../form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants';
export class Chips {
chipsItems: BehaviorSubject;
diff --git a/src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts b/src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts
index 986d616c7d..8ce986832b 100644
--- a/src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts
+++ b/src/app/shared/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts
@@ -2,7 +2,6 @@ import { Component, Input, OnInit } from '@angular/core';
import { Group } from '../../../../core/eperson/models/group.model';
import { Community } from '../../../../core/shared/community.model';
import { Observable } from 'rxjs';
-import { getGroupEditPath } from '../../../../+admin/admin-access-control/admin-access-control-routing.module';
import { GroupDataService } from '../../../../core/eperson/group-data.service';
import { Collection } from '../../../../core/shared/collection.model';
import { filter, map } from 'rxjs/operators';
@@ -10,6 +9,7 @@ import { getRemoteDataPayload, getSucceededRemoteData } from '../../../../core/s
import { RequestService } from '../../../../core/data/request.service';
import { RemoteData } from '../../../../core/data/remote-data';
import { HALLink } from '../../../../core/shared/hal-link.model';
+import { getGroupEditRoute } from '../../../../+admin/admin-access-control/admin-access-control-routing-paths';
/**
* Component for managing a community or collection role.
@@ -71,7 +71,7 @@ export class ComcolRoleComponent implements OnInit {
*/
get editGroupLink$(): Observable {
return this.group$.pipe(
- map((group) => getGroupEditPath(group.id)),
+ map((group) => getGroupEditRoute(group.id)),
);
}
diff --git a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts
index 477af5c1e4..0dab8a796f 100644
--- a/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts
+++ b/src/app/shared/comcol-page-browse-by/comcol-page-browse-by.component.ts
@@ -1,11 +1,11 @@
import { Component, Inject, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs/internal/Observable';
import { map } from 'rxjs/operators';
-import { getCollectionPageRoute } from '../../+collection-page/collection-page-routing.module';
-import { getCommunityPageRoute } from '../../+community-page/community-page-routing.module';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { BrowseByTypeConfig } from '../../../config/browse-by-type-config.interface';
import { environment } from '../../../environments/environment';
+import { getCommunityPageRoute } from '../../+community-page/community-page-routing-paths';
+import { getCollectionPageRoute } from '../../+collection-page/collection-page-routing-paths';
export interface ComColPageNavOption {
id: string;
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts
index df62534593..132379efc7 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts
@@ -6,7 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { RemoteData } from '../../../../core/data/remote-data';
import { RouterStub } from '../../../testing/router.stub';
-import * as collectionRouter from '../../../../+collection-page/collection-page-routing.module';
+import * as collectionRouterPaths from '../../../../+collection-page/collection-page-routing-paths';
import { Community } from '../../../../core/shared/community.model';
import { CreateCollectionParentSelectorComponent } from './create-collection-parent-selector.component';
import { MetadataValue } from '../../../../core/shared/metadata.models';
@@ -59,7 +59,7 @@ describe('CreateCollectionParentSelectorComponent', () => {
}));
beforeEach(() => {
- spyOnProperty(collectionRouter, 'getCollectionCreatePath').and.callFake(() => {
+ spyOnProperty(collectionRouterPaths, 'getCollectionCreateRoute').and.callFake(() => {
return () => createPath;
});
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts
index 0533addb01..e0e0921942 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts
@@ -3,11 +3,11 @@ import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.model';
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import {
- COLLECTION_PARENT_PARAMETER,
- getCollectionCreatePath
-} from '../../../../+collection-page/collection-page-routing.module';
import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component';
+import {
+ getCollectionCreateRoute,
+ COLLECTION_PARENT_PARAMETER
+} from '../../../../+collection-page/collection-page-routing-paths';
/**
* Component to wrap a list of existing communities inside a modal
@@ -36,6 +36,6 @@ export class CreateCollectionParentSelectorComponent extends DSOSelectorModalWra
[COLLECTION_PARENT_PARAMETER]: dso.uuid,
}
};
- this.router.navigate([getCollectionCreatePath()], navigationExtras);
+ this.router.navigate([getCollectionCreateRoute()], navigationExtras);
}
}
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts
index 9c6185199c..15cf5fe367 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts
@@ -6,7 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { RemoteData } from '../../../../core/data/remote-data';
import { RouterStub } from '../../../testing/router.stub';
-import * as communityRouter from '../../../../+community-page/community-page-routing.module';
+import * as communityRouterPaths from '../../../../+community-page/community-page-routing-paths';
import { Community } from '../../../../core/shared/community.model';
import { CreateCommunityParentSelectorComponent } from './create-community-parent-selector.component';
import { MetadataValue } from '../../../../core/shared/metadata.models';
@@ -53,7 +53,7 @@ describe('CreateCommunityParentSelectorComponent', () => {
}));
beforeEach(() => {
- spyOnProperty(communityRouter, 'getCommunityCreatePath').and.callFake(() => {
+ spyOnProperty(communityRouterPaths, 'getCommunityCreateRoute').and.callFake(() => {
return () => createPath;
});
diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
index 914dc7582f..7d67bb6d1f 100644
--- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts
@@ -4,14 +4,14 @@ import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.mod
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { hasValue } from '../../../empty.util';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import {
- COMMUNITY_PARENT_PARAMETER,
- getCommunityCreatePath
-} from '../../../../+community-page/community-page-routing.module';
import {
DSOSelectorModalWrapperComponent,
SelectorActionType
} from '../dso-selector-modal-wrapper.component';
+import {
+ getCommunityCreateRoute,
+ COMMUNITY_PARENT_PARAMETER
+} from '../../../../+community-page/community-page-routing-paths';
/**
* Component to wrap a button - for top communities -
@@ -46,6 +46,6 @@ export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrap
}
};
}
- this.router.navigate([getCommunityCreatePath()], navigationExtras);
+ this.router.navigate([getCommunityCreateRoute()], navigationExtras);
}
}
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts
index 21ff5e846d..81040e558d 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts
@@ -6,7 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { RemoteData } from '../../../../core/data/remote-data';
import { RouterStub } from '../../../testing/router.stub';
-import * as collectionRouter from '../../../../+collection-page/collection-page-routing.module';
+import * as collectionRouterPaths from '../../../../+collection-page/collection-page-routing-paths';
import { EditCollectionSelectorComponent } from './edit-collection-selector.component';
import { Collection } from '../../../../core/shared/collection.model';
import { MetadataValue } from '../../../../core/shared/metadata.models';
@@ -53,7 +53,7 @@ describe('EditCollectionSelectorComponent', () => {
}));
beforeEach(() => {
- spyOnProperty(collectionRouter, 'getCollectionEditPath').and.callFake(() => {
+ spyOnProperty(collectionRouterPaths, 'getCollectionEditRoute').and.callFake(() => {
return () => editPath;
});
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts
index 79660b9589..8cd38417d8 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts
@@ -3,11 +3,11 @@ import { ActivatedRoute, Router } from '@angular/router';
import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.model';
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { getCollectionEditPath } from '../../../../+collection-page/collection-page-routing.module';
import {
DSOSelectorModalWrapperComponent,
SelectorActionType
} from '../dso-selector-modal-wrapper.component';
+import { getCollectionEditRoute } from '../../../../+collection-page/collection-page-routing-paths';
/**
* Component to wrap a list of existing collections inside a modal
@@ -31,6 +31,6 @@ export class EditCollectionSelectorComponent extends DSOSelectorModalWrapperComp
* Navigate to the collection edit page
*/
navigate(dso: DSpaceObject) {
- this.router.navigate([getCollectionEditPath(dso.uuid)]);
+ this.router.navigate([getCollectionEditRoute(dso.uuid)]);
}
}
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts
index b37fa23024..260d15725e 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts
@@ -6,7 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ActivatedRoute, Router } from '@angular/router';
import { RemoteData } from '../../../../core/data/remote-data';
import { RouterStub } from '../../../testing/router.stub';
-import * as communityRouter from '../../../../+community-page/community-page-routing.module';
+import * as communityRouterPaths from '../../../../+community-page/community-page-routing-paths';
import { EditCommunitySelectorComponent } from './edit-community-selector.component';
import { Community } from '../../../../core/shared/community.model';
import { MetadataValue } from '../../../../core/shared/metadata.models';
@@ -53,7 +53,7 @@ describe('EditCommunitySelectorComponent', () => {
}));
beforeEach(() => {
- spyOnProperty(communityRouter, 'getCommunityEditPath').and.callFake(() => {
+ spyOnProperty(communityRouterPaths, 'getCommunityEditRoute').and.callFake(() => {
return () => editPath;
});
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts
index 6b9efc1ff4..c2d5324dfc 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts
@@ -3,11 +3,11 @@ import { ActivatedRoute, Router } from '@angular/router';
import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.model';
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { getCommunityEditPath } from '../../../../+community-page/community-page-routing.module';
import {
DSOSelectorModalWrapperComponent,
SelectorActionType
} from '../dso-selector-modal-wrapper.component';
+import { getCommunityEditRoute } from '../../../../+community-page/community-page-routing-paths';
/**
* Component to wrap a list of existing communities inside a modal
@@ -32,6 +32,6 @@ export class EditCommunitySelectorComponent extends DSOSelectorModalWrapperCompo
* Navigate to the community edit page
*/
navigate(dso: DSpaceObject) {
- this.router.navigate([getCommunityEditPath(dso.uuid)]);
+ this.router.navigate([getCommunityEditRoute(dso.uuid)]);
}
}
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts
index dbd5a0a575..67be305ccd 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts
@@ -6,7 +6,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { EditItemSelectorComponent } from './edit-item-selector.component';
import { Item } from '../../../../core/shared/item.model';
import { RouterStub } from '../../../testing/router.stub';
-import * as itemRouter from '../../../../+item-page/item-page-routing.module';
+import * as itemRouterPaths from '../../../../+item-page/item-page-routing-paths';
import { MetadataValue } from '../../../../core/shared/metadata.models';
import { createSuccessfulRemoteDataObject } from '../../../remote-data.utils';
@@ -51,7 +51,7 @@ describe('EditItemSelectorComponent', () => {
}));
beforeEach(() => {
- spyOnProperty(itemRouter, 'getItemEditPath').and.callFake(() => {
+ spyOnProperty(itemRouterPaths, 'getItemEditRoute').and.callFake(() => {
return () => editPath;
});
diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts
index dae36d3017..71c5fba2e9 100644
--- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts
+++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts
@@ -3,8 +3,8 @@ import { ActivatedRoute, Router } from '@angular/router';
import { DSpaceObjectType } from '../../../../core/shared/dspace-object-type.model';
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
-import { getItemEditPath } from '../../../../+item-page/item-page-routing.module';
import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component';
+import { getItemEditRoute } from '../../../../+item-page/item-page-routing-paths';
/**
* Component to wrap a list of existing items inside a modal
@@ -28,6 +28,6 @@ export class EditItemSelectorComponent extends DSOSelectorModalWrapperComponent
* Navigate to the item edit page
*/
navigate(dso: DSpaceObject) {
- this.router.navigate([getItemEditPath(dso.uuid)]);
+ this.router.navigate([getItemEditRoute(dso.uuid)]);
}
}
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants.ts
new file mode 100644
index 0000000000..d3cdad290f
--- /dev/null
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-constants.ts
@@ -0,0 +1,2 @@
+export const DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP = 'RELATION';
+export const PLACEHOLDER_PARENT_METADATA = '#PLACEHOLDER_PARENT_METADATA_VALUE#';
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
index 0064c2e093..f03050155b 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
@@ -76,7 +76,6 @@ import { DsDynamicLookupComponent } from './models/lookup/dynamic-lookup.compone
import { DsDynamicFormGroupComponent } from './models/form-group/dynamic-form-group.component';
import { DsDynamicFormArrayComponent } from './models/array-group/dynamic-form-array.component';
import { DsDynamicRelationGroupComponent } from './models/relation-group/dynamic-relation-group.components';
-import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './models/relation-group/dynamic-relation-group.model';
import { DsDatePickerInlineComponent } from './models/date-picker-inline/dynamic-date-picker-inline.component';
import { DYNAMIC_FORM_CONTROL_TYPE_CUSTOM_SWITCH } from './models/custom-switch/custom-switch.model';
import { CustomSwitchComponent } from './models/custom-switch/custom-switch.component';
@@ -110,6 +109,7 @@ import { followLink } from '../../../utils/follow-link-config.model';
import { paginatedRelationsToItems } from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
import { RelationshipOptions } from '../models/relationship-options.model';
import { FormBuilderService } from '../form-builder.service';
+import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-constants';
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type | null {
switch (model.type) {
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts
index 11085a1bc3..e7a519e2b4 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts
@@ -23,7 +23,7 @@ import {
} from '@ng-dynamic-forms/core';
import { isEqual, isObject } from 'lodash';
-import { DynamicRelationGroupModel, PLACEHOLDER_PARENT_METADATA } from './dynamic-relation-group.model';
+import { DynamicRelationGroupModel} from './dynamic-relation-group.model';
import { FormBuilderService } from '../../../form-builder.service';
import { SubmissionFormsModel } from '../../../../../../core/config/models/config-submission-forms.model';
import { FormService } from '../../../../form.service';
@@ -39,6 +39,7 @@ import { IntegrationData } from '../../../../../../core/integration/integration-
import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model';
import { AuthorityValue } from '../../../../../../core/integration/models/authority.value';
import { environment } from '../../../../../../../environments/environment';
+import { PLACEHOLDER_PARENT_METADATA } from '../../ds-dynamic-form-constants';
@Component({
selector: 'ds-dynamic-relation-group',
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts
index c1f76f0431..afa03a8e4e 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts
@@ -2,9 +2,7 @@ import { DynamicFormControlLayout, serializable } from '@ng-dynamic-forms/core';
import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-input.model';
import { isEmpty, isNull } from '../../../../../empty.util';
import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model';
-
-export const DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP = 'RELATION';
-export const PLACEHOLDER_PARENT_METADATA = '#PLACEHOLDER_PARENT_METADATA_VALUE#';
+import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from '../../ds-dynamic-form-constants';
/**
* Dynamic Group Model configuration interface
diff --git a/src/app/shared/form/builder/form-builder.service.ts b/src/app/shared/form/builder/form-builder.service.ts
index 1ca0a2748c..8703a3af51 100644
--- a/src/app/shared/form/builder/form-builder.service.ts
+++ b/src/app/shared/form/builder/form-builder.service.ts
@@ -20,11 +20,12 @@ import { DynamicQualdropModel } from './ds-dynamic-form-ui/models/ds-dynamic-qua
import { SubmissionFormsModel } from '../../../core/config/models/config-submission-forms.model';
import { DYNAMIC_FORM_CONTROL_TYPE_TAG } from './ds-dynamic-form-ui/models/tag/dynamic-tag.model';
import { RowParser } from './parsers/row-parser';
-import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP, DynamicRelationGroupModel } from './ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
+import { DynamicRelationGroupModel } from './ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
import { DsDynamicInputModel } from './ds-dynamic-form-ui/models/ds-dynamic-input.model';
import { FormFieldMetadataValueObject } from './models/form-field-metadata-value.model';
import { isNgbDateStruct } from '../../date.util';
+import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-ui/ds-dynamic-form-constants';
@Injectable()
export class FormBuilderService extends DynamicFormService {
diff --git a/src/app/shared/form/builder/models/form-field-metadata-value.model.ts b/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
index c0bdb338e3..b537cb54f7 100644
--- a/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
+++ b/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
@@ -1,7 +1,7 @@
import { hasValue, isEmpty, isNotEmpty, isNotNull } from '../../../empty.util';
import { ConfidenceType } from '../../../../core/integration/models/confidence-type';
-import { PLACEHOLDER_PARENT_METADATA } from '../ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { MetadataValueInterface, VIRTUAL_METADATA_PREFIX } from '../../../../core/shared/metadata.models';
+import { PLACEHOLDER_PARENT_METADATA } from '../ds-dynamic-form-ui/ds-dynamic-form-constants';
export interface OtherInformation {
[name: string]: string
diff --git a/src/app/shared/form/builder/parsers/relation-group-field-parser.ts b/src/app/shared/form/builder/parsers/relation-group-field-parser.ts
index 01699d9e78..cf55c9d665 100644
--- a/src/app/shared/form/builder/parsers/relation-group-field-parser.ts
+++ b/src/app/shared/form/builder/parsers/relation-group-field-parser.ts
@@ -5,10 +5,10 @@ import { FormFieldModel } from '../models/form-field.model';
import { isNotEmpty } from '../../../empty.util';
import {
DynamicRelationGroupModel,
- DynamicRelationGroupModelConfig,
- PLACEHOLDER_PARENT_METADATA
+ DynamicRelationGroupModelConfig
} from '../ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { FormRowModel } from '../../../../core/config/models/config-submission-form.model';
+import { PLACEHOLDER_PARENT_METADATA } from '../ds-dynamic-form-ui/ds-dynamic-form-constants';
export class RelationGroupFieldParser extends FieldParser {
diff --git a/src/app/shared/form/builder/parsers/row-parser.ts b/src/app/shared/form/builder/parsers/row-parser.ts
index 4938b9859e..ac20ca1b56 100644
--- a/src/app/shared/form/builder/parsers/row-parser.ts
+++ b/src/app/shared/form/builder/parsers/row-parser.ts
@@ -8,7 +8,6 @@ import { uniqueId } from 'lodash';
import { IntegrationSearchOptions } from '../../../../core/integration/models/integration-options.model';
import { isEmpty } from '../../../empty.util';
import { DynamicRowGroupModel } from '../ds-dynamic-form-ui/models/ds-dynamic-row-group-model';
-import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from '../ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
import { FormFieldModel } from '../models/form-field.model';
import {
CONFIG_DATA,
@@ -21,6 +20,7 @@ import { ParserFactory } from './parser-factory';
import { ParserOptions } from './parser-options';
import { ParserType } from './parser-type';
import { setLayout } from './parser.utils';
+import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from '../ds-dynamic-form-ui/ds-dynamic-form-constants';
export const ROW_ID_PREFIX = 'df-row-group-config-';
diff --git a/src/app/shared/item/item-versions/notice/item-versions-notice.component.ts b/src/app/shared/item/item-versions/notice/item-versions-notice.component.ts
index c2bd316137..1494e8c723 100644
--- a/src/app/shared/item/item-versions/notice/item-versions-notice.component.ts
+++ b/src/app/shared/item/item-versions/notice/item-versions-notice.component.ts
@@ -13,7 +13,7 @@ import { followLink } from '../../../utils/follow-link-config.model';
import { VersionHistoryDataService } from '../../../../core/data/version-history-data.service';
import { AlertType } from '../../../alert/aletr-type';
import { combineLatest as observableCombineLatest } from 'rxjs';
-import { getItemPageRoute } from '../../../../+item-page/item-page-routing.module';
+import { getItemPageRoute } from '../../../../+item-page/item-page-routing-paths';
@Component({
selector: 'ds-item-versions-notice',
diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html
index 5285bc65e4..aaf73e0e1b 100644
--- a/src/app/shared/log-in/log-in.component.html
+++ b/src/app/shared/log-in/log-in.component.html
@@ -8,6 +8,6 @@
- {{"login.form.new-user" | translate}}
- {{"login.form.forgot-password" | translate}}
+ {{"login.form.new-user" | translate}}
+ {{"login.form.forgot-password" | translate}}
diff --git a/src/app/shared/log-in/log-in.component.ts b/src/app/shared/log-in/log-in.component.ts
index 32e10fef45..3586e9c605 100644
--- a/src/app/shared/log-in/log-in.component.ts
+++ b/src/app/shared/log-in/log-in.component.ts
@@ -8,7 +8,7 @@ import { AuthMethod } from '../../core/auth/models/auth.method';
import { getAuthenticationMethods, isAuthenticated, isAuthenticationLoading } from '../../core/auth/selectors';
import { CoreState } from '../../core/core.reducers';
import { AuthService } from '../../core/auth/auth.service';
-import { getForgotPasswordPath, getRegisterPath } from '../../app-routing.module';
+import { getForgotPasswordRoute, getRegisterRoute } from '../../app-routing-paths';
/**
* /users/sign-in
@@ -83,11 +83,11 @@ export class LogInComponent implements OnInit, OnDestroy {
this.alive = false;
}
- getRegisterPath() {
- return getRegisterPath();
+ getRegisterRoute() {
+ return getRegisterRoute();
}
- getForgotPath() {
- return getForgotPasswordPath();
+ getForgotRoute() {
+ return getForgotPasswordRoute();
}
}
diff --git a/src/app/shared/resource-policies/create/resource-policy-create.component.ts b/src/app/shared/resource-policies/create/resource-policy-create.component.ts
index e96533515c..017e67841c 100644
--- a/src/app/shared/resource-policies/create/resource-policy-create.component.ts
+++ b/src/app/shared/resource-policies/create/resource-policy-create.component.ts
@@ -11,8 +11,8 @@ import { NotificationsService } from '../../notifications/notifications.service'
import { RemoteData } from '../../../core/data/remote-data';
import { ResourcePolicy } from '../../../core/resource-policy/models/resource-policy.model';
import { ResourcePolicyEvent } from '../form/resource-policy-form.component';
-import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../+item-page/edit-item-page/edit-item-page.routing.module';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
+import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../+item-page/edit-item-page/edit-item-page.routing-paths';
@Component({
selector: 'ds-resource-policy-create',
diff --git a/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts b/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts
index e3927e7fcd..3c933dc607 100644
--- a/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts
+++ b/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts
@@ -10,8 +10,8 @@ import { NotificationsService } from '../../notifications/notifications.service'
import { RemoteData } from '../../../core/data/remote-data';
import { ResourcePolicy } from '../../../core/resource-policy/models/resource-policy.model';
import { ResourcePolicyEvent } from '../form/resource-policy-form.component';
-import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../+item-page/edit-item-page/edit-item-page.routing.module';
import { RESOURCE_POLICY } from '../../../core/resource-policy/models/resource-policy.resource-type';
+import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../+item-page/edit-item-page/edit-item-page.routing-paths';
@Component({
selector: 'ds-resource-policy-edit',
diff --git a/src/app/shared/resource-policies/resource-policies.component.ts b/src/app/shared/resource-policies/resource-policies.component.ts
index bf5f584e98..130891ffd1 100644
--- a/src/app/shared/resource-policies/resource-policies.component.ts
+++ b/src/app/shared/resource-policies/resource-policies.component.ts
@@ -22,9 +22,9 @@ import { RequestService } from '../../core/data/request.service';
import { NotificationsService } from '../notifications/notifications.service';
import { dateToString, stringToNgbDateStruct } from '../date.util';
import { followLink } from '../utils/follow-link-config.model';
-import { ADMIN_MODULE_PATH } from '../../app-routing.module';
-import { ACCESS_CONTROL_MODULE_PATH } from '../../+admin/admin-routing.module';
-import { GROUP_EDIT_PATH } from '../../+admin/admin-access-control/admin-access-control-routing.module';
+import { ADMIN_MODULE_PATH } from '../../app-routing-paths';
+import { GROUP_EDIT_PATH } from '../../+admin/admin-access-control/admin-access-control-routing-paths';
+import { ACCESS_CONTROL_MODULE_PATH } from '../../+admin/admin-routing-paths';
interface ResourcePolicyCheckboxEntry {
id: string;