diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.html b/src/app/shared/subscriptions/subscription-view/subscription-view.component.html index 3974d5b195..8934b8476f 100644 --- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.html +++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.html @@ -1,7 +1,7 @@
{{ 'subscriptions.table.not-available' | translate }}
diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts index 6fa743f7ad..001a2ed687 100644 --- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts +++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts @@ -15,12 +15,10 @@ import { } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { take } from 'rxjs/operators'; +import { getDSORoute } from 'src/app/app-routing-paths'; -import { getCollectionModuleRoute } from '../../../collection-page/collection-page-routing-paths'; -import { getCommunityModuleRoute } from '../../../community-page/community-page-routing-paths'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; -import { getItemModuleRoute } from '../../../item-page/item-page-routing-paths'; import { ConfirmationModalComponent } from '../../confirmation-modal/confirmation-modal.component'; import { hasValue } from '../../empty.util'; import { ThemedTypeBadgeComponent } from '../../object-collection/shared/badges/type-badge/themed-type-badge.component'; @@ -73,22 +71,10 @@ export class SubscriptionViewComponent { ) { } /** - * Return the prefix of the route to the dso object page ( e.g. "items") + * Return the route to the dso object page */ - getPageRoutePrefix(): string { - let routePrefix; - switch (this.dso.type.value) { - case 'community': - routePrefix = getCommunityModuleRoute(); - break; - case 'collection': - routePrefix = getCollectionModuleRoute(); - break; - case 'item': - routePrefix = getItemModuleRoute(); - break; - } - return routePrefix; + getPageRoute(dso: DSpaceObject): string { + return getDSORoute(dso); } /**