[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 {
|
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() {
|
public openStatistics() {
|
||||||
|
|
|
@ -26,15 +26,15 @@ import {animate, state, style, transition, trigger} from "@angular/animations";
|
||||||
are derived from aggregating individual research results metrics.
|
are derived from aggregating individual research results metrics.
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</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="uk-text-center uk-first-column">
|
||||||
<div class="number">{{metrics.totalDownloads | number}}</div>
|
<div class="number">{{metrics.totalDownloads | number}}</div>
|
||||||
<div>Downloads</div>
|
<div>Downloads</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="uk-text-center">
|
<div class="uk-text-center">
|
||||||
<div class="number">{{pageViews | number}}</div>
|
<div class="number">{{pageViews | number}}</div>
|
||||||
<div>OpenAIRE views</div>
|
<div>OpenAIRE views</div>
|
||||||
</div>-->
|
</div>
|
||||||
<div class="uk-text-center">
|
<div class="uk-text-center">
|
||||||
<div class="number">{{metrics.totalViews | number}}</div>
|
<div class="number">{{metrics.totalViews | number}}</div>
|
||||||
<div>Total views</div>
|
<div>Total views</div>
|
||||||
|
@ -224,7 +224,7 @@ export class MetricsComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get total(): number {
|
public get total(): number {
|
||||||
return /*+this.pageViews +*/ +this.metrics.totalViews + +this.metrics.totalDownloads;
|
return +this.pageViews + +this.metrics.totalViews + +this.metrics.totalDownloads;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getMetrics() {
|
private getMetrics() {
|
||||||
|
|
|
@ -467,7 +467,7 @@ export class ProjectComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get hasMetrics(): boolean {
|
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() {
|
public openStatistics() {
|
||||||
|
|
|
@ -425,17 +425,19 @@
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #enermaps_tab>
|
<ng-template #enermaps_tab>
|
||||||
|
<div class="uk-padding">
|
||||||
<div class="uk-width-expand uk-text-center 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">
|
<img class="uk-width-auto" [src]="properties.enermapsURL +'/images/' + enermapsId + '.png'" alt="Enermaps tool preview">
|
||||||
<br>
|
<div class="uk-overlay uk-overlay-default uk-position-bottom">
|
||||||
<span class=" uk-text-baseline uk-text-muted"> Visit <a
|
<p>Visit <a
|
||||||
class=" uk-margin-right uk-margin-small-top"
|
class=" uk-margin-right uk-margin-small-top"
|
||||||
[href]="properties.enermapsURL" target="_blank" >
|
[href]="properties.enermapsURL" target="_blank" >
|
||||||
Enermaps Tool
|
Enermaps tool <span class="custom-external custom-icon space"></span>
|
||||||
</a></span>
|
</a></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<my-tabs>
|
<my-tabs>
|
||||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||||
|
|
|
@ -353,7 +353,7 @@ export class ResultLandingComponent {
|
||||||
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
if (this.type == "result") { // no type was specified - update URL based this.resultLandingInfo.resultType
|
||||||
this.updateUrlWithType(pid);
|
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)));
|
(this.linkToLandingPage + this.resultLandingInfo.relcanId)));
|
||||||
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
|
if ((this.type == "publication") && (this.properties.environment == "beta" || this.properties.environment == "development") && (typeof document !== 'undefined')) {
|
||||||
this.getOpenCitations();
|
this.getOpenCitations();
|
||||||
|
@ -433,7 +433,7 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get hasMetrics(): boolean {
|
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) {
|
private updateDescription(description: string) {
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
<div *ngIf="result">
|
<div *ngIf="result">
|
||||||
<!-- Before title -->
|
<!-- Before title -->
|
||||||
<div class="uk-grid uk-flex uk-flex-middle">
|
<div class="uk-grid uk-flex uk-flex-middle">
|
||||||
<div *ngIf="properties.enermapsURL && showEnermaps" class="uk-width-auto">
|
<div *ngIf="properties.enermapsURL && showEnermaps && result.enermapsId" class=" uk-inline uk-width-auto uk-text-center uk-visible-toggle">
|
||||||
<a [href]="properties.enermapsURL" target="_blank" ><img *ngIf="result.enermapsId"
|
<img class="uk-width-medium" [src]="properties.enermapsURL +'/images/' + result.enermapsId + '.png'" alt="Enermaps tool preview">
|
||||||
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">
|
||||||
</a>
|
<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>
|
||||||
<div class="uk-width-expand">
|
<div class="uk-width-expand">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -83,7 +83,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
let pid:Identifier =this.getPID();
|
let pid:Identifier =this.getPID();
|
||||||
if(pid){
|
if(pid){
|
||||||
this.urlParam = "pid";
|
this.urlParam = "pid";
|
||||||
this.result.id = encodeURIComponent(pid.id);
|
this.result.id = pid.id;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue