Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme
This commit is contained in:
commit
70ea6ec60c
|
@ -49,7 +49,7 @@ import {AlertModal} from "../../../utils/modal/alert";
|
||||||
class="under-curation">Under curation</span>
|
class="under-curation">Under curation</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<showTitle [titleName]="title" classNames="uk-margin-remove-bottom" [isH1]="isTitleH1"></showTitle>
|
<showTitle [titleName]="title" classNames="uk-margin-remove-bottom"></showTitle>
|
||||||
<div *ngIf="subTitle">
|
<div *ngIf="subTitle">
|
||||||
<span class="uk-text-muted" [innerHTML]="subTitle"></span>
|
<span class="uk-text-muted" [innerHTML]="subTitle"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -302,7 +302,8 @@ export class MetricsComponent {
|
||||||
}
|
}
|
||||||
this.metricsResults.emit({
|
this.metricsResults.emit({
|
||||||
totalViews: 0,
|
totalViews: 0,
|
||||||
totalDownloads: 0
|
totalDownloads: 0,
|
||||||
|
pageViews: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,12 +4,9 @@ import {ActivatedRoute} from '@angular/router';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'showTitle',
|
selector: 'showTitle',
|
||||||
template: `
|
template: `
|
||||||
<h1 *ngIf="isH1" [ngClass]="classNames">
|
<h1 [ngClass]="classNames" class="uk-h5">
|
||||||
<ng-container *ngTemplateOutlet="_title;"></ng-container>
|
<ng-container *ngTemplateOutlet="_title;"></ng-container>
|
||||||
</h1>
|
</h1>
|
||||||
<h2 *ngIf="!isH1" [ngClass]="classNames">
|
|
||||||
<ng-container *ngTemplateOutlet="_title;"></ng-container>
|
|
||||||
</h2>
|
|
||||||
<ng-template #_title>
|
<ng-template #_title>
|
||||||
<div *ngIf="title != undefined" class="landingTitle uk-text-break">
|
<div *ngIf="title != undefined" class="landingTitle uk-text-break">
|
||||||
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
||||||
|
@ -49,7 +46,6 @@ export class ShowTitleComponent {
|
||||||
@Input() title: { [key: string]: string };
|
@Input() title: { [key: string]: string };
|
||||||
@Input() iconClass:string;
|
@Input() iconClass:string;
|
||||||
@Input() classNames: string = "";
|
@Input() classNames: string = "";
|
||||||
@Input() isH1:boolean = true;
|
|
||||||
|
|
||||||
constructor () {}
|
constructor () {}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -18,12 +18,13 @@ import {IndexInfoService} from "../../utils/indexInfo.service";
|
||||||
import {Identifier, StringUtils} from "../../utils/string-utils.class";
|
import {Identifier, StringUtils} from "../../utils/string-utils.class";
|
||||||
import {properties} from "../../../../environments/environment";
|
import {properties} from "../../../../environments/environment";
|
||||||
import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service";
|
import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service";
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber, Subscription} from "rxjs";
|
||||||
import {Session} from "../../login/utils/helper.class";
|
import {Session} from "../../login/utils/helper.class";
|
||||||
import {AnnotationComponent} from "../annotation/annotation.component";
|
import {AnnotationComponent} from "../annotation/annotation.component";
|
||||||
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
|
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
|
||||||
import {ConnectHelper} from "../../connect/connectHelper";
|
import {ConnectHelper} from "../../connect/connectHelper";
|
||||||
|
|
||||||
|
declare var UIkit;
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'result-landing',
|
selector: 'result-landing',
|
||||||
|
@ -62,9 +63,9 @@ export class ResultLandingComponent {
|
||||||
public hasAltMetrics: boolean = false;
|
public hasAltMetrics: boolean = false;
|
||||||
public viewsFrameUrl: string;
|
public viewsFrameUrl: string;
|
||||||
public downloadsFrameUrl: string;
|
public downloadsFrameUrl: string;
|
||||||
public totalViews: number;
|
public totalViews: number = null;
|
||||||
public totalDownloads: number;
|
public totalDownloads: number = null;
|
||||||
public pageViews: number;
|
public pageViews: number = null;
|
||||||
|
|
||||||
// Custom tab paging variables
|
// Custom tab paging variables
|
||||||
public referencesPage: number = 1;
|
public referencesPage: number = 1;
|
||||||
|
@ -115,6 +116,9 @@ export class ResultLandingComponent {
|
||||||
public relatedClassSelected: string = "";
|
public relatedClassSelected: string = "";
|
||||||
public filteredRelatedResults: RelationResult[];
|
public filteredRelatedResults: RelationResult[];
|
||||||
|
|
||||||
|
public offset: number;
|
||||||
|
fakeArray = new Array(100);
|
||||||
|
|
||||||
constructor(private _resultLandingService: ResultLandingService,
|
constructor(private _resultLandingService: ResultLandingService,
|
||||||
private _vocabulariesService: ISVocabulariesService,
|
private _vocabulariesService: ISVocabulariesService,
|
||||||
private _piwikService: PiwikService,
|
private _piwikService: PiwikService,
|
||||||
|
@ -190,6 +194,9 @@ export class ResultLandingComponent {
|
||||||
|
|
||||||
this.scroll();
|
this.scroll();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height'));
|
||||||
|
console.log(this.offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private initMetaAndLinks(type: string) {
|
private initMetaAndLinks(type: string) {
|
||||||
|
@ -244,8 +251,10 @@ export class ResultLandingComponent {
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.subscriptions.forEach(subscription => {
|
this.subscriptions.forEach(subscription => {
|
||||||
if (subscription instanceof Subscriber) {
|
if (subscription instanceof Subscription) {
|
||||||
subscription.unsubscribe();
|
subscription.unsubscribe();
|
||||||
|
} else if (subscription instanceof Function) {
|
||||||
|
subscription();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this._vocabulariesService.clearSubscriptions();
|
this._vocabulariesService.clearSubscriptions();
|
||||||
|
@ -465,8 +474,14 @@ export class ResultLandingComponent {
|
||||||
(this.resultLandingInfo.hostedBy_collectedFrom && this.resultLandingInfo.hostedBy_collectedFrom.length > 0);
|
(this.resultLandingInfo.hostedBy_collectedFrom && this.resultLandingInfo.hostedBy_collectedFrom.length > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get metricsCalculated(): boolean {
|
||||||
|
return this.totalViews != null || this.totalDownloads != null || this.pageViews != null;
|
||||||
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
return !(this.totalViews != null && this.totalDownloads != null && this.pageViews != null) || this.totalViews > 0 || this.totalDownloads > 0 || this.pageViews > 0;
|
||||||
|
// return (this.totalViews == null || this.totalViews > 0) || (this.totalDownloads && this.totalDownloads > 0) || (this.pageViews && this.pageViews > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
|
|
|
@ -84,11 +84,11 @@ declare var UIkit: any;
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
||||||
[top_margin]="false"></loading></span>
|
[top_margin]="false"></loading></span>
|
||||||
<span [class]="showLoading ? 'uk-margin-small-left' : 'space'">Add to 
|
<!-- <span [class]="showLoading ? 'uk-margin-small-left' : 'space'">Add to -->
|
||||||
<span class="orcid-color">
|
<!-- <span class="orcid-color">-->
|
||||||
ORCID
|
<!-- ORCID-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
@ -105,11 +105,11 @@ declare var UIkit: any;
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
<span *ngIf="showLoading" class="uk-icon icon-button loading-action-button"><loading
|
||||||
[top_margin]="false"></loading></span>
|
[top_margin]="false"></loading></span>
|
||||||
<span [class]="showLoading ? 'uk-margin-small-left' : 'space'">Delete from 
|
<!-- <span [class]="showLoading ? 'uk-margin-small-left' : 'space'">Delete from -->
|
||||||
<span class="orcid-color">
|
<!-- <span class="orcid-color">-->
|
||||||
ORCID
|
<!-- ORCID-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
Loading…
Reference in New Issue