From 5f6c0884b58a89fe6762654d05bd5a4c9c2d534c Mon Sep 17 00:00:00 2001 From: Argiro Kokogiannaki Date: Wed, 4 Nov 2020 16:04:29 +0000 Subject: [PATCH] [Monitor Dashboard|Trunk] -set SEO titles also for private view - add check in getTypesByUserRoles git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59771 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/monitor/monitor.component.ts | 22 +++++++++++----------- src/app/utils/indicator-utils.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/monitor/monitor.component.ts b/src/app/monitor/monitor.component.ts index deed5ba..c3d4458 100644 --- a/src/app/monitor/monitor.component.ts +++ b/src/app/monitor/monitor.component.ts @@ -129,18 +129,18 @@ export class MonitorComponent implements OnInit, OnDestroy { ,filterOperator: "or", valueIsExact: true, filterType: "checkbox", radioValue:""}); } this.initializeFilters(); + this.seoService.createLinkForCanonicalURL(url, false); + this._meta.updateTag({content: url}, "property='og:url'"); + var description = "Monitor Dashboard | " + this.stakeholder.name; + var title = "Monitor Dashboard | " + this.stakeholder.name; + this._meta.updateTag({content: description}, "name='description'"); + this._meta.updateTag({content: description}, "property='og:description'"); + this._meta.updateTag({content: title}, "property='og:title'"); + this._title.setTitle(title); + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.piwiksub = this._piwikService.trackView(this.properties, title, this.properties.piwikSiteId).subscribe(); + } if(this.isPublicOrIsMember(stakeholder.visibility)) { - this.seoService.createLinkForCanonicalURL(url, false); - this._meta.updateTag({content: url}, "property='og:url'"); - var description = "Monitor Dashboard | " + this.stakeholder.name; - var title = "Monitor Dashboard | " + this.stakeholder.name; - this._meta.updateTag({content: description}, "name='description'"); - this._meta.updateTag({content: description}, "property='og:description'"); - this._meta.updateTag({content: title}, "property='og:title'"); - this._title.setTitle(title); - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.piwiksub = this._piwikService.trackView(this.properties, title, this.properties.piwikSiteId).subscribe(); - } //this.getDivContents(); this.getPageContents(); this.status = this.errorCodes.DONE; diff --git a/src/app/utils/indicator-utils.ts b/src/app/utils/indicator-utils.ts index a47ef0c..aad9755 100644 --- a/src/app/utils/indicator-utils.ts +++ b/src/app/utils/indicator-utils.ts @@ -27,7 +27,7 @@ export class StakeholderUtils { getTypesByUserRoles(user, id:string = null):Option[]{ let types = []; for(let type of this.types){ - if(Session.isCurator(type.value, user)|| Session.isPortalAdministrator(user)|| Session.isManager(type.value, id, user)){ + if(Session.isCurator(type.value, user)|| Session.isPortalAdministrator(user)|| (id && Session.isManager(type.value, id, user))){ types.push(type); } }