[Library | Trunk]: Some changes on result landing page base on new mocks.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58735 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-05-20 20:34:29 +00:00
parent c8f71a4093
commit cbc32aaa46
13 changed files with 228 additions and 196 deletions

View File

@ -1,9 +1,3 @@
<div *ngIf="!showForm" class="uk-container uk-container-large uk-margin-top" id="feedback-pos">
<span class="feedback uk-float-right">
<span class="uk-margin-small-right">Any information missing or wrong?</span>
<a (click)="changeShowForm(true)" class="portal-link">Report an Issue</a>
</span>
</div>
<div *ngIf="showForm && !sent" class="feedback-page">
<div class="portal-background-color uk-padding-small">
<div class="uk-container">
@ -87,4 +81,4 @@
</div>
</div>
</div>
<modal-alert #backModal (alertOutput)="changeShowForm(false)"></modal-alert>
<modal-alert #backModal (alertOutput)="changeShowForm(false)"></modal-alert>

View File

@ -5,7 +5,6 @@ import {EnvProperties} from "../../utils/properties/env-properties";
@Component({
selector: 'availableOn',
template: `
<div class="sideInfoTitle uk-margin-small-bottom">Download from</div>
<div class="download-from uk-height-max-large uk-overflow-auto">
<div *ngFor="let available of availableOn.slice(0, showNum) let i=index"
class="uk-flex uk-flex-top"
@ -13,7 +12,7 @@ import {EnvProperties} from "../../utils/properties/env-properties";
<span class="uk-margin-small-right">
<img [src]="available.icon">
</span>
<div class="uk-width-expand">
<div class="uk-width-expand uk-padding-small uk-padding-remove-left uk-padding-remove-vertical">
<span *ngIf="available.downloadUrl.length > 1" class="title">
<span class="uk-text-bold">{{available.downloadName}}</span>
<a *ngFor="let url of available.downloadUrl; let i=index;">
@ -43,13 +42,13 @@ import {EnvProperties} from "../../utils/properties/env-properties";
</div>
</div>
</div>
<div *ngIf="showNum > threshold" class="uk-text-right uk-margin-bottom">
<a (click)="showNum = threshold; scroll()">
<div *ngIf="showNum > threshold" class="uk-text-center uk-margin-bottom">
<a (click)="showNum = threshold;">
View less
</a>
</div>
<!-- <div *ngIf="showNum == threshold && availableOn && availableOn.length > 5">...</div>-->
<div *ngIf="showNum == threshold && availableOn && availableOn.length > 5" class="uk-text-right uk-margin-bottom">
<div *ngIf="showNum == threshold && availableOn && availableOn.length > 5" class="uk-text-center uk-margin-bottom">
<a (click)="showNum = availableOn.length;">
View more
</a>

View File

@ -1,25 +1,35 @@
import {Component, ElementRef, Input} from '@angular/core';
import {Component, ElementRef, Input, OnDestroy, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {Citation, CitationData} from './citation.class';
import {ResultLandingInfo} from "../../../utils/entities/resultLandingInfo";
declare var CSL:any;
declare var Sys:any;
declare var UIkit: any;
//<addThis ></addThis>
@Component({
selector: 'citeThis',
template: `
<div class="uk-padding-small">
<div class="uk-padding">
<mat-select #matSelect class="matSelection" id="citations" name="citeselect" [(ngModel)]="selectedStyle" (ngModelChange)="styleChanged()"
[disableOptionCentering]="true" modal-select [matSelect]="matSelect"
panelClass="matSelectionPanel">
<mat-option value="0">select a citation style</mat-option>
<mat-option *ngFor=" let style of this.citation.templates let i = index" [value]="style">{{style}}</mat-option>
</mat-select>
<div *ngIf="selectedStyle!='0'" id="citation" class="box-content uk-margin-small-top uk-overflow-auto" [innerHTML]=citationText></div>
<div *ngIf="selectedStyle!='0'">
<div id="citation" class="box-content uk-margin-small-top uk-overflow-auto" [innerHTML]=citationText></div>
<button class="clipboard_btn uk-button uk-button-small uk-button-secondary square-button uk-icon uk-float-right" data-clipboard-target="#citation" title="Copy to clipboard">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1">
<rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect>
<polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline>
</svg>
<span class="uk-margin-small-left">COPY</span>
</button>
</div>
</div>
`
})
export class CiteThisComponent {
export class CiteThisComponent implements OnInit, OnDestroy{
private sub:any;
public selectedStyle:string="0";
public citationText:string;
@ -30,24 +40,29 @@ export class CiteThisComponent {
@Input() type: string="article";
public citeproc;
public data;
constructor(private route: ActivatedRoute) {
// this.selectedStyle = this.citation.templates[0];
}
public clipboard;
ngOnInit() {
if(typeof window !== 'undefined') {
// this.citeproc = require('./citeproc.js');
// console.log(this.citeproc);
this.parseData();
this.updateCitation();
this.createClipboard();
}
}
public opened() {
let divElement: HTMLDivElement = <HTMLDivElement>document.getElementsByClassName('cdk-overlay-container')[0];
divElement.classList.add('modal-select');
ngOnDestroy() {
delete this.clipboard;
}
private createClipboard() {
if (typeof window !== 'undefined') {
delete this.clipboard;
let Clipboard;
Clipboard = require('clipboard');
this.clipboard = new Clipboard('.clipboard_btn');
}
}
parseData(){

View File

@ -3,21 +3,24 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {Project} from "../../utils/result-preview/result-preview";
@Component({
selector: 'fundedBy',
template: `
<li>
<span class="uk-text-muted">Funded by: </span>
<span *ngFor="let item of fundedByProjects.slice(0, showNum) let i=index">
selector: 'fundedBy',
template: `
<div class="uk-text-muted">Funded by</div>
<span *ngFor="let item of fundedByProjects.slice(0, showNum) let i=index">
<a>
<mark *ngIf="item.inline">
<span *ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname']?item['funderShortname']:item['funderName']}}</span>
<span
*ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname'] ? item['funderShortname'] : item['funderName']}}</span>
<span *ngIf="!item['funderShortname'] && !item['funderName']">[no funder available]</span>
<span *ngIf="item['acronym'] || item['title']">| {{ item['acronym']?item['acronym']:item['title']}}</span>
<span
*ngIf="item['acronym'] || item['title']">| {{ item['acronym'] ? item['acronym'] : item['title']}}</span>
</mark>
<span *ngIf="!item.inline">
<span *ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname']?item['funderShortname']:item['funderName']}}</span>
<span
*ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname'] ? item['funderShortname'] : item['funderName']}}</span>
<span *ngIf="!item['funderShortname'] && !item['funderName']">[no funder available]</span>
<span *ngIf="item['acronym'] || item['title']">| {{ item['acronym']?item['acronym']:item['title']}}</span>
<span
*ngIf="item['acronym'] || item['title']">| {{ item['acronym'] ? item['acronym'] : item['title']}}</span>
</span>
</a>
<div class="default-dropdown uk-margin-remove-top uk-padding-small"
@ -26,10 +29,10 @@ import {Project} from "../../utils/result-preview/result-preview";
<div class="uk-margin-bottom">
<a *ngIf="item.id" class="uk-h6 uk-margin-remove portal-link"
[queryParams]="{projectId: item.id}" routerLink="/search/project">
{{item['acronym']?item['acronym']:item['title']}}
{{item['acronym'] ? item['acronym'] : item['title']}}
</a>
<span *ngIf="!item.id" class="uk-h6 uk-margin-remove">
{{item['acronym']?item['acronym']:item['title']}}
{{item['acronym'] ? item['acronym'] : item['title']}}
</span>
<div *ngIf="item.acronym && item.title">
{{item.title}}
@ -38,7 +41,7 @@ import {Project} from "../../utils/result-preview/result-preview";
<ul class="uk-list uk-padding-remove-left uk-margin-bottom">
<li *ngIf="item.funderShortname || item.funderName">
<span class="uk-text-muted">Funder: </span>
{{item.funderName?item.funderName:item.funderShortname}}
{{item.funderName ? item.funderName : item.funderShortname}}
<span *ngIf="item.funderShortname && item.funderName">
({{item.funderShortname}})
</span>
@ -56,19 +59,19 @@ import {Project} from "../../utils/result-preview/result-preview";
</div>
<span *ngIf="i < (fundedByProjects.slice(0, showNum).length - 1)">, </span>
</span>
<div *ngIf="showNum > threshold" class="uk-text-right uk-margin-bottom">
<a (click)="showNum = threshold; scroll()">
View less
</a>
</div>
<div *ngIf="showNum == threshold && fundedByProjects && fundedByProjects.length > threshold" class="uk-text-right uk-margin-bottom">
<a (click)="showNum = fundedByProjects.length;">
View more
</a>
</div>
</li>
`
})
<div *ngIf="showNum > threshold" class="uk-text-right uk-margin-bottom">
<a (click)="showNum = threshold; scroll()">
View less
</a>
</div>
<div *ngIf="showNum == threshold && fundedByProjects && fundedByProjects.length > threshold"
class="uk-text-right uk-margin-bottom">
<a (click)="showNum = fundedByProjects.length;">
View more
</a>
</div>
`
})
export class FundedByComponent {
@Input() fundedByProjects: Project[];

View File

@ -6,7 +6,7 @@ import {AlertModal} from "../../../utils/modal/alert";
@Component({
selector: 'landing-header',
template: `
<div class="title-section uk-margin-bottom">
<div class="title-section uk-margin-bottom" [ngClass]="titleClass">
<div class="uk-text-small">
<span *ngIf="entityType" class="uk-text-capitalize">
{{entityType}}
@ -74,6 +74,7 @@ export class LandingHeaderComponent {
@Input() showAllAuthors: boolean = true;
@Input() underCuration: boolean = false;
@Input() modal: AlertModal;
@Input() titleClass: string = null;
public removeUnknown(array: string[], type: boolean = false): string[] {
if (type) {

View File

@ -4,36 +4,33 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
@Component({
selector: 'relatedTo',
template: `
<div class="uk-margin-bottom">
<div class="uk-text-small">
<div class="uk-text-muted">
Communities:
</div>
<div class="uk-margin-small-left" *ngFor="let item of contexts.slice(0, showNum); let i=index">
<div>
<div class="uk-text-muted">Communities</div>
<div class="uk-margin-small-left" *ngFor="let item of contexts.slice(0, showNum); let i=index">
<span *ngIf="!item['inline']">
<span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory']"><span uk-icon="icon: arrow-right"></span>{{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</span>
<mark *ngIf="item['inline']">
<span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory']"><span
uk-icon="icon: arrow-right"></span>{{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</mark>
</div>
</div>
<div *ngIf="showNum > threshold" class="uk-text-right">
<a (click)="showNum = threshold; scroll()">
View less
</a>
</div>
<div *ngIf="showNum == threshold && contexts && contexts.length > threshold" class="uk-text-right">
<a (click)="showNum = contexts.length;">
View more
</a>
</span>
<mark *ngIf="item['inline']">
<span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory']"><span
uk-icon="icon: arrow-right"></span>{{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</mark>
</div>
</div>
<div *ngIf="showNum > threshold" class="uk-text-right">
<a (click)="showNum = threshold; scroll()">
View less
</a>
</div>
<div *ngIf="showNum == threshold && contexts && contexts.length > threshold" class="uk-text-right">
<a (click)="showNum = contexts.length;">
View more
</a>
</div>
`
})

View File

@ -17,9 +17,9 @@ import {Component, Input} from '@angular/core';
</div>
</div>
</div>
<div *ngIf="(subjects && subjects.length > 0) || (otherSubjects && otherSubjects.size > 0)" class="uk-text-small"
<div *ngIf="(subjects && subjects.length > 0) || (otherSubjects && otherSubjects.size > 0)" class="uk-text-small uk-margin-medium-top"
[class.uk-margin-top]="classifiedSubjects && classifiedSubjects.size > 0">
<span class="uk-text-muted">Subjects: </span>
<div class="uk-text-muted">Subjects</div>
<span *ngIf="subjects && subjects.length > 0">{{subjects.join(', ')}}</span>
<span *ngIf="(subjects && subjects.length > 0) && (otherSubjects && otherSubjects.size > 0)">, </span>
<span *ngIf="otherSubjects && otherSubjects.size > 0">

View File

@ -665,7 +665,7 @@ export class ProjectComponent {
// }
public onSelectActiveTab(activeTabId) {
if(this.activeTab != "activaTabId") { // tab really changed
if(this.activeTab != activeTabId) { // tab really changed
if (activeTabId == 'summary') {
this.activeTab = 'summary';
} else if (activeTabId == 'publications') {

View File

@ -11,7 +11,7 @@
class="loading-gif uk-align-center"></span></div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div *ngIf="resultLandingInfo != null" class="uk-grid uk-margin-remove">
<div *ngIf="resultLandingInfo" class="uk-grid uk-margin-remove">
<div
class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
<!-- schema.org-->
@ -24,11 +24,6 @@
[entityType]="getTypeName()" [types]="resultLandingInfo.types"
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
</landing-header>
<div *ngIf="resultLandingInfo.deletedByInferenceIds"
class="uk-text-muted uk-text-small uk-text-right">
<a (click)="openDeletedByInference()">View all {{resultLandingInfo.deletedByInferenceIds.length}}
versions</a>
</div>
<!-- Labels -->
<div class="uk-margin-bottom">
<span *ngIf="resultLandingInfo.accessMode
@ -63,49 +58,7 @@
</span>
{{resultLandingInfo.countries.join(", ")}}
</li>
<!-- Funded By -->
<li *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0">
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects"></fundedBy>
</li>
<!-- Identifiers -->
<li *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="resultLandingInfo.identifiers"
[properties]="properties"></showIdentifiers>
</li>
</ul>
<!-- Description -->
<div *ngIf="resultLandingInfo.description" class="uk-margin-bottom">
<div class="uk-text-justify uk-text-small uk-height-max-medium uk-overflow-auto">
<span class="uk-text-muted">Abstract: </span>
<span>{{resultLandingInfo.description.substring(0, showNumDescription)}}</span>
<span *ngIf="showNumDescription == thresholdDescription &&
resultLandingInfo.description.length > thresholdDescription">...</span>
</div>
<div *ngIf="showNumDescription == thresholdDescription &&
resultLandingInfo.description.length > thresholdDescription" class="uk-text-right">
<a (click)="showNumDescription = resultLandingInfo.description.length;">
View more
</a>
</div>
<div *ngIf="resultLandingInfo.description && showNumDescription > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = thresholdDescription;">
View less
</a>
</div>
</div>
<!-- Communities -->
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length >0 ">
<relatedTo [contexts]="resultLandingInfo.contexts"></relatedTo>
</div>
<!-- Subjects -->
<div *ngIf="resultLandingInfo.subjects || resultLandingInfo.otherSubjects ||
resultLandingInfo.classifiedSubjects" class="uk-margin-bottom">
<showSubjects [subjects]="resultLandingInfo.subjects"
[otherSubjects]="resultLandingInfo.otherSubjects"
[classifiedSubjects]="resultLandingInfo.classifiedSubjects">
</showSubjects>
</div>
<div class="uk-margin-medium-top">
<div *ngIf="resultLandingInfo.references || resultLandingInfo.bioentities"
class="uk-margin-top simple-buttons uk-flex uk-flex-middle">
@ -174,34 +127,6 @@
</div>
</div>
</div>
<div class="uk-margin-small-top uk-flex uk-flex-bottom">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4">
<span
class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">Powered by OpenAIRE Open Research Graph</span>
</div>
<div *ngIf=" properties.environment === 'development' && resultLandingInfo" class="uk-margin-medium-top">
<b2note [id]="id" [properties]="properties"
[landingInfo]="resultLandingInfo"></b2note>
</div>
<!-- <ul #accordions class="custom-accordion" uk-accordion>
<li (click)="metricsClicked=true; activeTab='Metrics'">
<a class="uk-accordion-title" href="#">
Metrics
</a>
<div class="uk-accordion-content">
<metrics *ngIf="metricsClicked" [pageViews]="pageViews"
[id]="id" [entityType]="'results'" [entity]="title"
(metricsResults)="metricsResults($event)" [properties]=properties>
</metrics>
<i-frame *ngIf="metricsClicked && totalViews>0"
[url]=viewsFrameUrl>
</i-frame>
<i-frame *ngIf="metricsClicked && totalDownloads>0"
[url]=downloadsFrameUrl>
</i-frame>
</div>
</li>
</ul>-->
</div>
<div class="uk-width-1-3@m uk-width-1-1@s uk-padding-remove">
<ul class="user-actions uk-list uk-card uk-card-default uk-padding">
@ -223,13 +148,6 @@
<span class="uk-margin-small-left">Cite this {{getTypeName()}}</span>
</a>
</li>
<!-- &lt;!&ndash; Download From &ndash;&gt;-->
<!-- <div-->
<!-- *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0"-->
<!-- class="uk-margin-top">-->
<!-- <availableOn [properties]="properties"-->
<!-- [availableOn]="resultLandingInfo.hostedBy_collectedFrom"></availableOn>-->
<!-- </div>-->
<!-- Metrics -->
<li *ngIf="hasAltMetrics || hasMetrics" class="uk-margin-medium-top">
<div uk-grid class="uk-child-width-1-3 uk-text-center uk-flex uk-flex-middle">
@ -248,8 +166,103 @@
</div>
</li>
</ul>
<div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</div>
<div class="uk-padding-remove-left">
<div class="main-tabs-div">
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
<my-tab [tabTitle]="getTypeName() + ' Summary'" [tabId]="'summary'">
<div class="uk-grid uk-margin-remove">
<div class="uk-width-expand uk-padding">
<!-- Description -->
<div *ngIf="resultLandingInfo.description" class="uk-margin-medium-bottom">
<div class="uk-text-justify uk-text-small uk-height-max-medium uk-overflow-auto">
<div class="uk-text-muted">Abstract</div>
<span>{{resultLandingInfo.description.substring(0, showNumDescription)}}</span>
<span *ngIf="showNumDescription == thresholdDescription &&
resultLandingInfo.description.length > thresholdDescription">...</span>
</div>
<div *ngIf="showNumDescription == thresholdDescription &&
resultLandingInfo.description.length > thresholdDescription" class="uk-text-right">
<a (click)="showNumDescription = resultLandingInfo.description.length;">
Read more
</a>
</div>
<div *ngIf="resultLandingInfo.description && showNumDescription > thresholdDescription"
class="uk-text-right">
<a (click)="showNumDescription = thresholdDescription;">
Read less
</a>
</div>
</div>
<!-- Identifiers -->
<div *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0"
class="uk-margin-medium-bottom">
<showIdentifiers [identifiers]="resultLandingInfo.identifiers"
[properties]="properties">
</showIdentifiers>
</div>
<!-- Subjects -->
<div *ngIf="resultLandingInfo.subjects || resultLandingInfo.otherSubjects ||
resultLandingInfo.classifiedSubjects" class="uk-margin-medium-bottom">
<showSubjects [subjects]="resultLandingInfo.subjects"
[otherSubjects]="resultLandingInfo.otherSubjects"
[classifiedSubjects]="resultLandingInfo.classifiedSubjects">
</showSubjects>
</div>
</div>
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 ||
resultLandingInfo.contexts && resultLandingInfo.contexts.length >0 ||
resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0"
class="uk-width-1-3 right-column uk-padding-remove">
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 ||
resultLandingInfo.contexts && resultLandingInfo.contexts.length >0"
class="uk-padding uk-padding-remove-bottom">
<!-- Funded By -->
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0"
class="uk-margin-medium-bottom">
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects"></fundedBy>
</div>
<!-- Communities -->
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length >0"
class="uk-margin-medium-bottom">
<relatedTo [contexts]="resultLandingInfo.contexts"></relatedTo>
</div>
</div>
<!-- Download From -->
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0" class="uk-margin-medium-bottom">
<div class="sideInfoTitle uk-margin-small-bottom uk-flex">
<span class="uk-width-1-2">Download from</span>
<span *ngIf="resultLandingInfo.deletedByInferenceIds" class="uk-width-1-2 uk-text-small uk-text-right">
<a (click)="openDeletedByInference()">View all {{resultLandingInfo.deletedByInferenceIds.length}} versions</a>
</span>
</div>
<availableOn [properties]="properties"
[availableOn]="resultLandingInfo.hostedBy_collectedFrom"></availableOn>
</div>
</div>
</div>
</my-tab>
</my-tabs>
</div>
<div class="uk-margin-small-top uk-flex">
<!-- Last Index Info-->
<div class="uk-flex uk-flex-bottom uk-width-2-3">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4">
<span class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">Powered by OpenAIRE Open Research Graph</span>
<span class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
</span>
</div>
<!--Feedback-->
<div class="uk-width-1-3 uk-text-right uk-text-small">
<span class="uk-text-muted">Any information missing or wrong?</span>
<a (click)="showFeedback = true; scroll()" class="portal-link space">Report an Issue</a>
</div>
</div>
<!-- B2 Note-->
<div *ngIf=" properties.environment === 'development' && resultLandingInfo" class="uk-margin-medium-top">
<b2note [id]="id" [properties]="properties"
[landingInfo]="resultLandingInfo"></b2note>
</div>
</div>
</div>
@ -261,12 +274,13 @@
</div>
<feedback *ngIf="resultLandingInfo" [resultLandingInfo]="resultLandingInfo"
[properties]="properties" [entityType]="getTypeName()" [fields]="feedbackFields"
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
[showForm]="showFeedback" (show)="showFeedback = $event;"></feedback>
<!-- Other versions -->
<modal-alert *ngIf="resultLandingInfo && resultLandingInfo.deletedByInferenceIds"
#AlertModalDeletedByInference classBody="uk-width-xxlarge uk-padding-remove-right">
<landing-header [properties]="properties" [title]="resultLandingInfo.title" [modal]="AlertModalDeletedByInference"
[subTitle]="resultLandingInfo.subtitle" [authorLimit]="10" [showAllAuthors]="false"
titleClass="title-grey-background"
[entityType]="getTypeName()" [authors]="resultLandingInfo.authors" [types]="resultLandingInfo.types"
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
</landing-header>
@ -421,7 +435,7 @@
</div>
</modal-alert>
</div>
<modal-alert #linkModal>
<modal-alert #linkModal [classTitle]="'landing-modal-header uk-padding-small'" [classBody]="'uk-padding-remove landing-modal'">
<div class="uk-grid uk-child-width-1-3 uk-flex uk-flex-middle">
<div class="uk-text-center">
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
@ -469,7 +483,7 @@
</a></div>
</div>
</modal-alert>
<modal-alert #citeModal>
<modal-alert #citeModal [classTitle]="'landing-modal-header uk-padding-small'" [classBody]="'uk-padding-remove landing-modal'">
<citeThis *ngIf="resultLandingInfo" [result]="resultLandingInfo" [id]="id" [type]="title.toLowerCase()"></citeThis>
</modal-alert>

View File

@ -567,4 +567,12 @@ export class ResultLandingComponent {
this.citeModal.alertTitle = "Cite this " + this.getTypeName() + " to";
this.citeModal.open();
}
public onSelectActiveTab(activeTabId) {
if(this.activeTab != activeTabId) { // tab really changed
if (activeTabId == 'summary') {
this.activeTab = 'summary';
}
}
}
}

View File

@ -29,13 +29,14 @@ import {LandingHeaderModule} from "../landing-utils/landing-header/landing-heade
import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module";
import {ResultPreviewModule} from "../../utils/result-preview/result-preview.module";
import {FeedbackModule} from "../feedback/feedback.module";
import {TabsModule} from "../../utils/tabs/tabs.module";
@NgModule({
imports: [
CommonModule, FormsModule, LandingModule, SharedModule, RouterModule,
CiteThisModule, PagingModule, IFrameModule,
MetricsModule, AltMetricsModule, ConfigurationServiceModule, Schema2jsonldModule, SEOServiceModule,
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule, AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule
DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule, AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule
],
declarations: [
ResultLandingComponent

View File

@ -57,34 +57,6 @@
</div>
<hr *ngIf="result.websiteURL && promoteWebsiteURL">
</div>
<!-- Download from-->
<div *ngIf="result.hostedBy_collectedFrom && result.hostedBy_collectedFrom.length > 0"
class="uk-margin-small-bottom download-from">
<div *ngFor="let from of result.hostedBy_collectedFrom">
<span class="uk-margin-right uk-display-inline-block">
<span class="uk-text-muted">Download from: </span>
<a *ngIf="from.downloadUrl && from.downloadUrl.length === 1"
[href]="from.downloadUrl[0]" target="_blank" class="title">
{{from.downloadName}}
<span class="custom-external space"></span>
</a>
<span *ngIf="!from.downloadUrl || from.downloadUrl.length === 0" class="title">
{{from.downloadName}}
</span>
</span>
<span class="provider uk-display-inline-block">
<span class="uk-text-muted">Provider: </span>
<a *ngIf="from.collectedId" routerLink="/search/dataprovider" [queryParams]="{datasourceId: from.collectedId}"
[href]="from.downloadUrl[0]" target="_blank">
{{from.collectedName}}
<span class="custom-external space"></span>
</a>
<span *ngIf="!from.collectedId">
{{from.collectedName}}
</span>
</span>
</div>
</div>
<!-- Authors -->
<div *ngIf="result.authors">
<showAuthors [authors]="result.authors" [authorsLimit]=10 [modal]="modal" [showAll]=false></showAuthors>
@ -163,7 +135,7 @@
{{' '}}
</div>
<!-- Identifiers -->
<div *ngIf="result.identifiers && result.identifiers.size > 0">
<div *ngIf="result.identifiers && result.identifiers.size > 0" class="uk-margin-bottom">
<showIdentifiers [identifiers]="result.identifiers" [properties]="properties"></showIdentifiers>
</div>
<!-- Publisher -->
@ -255,6 +227,34 @@
{{result.description}}
</p>
</div>
<!-- Download from-->
<div *ngIf="result.hostedBy_collectedFrom && result.hostedBy_collectedFrom.length > 0"
class="uk-margin-small-bottom download-from">
<div *ngFor="let from of result.hostedBy_collectedFrom">
<span class="uk-margin-right uk-display-inline-block">
<span class="uk-text-muted">Download from: </span>
<a *ngIf="from.downloadUrl && from.downloadUrl.length === 1"
[href]="from.downloadUrl[0]" target="_blank" class="title">
{{from.downloadName}}
<span class="custom-external space"></span>
</a>
<span *ngIf="!from.downloadUrl || from.downloadUrl.length === 0" class="title">
{{from.downloadName}}
</span>
</span>
<span class="provider uk-display-inline-block">
<span class="uk-text-muted">Provider: </span>
<a *ngIf="from.collectedId" routerLink="/search/dataprovider" [queryParams]="{datasourceId: from.collectedId}"
[href]="from.downloadUrl[0]" target="_blank">
{{from.collectedName}}
<span class="custom-external space"></span>
</a>
<span *ngIf="!from.collectedId">
{{from.collectedName}}
</span>
</span>
</div>
</div>
<div>
<!-- Impact Factors-->
<span *ngIf="result.pop_inf && result.DOI" class="uk-flex uk-flex-middle">

View File

@ -15,7 +15,7 @@ import { TabComponent } from './tab.component';
@Component({
selector: 'my-tabs',
template: `
<ul uk-tab class="uk-tab uk-text-truncate main-tabs uk-margin-remove uk-child-width-expand" uk-switcher="connect: .main-tabs-content">
<ul uk-tab class="uk-tab main-tabs uk-margin-remove uk-child-width-expand" uk-switcher="connect: .main-tabs-content">
<!-- + (tab.active ? ' uk-active' : '')-->
<li *ngFor="let tab of tabs" (click)="selectTab(tab)" [class.active]="tab.active" [class]="'uk-padding-remove '+(tab.statistics ? ' statistics ' : '')">
<a class="uk-width-1-1 uk-height-1-1">