mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
w2p-86403 prevent from displaying on pages where rss feed doesn't make sense
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<ng-container *ngIf="isEnabled$ | async">
|
<ng-container *ngIf="(isEnabled$ | async) && (hasRoute('home') || hasRoute('search') || hasRoute('collections') || hasRoute('community'))">
|
||||||
<div *ngIf="route$ | async as route" class="d-inline-block float-right margin-right">
|
<div *ngIf="route$ | async as route" class="d-inline-block float-right margin-right">
|
||||||
<a [href]="route" class="btn btn-secondary"><i class="fas fa-rss-square"></i></a>
|
<a [href]="route" class="btn btn-secondary"><i class="fas fa-rss-square"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -120,6 +120,17 @@ export class RSSComponent implements OnInit, OnDestroy {
|
|||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the router url contains the specified route
|
||||||
|
*
|
||||||
|
* @param {string} route
|
||||||
|
* @returns
|
||||||
|
* @memberof MyComponent
|
||||||
|
*/
|
||||||
|
hasRoute(route: string) {
|
||||||
|
return this.router.url.includes(route);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates <link> tags in the header of the page
|
* Creates <link> tags in the header of the page
|
||||||
* @param route The composed url to opensearch
|
* @param route The composed url to opensearch
|
||||||
|
Reference in New Issue
Block a user