[Library|Trunk]
Metrics: add back the Openaire views SEO: - Landing: encode pid in canonical url - result preview: single encoding in pid url Enermaps Integration: - update landing tab - update look for tool url git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60826 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d395ca5bc5
commit
a8a8ba4016
|
@ -526,7 +526,7 @@ export class DataProviderComponent {
|
|||
}
|
||||
|
||||
public get hasMetrics(): boolean {
|
||||
return !(this.totalViews && this.totalDownloads/* && this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0 /*|| this.pageViews > 0*/;
|
||||
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0;
|
||||
}
|
||||
|
||||
public openStatistics() {
|
||||
|
|
|
@ -26,15 +26,15 @@ import {animate, state, style, transition, trigger} from "@angular/animations";
|
|||
are derived from aggregating individual research results metrics.
|
||||
</i>
|
||||
</div>
|
||||
<div class="uk-child-width-1-2@m uk-grid-small uk-grid-divider uk-grid-match" uk-grid>
|
||||
<div class="uk-child-width-1-3@m uk-grid-small uk-grid-divider uk-grid-match" uk-grid>
|
||||
<div class="uk-text-center uk-first-column">
|
||||
<div class="number">{{metrics.totalDownloads | number}}</div>
|
||||
<div>Downloads</div>
|
||||
</div>
|
||||
<!--<div class="uk-text-center">
|
||||
<div class="uk-text-center">
|
||||
<div class="number">{{pageViews | number}}</div>
|
||||
<div>OpenAIRE views</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
<div class="number">{{metrics.totalViews | number}}</div>
|
||||
<div>Total views</div>
|
||||
|
@ -224,7 +224,7 @@ export class MetricsComponent {
|
|||
}
|
||||
|
||||
public get total(): number {
|
||||
return /*+this.pageViews +*/ +this.metrics.totalViews + +this.metrics.totalDownloads;
|
||||
return +this.pageViews + +this.metrics.totalViews + +this.metrics.totalDownloads;
|
||||
}
|
||||
|
||||
private getMetrics() {
|
||||
|
|
|
@ -467,7 +467,7 @@ export class ProjectComponent {
|
|||
}
|
||||
|
||||
public get hasMetrics(): boolean {
|
||||
return !(this.totalViews && this.totalDownloads/* && this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0/*||this.pageViews > 0*/;
|
||||
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0||this.pageViews > 0;
|
||||
}
|
||||
|
||||
public openStatistics() {
|
||||
|
|
|
@ -425,17 +425,19 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
<ng-template #enermaps_tab>
|
||||
|
||||
<div class="uk-width-expand uk-text-center uk-padding">
|
||||
<div class="uk-padding">
|
||||
<div class=" uk-inline uk-width-expand uk-text-center ">
|
||||
<img class="uk-width-auto" [src]="properties.enermapsURL +'/images/' + enermapsId + '.png'" alt="Enermaps tool preview">
|
||||
<br>
|
||||
<span class=" uk-text-baseline uk-text-muted"> Visit <a
|
||||
class=" uk-margin-right uk-margin-small-top"
|
||||
[href]="properties.enermapsURL" target="_blank" >
|
||||
Enermaps Tool
|
||||
</a></span>
|
||||
|
||||
<div class="uk-overlay uk-overlay-default uk-position-bottom">
|
||||
<p>Visit <a
|
||||
class=" uk-margin-right uk-margin-small-top"
|
||||
[href]="properties.enermapsURL" target="_blank" >
|
||||
Enermaps tool <span class="custom-external custom-icon space"></span>
|
||||
</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
<my-tabs>
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
|
|
|
@ -353,7 +353,7 @@ export class ResultLandingComponent {
|
|||
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
||||
this.updateUrlWithType(pid);
|
||||
}
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + pid.id):
|
||||
this.seoService.createLinkForCanonicalURL(this.properties.domain+ properties.baseLink + ( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + encodeURIComponent(pid.id)):
|
||||
(this.linkToLandingPage + this.resultLandingInfo.relcanId)));
|
||||
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
|
||||
this.getOpenCitations();
|
||||
|
@ -433,7 +433,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
|
||||
public get hasMetrics(): boolean {
|
||||
return !(this.totalViews && this.totalDownloads /*&& this.pageViews*/) || this.totalViews > 0 || this.totalDownloads > 0 /*|| this.pageViews > 0*/;
|
||||
return !(this.totalViews && this.totalDownloads && this.pageViews) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0;
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
<div *ngIf="result">
|
||||
<!-- Before title -->
|
||||
<div class="uk-grid uk-flex uk-flex-middle">
|
||||
<div *ngIf="properties.enermapsURL && showEnermaps" class="uk-width-auto">
|
||||
<a [href]="properties.enermapsURL" target="_blank" ><img *ngIf="result.enermapsId"
|
||||
class="uk-width-medium" [src]="properties.enermapsURL + '/images/' + result.enermapsId + '.png'" alt="Enermaps tool preview">
|
||||
</a>
|
||||
<div *ngIf="properties.enermapsURL && showEnermaps && result.enermapsId" class=" uk-inline uk-width-auto uk-text-center uk-visible-toggle">
|
||||
<img class="uk-width-medium" [src]="properties.enermapsURL +'/images/' + result.enermapsId + '.png'" alt="Enermaps tool preview">
|
||||
<div class="uk-overlay uk-margin-medium-left uk-overlay-default uk-position-bottom uk-hidden-hover uk-padding-small">
|
||||
<p>Visit <a
|
||||
class=" uk-margin-right uk-margin-small-top"
|
||||
[href]="properties.enermapsURL" target="_blank" >
|
||||
Enermaps tool <span class="custom-external custom-icon space"></span>
|
||||
</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div>
|
||||
|
|
|
@ -83,7 +83,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
let pid:Identifier =this.getPID();
|
||||
if(pid){
|
||||
this.urlParam = "pid";
|
||||
this.result.id = encodeURIComponent(pid.id);
|
||||
this.result.id = pid.id;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue