mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #3005 from tdonohue/fix_subscription_links
Fix broken links on `/subscriptions` page
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<td class="dso-info">
|
||||
<ng-container *ngIf="!!dso">
|
||||
<ds-type-badge [object]="dso"></ds-type-badge>
|
||||
<p><a [routerLink]="[getPageRoutePrefix(), dso.id]">{{ dsoNameService.getName(dso) }}</a></p>
|
||||
<p><a [routerLink]="getPageRoute(dso)">{{ dsoNameService.getName(dso) }}</a></p>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!dso">
|
||||
<p class="my-0">{{ 'subscriptions.table.not-available' | translate }}</p>
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user