mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +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">
|
||||
<a [href]="route" class="btn btn-secondary"><i class="fas fa-rss-square"></i></a>
|
||||
</div>
|
||||
|
@@ -120,6 +120,17 @@ export class RSSComponent implements OnInit, OnDestroy {
|
||||
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
|
||||
* @param route The composed url to opensearch
|
||||
|
Reference in New Issue
Block a user