Revision 60625
Added by Argiro Kokogiannaki over 3 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.service.ts | ||
---|---|---|
38 | 38 |
} else if (identifier) { |
39 | 39 |
// pid = "10.3389/fphys.2014.00466"; |
40 | 40 |
let url = properties.searchAPIURLLAst + "resources2"; |
41 |
url += "?pid="+identifier.id + "&pidtype=" + identifier.class + "&type=";
|
|
41 |
url += "?pid="+encodeURIComponent(identifier.id) + "&pidtype=" + identifier.class + "&type=";
|
|
42 | 42 |
if (type === 'publication') { |
43 | 43 |
url += 'publications'; |
44 | 44 |
} else if (type === 'dataset') { |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.component.ts | ||
---|---|---|
368 | 368 |
this.updateDescription((this.resultLandingInfo.description ? (this.resultLandingInfo.description) : ("," + this.resultLandingInfo.title))); |
369 | 369 |
} |
370 | 370 |
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { |
371 |
this.subscriptions.push(this._piwikService.trackView(this.properties, this.resultLandingInfo.title/*.name*/, this.piwikSiteId).subscribe());
|
|
371 |
this.subscriptions.push(this._piwikService.trackViewForCustomUrl(this.properties, this.resultLandingInfo.title, this.linkToLandingPage.split("?")[1] + this.id ,this.piwikSiteId).subscribe());
|
|
372 | 372 |
} |
373 | 373 |
|
374 | 374 |
let bioentitiesNum = 0; |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/orcid/orcid-work.component.ts | ||
---|---|---|
294 | 294 |
[classBody]="'landing-modal uk-padding-remove'"> |
295 | 295 |
<div class="uk-padding-small"> |
296 | 296 |
<div> |
297 |
This research outcome has been <span class="uk-text-bold">deduplicated in OpenAIRE</span>.
|
|
297 |
This research outcome is the result of <span class="uk-text-bold"> merged research outcomes in OpenAIRE</span>.
|
|
298 | 298 |
<br><br> |
299 |
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record related to this research outcome.
|
|
299 |
You have already added <span class="uk-text-bold">{{this.putCodes?.length}} works</span> in your ORCID record related to the merged research outcome.
|
|
300 | 300 |
<div *ngIf="currentAction == 'delete'"> |
301 | 301 |
If you continue with delete action, <span class="uk-text-bold">all these works will be deleted</span>. |
302 | 302 |
</div> |
... | ... | |
757 | 757 |
} |
758 | 758 |
this.showLoading = false; |
759 | 759 |
} |
760 |
} |
|
760 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/utils/piwik/piwik.service.ts | ||
---|---|---|
3 | 3 |
|
4 | 4 |
import {StringUtils} from '../string-utils.class'; |
5 | 5 |
import {EnvProperties} from '../properties/env-properties'; |
6 |
import {Observable} from "rxjs"; |
|
6 | 7 |
|
7 | 8 |
|
8 | 9 |
@Injectable() |
9 | 10 |
export class PiwikService { |
10 | 11 |
constructor(private http: HttpClient ) {} |
11 |
|
|
12 |
trackViewForCustomUrl (properties:EnvProperties, title, pageparams, siteId = null):any { |
|
13 |
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId); |
|
14 |
if(typeof location !== 'undefined' && piwikId){ |
|
15 |
return this.doTrackView(properties,title,piwikId,location.href.split("?")[0] + "?" + pageparams); |
|
16 |
} |
|
17 |
} |
|
12 | 18 |
trackView (properties:EnvProperties, title, siteId = null):any { |
13 |
|
|
14 |
let ua = this.getUserAgent(); |
|
15 |
let referrer = this.getReferrer(); |
|
16 | 19 |
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId); |
17 | 20 |
if(typeof location !== 'undefined' && piwikId){ |
18 |
var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(location.href)+"&action_name="+StringUtils.URIEncode(title)+ |
|
19 |
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+ |
|
20 |
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):''); |
|
21 |
//console.log("Piwik - View: " + url); |
|
22 |
// return Observable.of(new Object()).mapTo(true); // for testing |
|
23 |
return this.http.get( url, {responseType: 'blob'}); |
|
24 |
// .do(request => console.info("Piwik request completed" )); |
|
25 |
|
|
21 |
return this.doTrackView(properties,title,piwikId,location.href); |
|
26 | 22 |
} |
27 | 23 |
} |
24 |
private doTrackView (properties:EnvProperties, title, siteId, pageURL):any { |
|
25 |
|
|
26 |
let ua = this.getUserAgent(); |
|
27 |
let referrer = this.getReferrer(); |
|
28 |
let piwikId= ((siteId!=null)?siteId:properties.piwikSiteId); |
|
29 |
if(typeof location !== 'undefined' && piwikId){ |
|
30 |
console.log("Piwik - View: " + pageURL, title); |
|
31 |
var url = properties.piwikBaseUrl+piwikId+"&rec=1&url="+StringUtils.URIEncode(pageURL)+"&action_name="+StringUtils.URIEncode(title)+ |
|
32 |
((ua != null && ua.length > 0)?('&ua='+StringUtils.URIEncode(ua)):'')+ |
|
33 |
((referrer != null && referrer.length > 0)?('&urlref='+StringUtils.URIEncode(referrer)):''); |
|
34 |
console.log("Piwik - View: " + url); |
|
35 |
// return Observable.of(new Object()); // for testing |
|
36 |
return this.http.get( url, {responseType: 'blob'}); |
|
37 |
// .do(request => console.info("Piwik request completed" )); |
|
38 |
|
|
39 |
} |
|
40 |
} |
|
28 | 41 |
trackDownload (properties:EnvProperties, type = "", siteId = null):any { |
29 | 42 |
var ua = this.getUserAgent(); |
30 | 43 |
var referrer = this.getReferrer(); |
Also available in: Unified diff
[Library|Trunk]
- piwik update: for result landing create custom url using the url format with the dedup id
- result landing service: url encode pid for search service
- update message for orcid