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