Publication & Dataset & Software landing: common components for fundedBy and PublishedIn sections of Appbox
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@49656 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
c153b060eb
commit
4f8f6a77fd
|
@ -242,106 +242,10 @@
|
|||
</dl>
|
||||
</li>
|
||||
<li *ngIf="datasetInfo.publishedIn && datasetInfo.publishedIn.size > 0">
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Published in</dt>
|
||||
<dd class="line" *ngFor="let key of datasetInfo.publishedIn.keys() let i=index">
|
||||
<div *ngIf="i<5 || showAllPublishedIn" class="{{datasetInfo.publishedIn.get(key)['bestAccessMode']}}">
|
||||
<span [class]="datasetInfo.publishedIn.get(key)['url'].length > 0 ? 'custom-external custom-icon' : ''">
|
||||
<span *ngIf="datasetInfo.publishedIn.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of datasetInfo.publishedIn.get(key)['url']; let i=index">
|
||||
<a href="{{url}}" target="_blank"
|
||||
[attr.uk-tooltip]="datasetInfo.publishedIn.get(key)['accessMode'][i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="datasetInfo.publishedIn.get(key)['accessMode'][i]">
|
||||
[{{i+1}}]
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
<a *ngIf="datasetInfo.publishedIn.get(key)['url'].length == 1"
|
||||
href="{{datasetInfo.publishedIn.get(key)['url']}}"
|
||||
target="_blank"
|
||||
[attr.uk-tooltip]="datasetInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="datasetInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</a>
|
||||
<span *ngIf="datasetInfo.publishedIn.get(key)['url'].length == 0"
|
||||
[attr.uk-tooltip]="datasetInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="datasetInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllPublishedIn" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && datasetInfo.publishedIn.size > 5">...</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && datasetInfo.publishedIn.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<publishedIn [publishedIn]="datasetInfo.publishedIn"></publishedIn>
|
||||
</li>
|
||||
<li *ngIf="datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 0">
|
||||
<dl class="uk-description-list-line" >
|
||||
<dt class="title">Funded By</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<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>
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</a>
|
||||
|
||||
<span class="clickable" *ngIf="!item['inline'] && !item.id">
|
||||
<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>
|
||||
|
||||
<span class="clickable" *ngIf="item['inline'] && !item.id">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</span>
|
||||
|
||||
<span class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllFundedBy" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects && datasetInfo.fundedByProjects.length > 5">...</dd>
|
||||
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects && datasetInfo.fundedByProjects.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<fundedBy [fundedByProjects]="datasetInfo.fundedByProjects"></fundedBy>
|
||||
</li>
|
||||
|
||||
<li *ngIf="datasetInfo.contexts && datasetInfo.contexts.length >0 ">
|
||||
|
|
|
@ -21,7 +21,6 @@ export class DatasetComponent {
|
|||
public showAllCollectedFrom: boolean = false;
|
||||
public showAllDownloadFrom: boolean = false;
|
||||
public showAllPublishedIn: boolean = false;
|
||||
public showAllFundedBy: boolean = false;
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
|
@ -167,54 +166,4 @@ export class DatasetComponent {
|
|||
|
||||
return tooltipContent;
|
||||
}
|
||||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "provenanceAction":string, "inline": boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light uk-padding-small'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "<div>Project Code: "+item.code + "</div>";
|
||||
}
|
||||
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
if(item.funderName && item.funderShortname) {
|
||||
tooltipContent += item.funderName + " ("+ item.funderShortname +")";
|
||||
} else if(item.funderName) {
|
||||
tooltipContent += item.funderName;
|
||||
} else {
|
||||
tooltipContent += item.funderShortname;
|
||||
}
|
||||
|
||||
tooltipContent += "</div>";
|
||||
}
|
||||
|
||||
if(item.funding) {
|
||||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "</p>";
|
||||
}
|
||||
|
||||
if(item.provenanceAction == 'Repository') {
|
||||
tooltipContent += "Provided by Repository";
|
||||
} else if(item.provenanceAction == 'Algorithm') {
|
||||
tooltipContent += "Inferred by Algorithm";
|
||||
} else if(item.provenanceAction == 'USer') {
|
||||
tooltipContent += "Claimed by User";
|
||||
}
|
||||
|
||||
tooltipContent+="</div>"
|
||||
return tooltipContent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
import {Component, Input, ElementRef} from '@angular/core';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'fundedBy',
|
||||
template: `
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Funded By</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let item of fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAll">
|
||||
<span uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<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>
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</a>
|
||||
|
||||
<span class="clickable" *ngIf="!item['inline'] && !item.id">
|
||||
<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>
|
||||
|
||||
<span class="clickable" *ngIf="item['inline'] && !item.id">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</span>
|
||||
|
||||
<span class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAll" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAll = !showAll; scroll()">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAll && fundedByProjects && fundedByProjects.length > 5">...</dd>
|
||||
<dd *ngIf="!showAll && fundedByProjects && fundedByProjects.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAll = !showAll;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
`
|
||||
})
|
||||
|
||||
export class FundedByComponent {
|
||||
@Input() fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "provenanceAction": string,
|
||||
"inline": boolean }[];
|
||||
public showAll: boolean = false;
|
||||
|
||||
constructor (private element: ElementRef) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "provenanceAction": string, inline: boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light uk-padding-small'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "<div>Project Code: "+item.code+"</div>";
|
||||
}
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
if(item.funderName && item.funderShortname) {
|
||||
tooltipContent += item.funderName + " ("+ item.funderShortname +")";
|
||||
} else if(item.funderName) {
|
||||
tooltipContent += item.funderName;
|
||||
} else {
|
||||
tooltipContent += item.funderShortname;
|
||||
}
|
||||
tooltipContent += "</div>";
|
||||
}
|
||||
|
||||
if(item.funding) {
|
||||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "</p>";
|
||||
}
|
||||
|
||||
if(item.provenanceAction == 'Repository') {
|
||||
tooltipContent += "Provided by Repository";
|
||||
} else if(item.provenanceAction == 'Algorithm') {
|
||||
tooltipContent += "Inferred by Algorithm";
|
||||
} else if(item.provenanceAction == 'USer') {
|
||||
tooltipContent += "Claimed by User";
|
||||
}
|
||||
|
||||
tooltipContent+="</div>"
|
||||
return tooltipContent;
|
||||
}
|
||||
|
||||
public scroll() {
|
||||
console.info("scroll into view");
|
||||
if (typeof document !== 'undefined') {
|
||||
this.element.nativeElement.scrollIntoView();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
import {Component, Input, ElementRef} from '@angular/core';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'publishedIn',
|
||||
template: `
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Published in</dt>
|
||||
<dd class="line" *ngFor="let key of publishedIn.keys() let i=index">
|
||||
<div *ngIf="i<5 || showAll" class="{{publishedIn.get(key)['bestAccessMode']}}">
|
||||
<span [class]="publishedIn.get(key)['url'].length > 0 ? 'custom-external custom-icon' : ''">
|
||||
<span *ngIf="publishedIn.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of publishedIn.get(key)['url']; let i=index">
|
||||
<a href="{{url}}" target="_blank"
|
||||
[attr.uk-tooltip]="publishedIn.get(key)['accessMode'][i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publishedIn.get(key)['accessMode'][i]">
|
||||
[{{i+1}}]
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
<a *ngIf="publishedIn.get(key)['url'].length == 1"
|
||||
href="{{publishedIn.get(key)['url']}}"
|
||||
target="_blank"
|
||||
[attr.uk-tooltip]="publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</a>
|
||||
<span *ngIf="publishedIn.get(key)['url'].length == 0"
|
||||
[attr.uk-tooltip]="publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAll" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAll = !showAll; scroll()">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAll && publishedIn.size > 5">...</dd>
|
||||
<dd *ngIf="!showAll && publishedIn.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAll = !showAll;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
`
|
||||
})
|
||||
|
||||
export class PublishedInComponent {
|
||||
//key is name
|
||||
@Input() publishedIn: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>;
|
||||
|
||||
public showAll: boolean = false;
|
||||
|
||||
constructor (private element: ElementRef) {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
public scroll() {
|
||||
console.info("scroll into view");
|
||||
if (typeof document !== 'undefined') {
|
||||
this.element.nativeElement.scrollIntoView();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,8 @@ import {PagingModule} from '../../utils/paging.module';
|
|||
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||
import {ShowIdentifiersComponent} from './showIdentifiers.component';
|
||||
import {ShowSubjectsComponent} from './showSubjects.component';
|
||||
import {FundedByComponent} from './fundedBy.component';
|
||||
import {PublishedInComponent} from './publishedIn.component';
|
||||
import {TabTableComponent} from './tabTable.component';
|
||||
|
||||
@NgModule({
|
||||
|
@ -15,12 +17,12 @@ import {TabTableComponent} from './tabTable.component';
|
|||
CommonModule, FormsModule, RouterModule, PagingModule
|
||||
],
|
||||
declarations: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,FundedByComponent,PublishedInComponent,TabTableComponent
|
||||
],
|
||||
providers:[
|
||||
],
|
||||
exports: [
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent
|
||||
ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,FundedByComponent,PublishedInComponent,TabTableComponent
|
||||
]
|
||||
})
|
||||
export class ResultLandingModule { }
|
||||
|
|
|
@ -488,107 +488,10 @@
|
|||
</dl>
|
||||
</li>
|
||||
<li *ngIf="publicationInfo.publishedIn && publicationInfo.publishedIn.size > 0">
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Published in</dt>
|
||||
<dd class="line" *ngFor="let key of publicationInfo.publishedIn.keys() let i=index">
|
||||
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
|
||||
<span [class]="publicationInfo.publishedIn.get(key)['url'].length > 0 ? 'custom-external custom-icon' : ''">
|
||||
<span *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
|
||||
<a href="{{url}}" target="_blank"
|
||||
[attr.uk-tooltip]="publicationInfo.publishedIn.get(key)['accessMode'][i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publicationInfo.publishedIn.get(key)['accessMode'][i]">
|
||||
[{{i+1}}]
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
<a *ngIf="publicationInfo.publishedIn.get(key)['url'].length == 1"
|
||||
href="{{publicationInfo.publishedIn.get(key)['url']}}"
|
||||
target="_blank"
|
||||
[attr.uk-tooltip]="publicationInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publicationInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</a>
|
||||
<span *ngIf="publicationInfo.publishedIn.get(key)['url'].length == 0"
|
||||
[attr.uk-tooltip]="publicationInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="publicationInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllPublishedIn" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && publicationInfo.publishedIn.size > 5">...</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && publicationInfo.publishedIn.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<publishedIn [publishedIn]="publicationInfo.publishedIn"></publishedIn>
|
||||
</li>
|
||||
<li *ngIf="publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 0">
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Funded By</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<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>
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</a>
|
||||
|
||||
<span class="clickable" *ngIf="!item['inline'] && !item.id">
|
||||
<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>
|
||||
|
||||
<span class="clickable" *ngIf="item['inline'] && !item.id">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</span>
|
||||
|
||||
<span class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllFundedBy" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects && publicationInfo.fundedByProjects.length > 5">...</dd>
|
||||
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects && publicationInfo.fundedByProjects.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<fundedBy [fundedByProjects]="publicationInfo.fundedByProjects"></fundedBy>
|
||||
</li>
|
||||
|
||||
<li *ngIf="publicationInfo.contexts && publicationInfo.contexts.length >0 ">
|
||||
|
|
|
@ -24,8 +24,6 @@ export class PublicationComponent {
|
|||
// APP BOX variables
|
||||
public showAllCollectedFrom: boolean = false;
|
||||
public showAllDownloadFrom: boolean = false;
|
||||
public showAllFundedBy: boolean = false;
|
||||
public showAllPublishedIn: boolean = false;
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
|
@ -199,53 +197,6 @@ export class PublicationComponent {
|
|||
return tooltipContent+= "</div>";
|
||||
}
|
||||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "provenanceAction": string, inline: boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light uk-padding-small'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "<div>Project Code: "+item.code+"</div>";
|
||||
}
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
if(item.funderName && item.funderShortname) {
|
||||
tooltipContent += item.funderName + " ("+ item.funderShortname +")";
|
||||
} else if(item.funderName) {
|
||||
tooltipContent += item.funderName;
|
||||
} else {
|
||||
tooltipContent += item.funderShortname;
|
||||
}
|
||||
tooltipContent += "</div>";
|
||||
}
|
||||
|
||||
if(item.funding) {
|
||||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "</p>";
|
||||
}
|
||||
|
||||
if(item.provenanceAction == 'Repository') {
|
||||
tooltipContent += "Provided by Repository";
|
||||
} else if(item.provenanceAction == 'Algorithm') {
|
||||
tooltipContent += "Inferred by Algorithm";
|
||||
} else if(item.provenanceAction == 'USer') {
|
||||
tooltipContent += "Claimed by User";
|
||||
}
|
||||
|
||||
tooltipContent+="</div>"
|
||||
return tooltipContent;
|
||||
}
|
||||
private updateDescription(description:string){
|
||||
this._meta.updateMeta("description", description);
|
||||
this._meta.updateProperty("og:description", description);
|
||||
|
|
|
@ -242,106 +242,10 @@
|
|||
</dl>
|
||||
</li>
|
||||
<li *ngIf="softwareInfo.publishedIn && softwareInfo.publishedIn.size > 0">
|
||||
<dl class="uk-description-list-line">
|
||||
<dt class="title">Published in</dt>
|
||||
<dd class="line" *ngFor="let key of softwareInfo.publishedIn.keys() let i=index">
|
||||
<div *ngIf="i<5 || showAllPublishedIn" class="{{softwareInfo.publishedIn.get(key)['bestAccessMode']}}">
|
||||
<span [class]="softwareInfo.publishedIn.get(key)['url'].length > 0 ? 'custom-external custom-icon' : ''">
|
||||
<span *ngIf="softwareInfo.publishedIn.get(key)['url'].length > 1">
|
||||
{{key}}
|
||||
<span *ngFor="let url of softwareInfo.publishedIn.get(key)['url']; let i=index">
|
||||
<a href="{{url}}" target="_blank"
|
||||
[attr.uk-tooltip]="softwareInfo.publishedIn.get(key)['accessMode'][i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="softwareInfo.publishedIn.get(key)['accessMode'][i]">
|
||||
[{{i+1}}]
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
<a *ngIf="softwareInfo.publishedIn.get(key)['url'].length == 1"
|
||||
href="{{softwareInfo.publishedIn.get(key)['url']}}"
|
||||
target="_blank"
|
||||
[attr.uk-tooltip]="softwareInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="softwareInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</a>
|
||||
<span *ngIf="softwareInfo.publishedIn.get(key)['url'].length == 0"
|
||||
[attr.uk-tooltip]="softwareInfo.publishedIn.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="softwareInfo.publishedIn.get(key)['bestAccessMode']">
|
||||
{{key}}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllPublishedIn" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && softwareInfo.publishedIn.size > 5">...</dd>
|
||||
<dd *ngIf="!showAllPublishedIn && softwareInfo.publishedIn.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllPublishedIn = !showAllPublishedIn;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<publishedIn [publishedIn]="softwareInfo.publishedIn"></publishedIn>
|
||||
</li>
|
||||
<li *ngIf="softwareInfo.fundedByProjects != undefined && softwareInfo.fundedByProjects.length > 0">
|
||||
<dl class="uk-description-list-line" >
|
||||
<dt class="title">Funded By</dt>
|
||||
<dd class="line"
|
||||
*ngFor="let item of softwareInfo.fundedByProjects let i=index">
|
||||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<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>
|
||||
</a>
|
||||
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</a>
|
||||
|
||||
<span class="clickable" *ngIf="!item['inline'] && !item.id">
|
||||
<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>
|
||||
|
||||
<span class="clickable" *ngIf="item['inline'] && !item.id">
|
||||
<mark>
|
||||
<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>
|
||||
</mark>
|
||||
</span>
|
||||
|
||||
<span class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dd *ngIf="showAllFundedBy" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View less
|
||||
</a>
|
||||
</dd>
|
||||
<dd *ngIf="!showAllFundedBy && softwareInfo.fundedByProjects && softwareInfo.fundedByProjects.length > 5">...</dd>
|
||||
<dd *ngIf="!showAllFundedBy && softwareInfo.fundedByProjects && softwareInfo.fundedByProjects.length > 5" class="uk-text-right">
|
||||
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
|
||||
View more
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<fundedBy [fundedByProjects]="softwareInfo.fundedByProjects"></fundedBy>
|
||||
</li>
|
||||
|
||||
<li *ngIf="softwareInfo.contexts && softwareInfo.contexts.length >0 ">
|
||||
|
|
|
@ -21,7 +21,6 @@ export class SoftwareComponent {
|
|||
public showAllCollectedFrom: boolean = false;
|
||||
public showAllDownloadFrom: boolean = false;
|
||||
public showAllPublishedIn: boolean = false;
|
||||
public showAllFundedBy: boolean = false;
|
||||
|
||||
// Metrics tab variables
|
||||
public metricsClicked: boolean;
|
||||
|
@ -167,54 +166,4 @@ export class SoftwareComponent {
|
|||
|
||||
return tooltipContent;
|
||||
}
|
||||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "provenanceAction":string, "inline": boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light uk-padding-small'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "<div>Project Code: "+item.code + "</div>";
|
||||
}
|
||||
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
if(item.funderName && item.funderShortname) {
|
||||
tooltipContent += item.funderName + " ("+ item.funderShortname +")";
|
||||
} else if(item.funderName) {
|
||||
tooltipContent += item.funderName;
|
||||
} else {
|
||||
tooltipContent += item.funderShortname;
|
||||
}
|
||||
|
||||
tooltipContent += "</div>";
|
||||
}
|
||||
|
||||
if(item.funding) {
|
||||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "</p>";
|
||||
}
|
||||
|
||||
if(item.provenanceAction == 'Repository') {
|
||||
tooltipContent += "Provided by Repository";
|
||||
} else if(item.provenanceAction == 'Algorithm') {
|
||||
tooltipContent += "Inferred by Algorithm";
|
||||
} else if(item.provenanceAction == 'USer') {
|
||||
tooltipContent += "Claimed by User";
|
||||
}
|
||||
|
||||
tooltipContent+="</div>"
|
||||
return tooltipContent;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue