Fixing uk-progress-bar and tooltip after uikit upgrade
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47144 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
8bb6790e2c
commit
941b3640f2
|
@ -16,7 +16,7 @@
|
||||||
</h3-->
|
</h3-->
|
||||||
<showTitle [title]="dataProviderInfo.title"></showTitle>
|
<showTitle [title]="dataProviderInfo.title"></showTitle>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">Type: </dt>
|
<dt *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">Type: </dt>
|
||||||
<dd *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">{{dataProviderInfo.type}}</dd>
|
<dd *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">{{dataProviderInfo.type}}</dd>
|
||||||
<dt *ngIf="dataProviderInfo.compatibility != undefined && dataProviderInfo.compatibility != ''">Compatibility: </dt>
|
<dt *ngIf="dataProviderInfo.compatibility != undefined && dataProviderInfo.compatibility != ''">Compatibility: </dt>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<showTitle [title]="datasetInfo.title"></showTitle>
|
<showTitle [title]="datasetInfo.title"></showTitle>
|
||||||
|
|
||||||
<div *ngIf="datasetInfo.underCurationMessage">
|
<div *ngIf="datasetInfo.underCurationMessage">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="pos:right; delay:10"
|
||||||
title="{{buildCurationTooltip()}}">
|
title="{{buildCurationTooltip()}}">
|
||||||
<i>Record in preview</i>
|
<i>Record in preview</i>
|
||||||
<i class="uk-icon-info-circle"></i>
|
<i class="uk-icon-info-circle"></i>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<span *ngIf="datasetInfo.date != ''">({{datasetInfo.date}})</span>
|
<span *ngIf="datasetInfo.date != ''">({{datasetInfo.date}})</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt>
|
<dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt>
|
||||||
<dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd>
|
<dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd>
|
||||||
<dt *ngIf="datasetInfo.type != undefined"> Type: </dt>
|
<dt *ngIf="datasetInfo.type != undefined"> Type: </dt>
|
||||||
|
@ -131,11 +131,11 @@
|
||||||
<dt class="title">Download from</dt>
|
<dt class="title">Download from</dt>
|
||||||
<dd class="line"
|
<dd class="line"
|
||||||
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index"
|
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index"
|
||||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
>
|
||||||
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
|
||||||
<div *ngIf="i<5 || showAllDownloadFrom"
|
<div *ngIf="i<5 || showAllDownloadFrom"
|
||||||
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
||||||
<span class="uk-icon-external-link custom-icon">
|
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||||
|
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
||||||
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
|
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
|
||||||
{{key}}
|
{{key}}
|
||||||
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
|
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
<dd class="line"
|
<dd class="line"
|
||||||
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
*ngFor="let item of datasetInfo.fundedByProjects let i=index">
|
||||||
<div *ngIf="i<5 || showAllFundedBy">
|
<div *ngIf="i<5 || showAllFundedBy">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="pos:right; delay:10"
|
||||||
title="{{buildFundingTooltip(item)}}">
|
title="{{buildFundingTooltip(item)}}">
|
||||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||||
<a *ngIf="!item['inline']"
|
<a *ngIf="!item['inline']"
|
||||||
|
|
|
@ -161,23 +161,23 @@ export class DatasetService {
|
||||||
if(this.datasetInfo.relatedResearchResults == undefined) {
|
if(this.datasetInfo.relatedResearchResults == undefined) {
|
||||||
this.datasetInfo.relatedResearchResults = new Array<{
|
this.datasetInfo.relatedResearchResults = new Array<{
|
||||||
"name": string, "id": string, "date": string,
|
"name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>();
|
"trust": number, "class": string}>();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if(this.datasetInfo.relatedResearchResults == undefined) {
|
if(this.datasetInfo.relatedResearchResults == undefined) {
|
||||||
this.datasetInfo.relatedResearchResults =
|
this.datasetInfo.relatedResearchResults =
|
||||||
new Map<string, { "name": string, "id": string, "date": string,
|
new Map<string, { "name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}[]>();
|
"trust": number, "class": string}[]>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.datasetInfo.relatedResearchResults.has(provenanceAction)) {
|
if(!this.datasetInfo.relatedResearchResults.has(provenanceAction)) {
|
||||||
this.datasetInfo.relatedResearchResults.set(provenanceAction,
|
this.datasetInfo.relatedResearchResults.set(provenanceAction,
|
||||||
new Array<{ "name": string, "id": string, "date": string,
|
new Array<{ "name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>());
|
"trust": number, "class": string}>());
|
||||||
}
|
}
|
||||||
|
|
||||||
counter = this.datasetInfo.relatedResearchResults.get(provenanceAction).length;
|
counter = this.datasetInfo.relatedResearchResults.get(provenanceAction).length;
|
||||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||||
|
|
||||||
//let url;
|
//let url;
|
||||||
if(mydata['resulttype'].classname == "publication") {
|
if(mydata['resulttype'].classname == "publication") {
|
||||||
|
@ -193,17 +193,17 @@ export class DatasetService {
|
||||||
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
||||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
||||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
||||||
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(mydata.trust*100)+"%";
|
this.datasetInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(mydata.trust*100);
|
||||||
|
|
||||||
} else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") {
|
} else if(mydata['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||||
if(this.datasetInfo.similarResearchResults == undefined) {
|
if(this.datasetInfo.similarResearchResults == undefined) {
|
||||||
this.datasetInfo.similarResearchResults = new Array<{
|
this.datasetInfo.similarResearchResults = new Array<{
|
||||||
"name": string, "id": string, "date": string,
|
"name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>();
|
"trust": number, "class": string}>();
|
||||||
}
|
}
|
||||||
|
|
||||||
counter = this.datasetInfo.similarResearchResults.length;
|
counter = this.datasetInfo.similarResearchResults.length;
|
||||||
this.datasetInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
this.datasetInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||||
|
|
||||||
//let url;
|
//let url;
|
||||||
if(mydata['resulttype'].classname == "publication") {
|
if(mydata['resulttype'].classname == "publication") {
|
||||||
|
@ -219,7 +219,7 @@ export class DatasetService {
|
||||||
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
let titleName = Array.isArray(mydata['title']) ? mydata['title'][0].content : mydata['title'].content;
|
||||||
this.datasetInfo.similarResearchResults[counter]['name'] = titleName;
|
this.datasetInfo.similarResearchResults[counter]['name'] = titleName;
|
||||||
this.datasetInfo.similarResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
this.datasetInfo.similarResearchResults[counter]['date'] = mydata.dateofacceptance.substring(0,4);;
|
||||||
this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100)+"%";
|
this.datasetInfo.similarResearchResults[counter]['trust'] = Math.round(mydata.trust*100);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<showTitle [title]="organizationInfo.title"></showTitle>
|
<showTitle [title]="organizationInfo.title"></showTitle>
|
||||||
|
|
||||||
<!--div class="uk-width-2-3" *ngIf="organizationInfo != null"-->
|
<!--div class="uk-width-2-3" *ngIf="organizationInfo != null"-->
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt>
|
<dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt>
|
||||||
<dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd>
|
<dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd>
|
||||||
<dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt>
|
<dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||||
<h2>{{personInfo.fullname}}</h2>
|
<h2>{{personInfo.fullname}}</h2>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">Last name: </dt>
|
<dt *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">Last name: </dt>
|
||||||
<dd *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">{{personInfo.secondnames}}</dd>
|
<dd *ngIf="personInfo.secondnames != undefined && personInfo.secondnames != ''">{{personInfo.secondnames}}</dd>
|
||||||
<dt *ngIf="personInfo.firstname != undefined && personInfo.firstname != ''">First name: </dt>
|
<dt *ngIf="personInfo.firstname != undefined && personInfo.firstname != ''">First name: </dt>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<h2 *ngIf="projectInfo.specialClause39!=true">{{projectName}}</h2>
|
<h2 *ngIf="projectInfo.specialClause39!=true">{{projectName}}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
|
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt>
|
||||||
<dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd>
|
<dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd>
|
||||||
<dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt>
|
<dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<showTitle [title]="publicationInfo.title"></showTitle>
|
<showTitle [title]="publicationInfo.title"></showTitle>
|
||||||
|
|
||||||
<div *ngIf="publicationInfo.underCurationMessage">
|
<div *ngIf="publicationInfo.underCurationMessage">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="pos:right; delay:10"
|
||||||
title="{{buildCurationTooltip()}}">
|
title="{{buildCurationTooltip()}}">
|
||||||
<i>Record in preview</i>
|
<i>Record in preview</i>
|
||||||
<i class="uk-icon-info-circle"></i>
|
<i class="uk-icon-info-circle"></i>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
|
<span *ngIf="publicationInfo.date != ''">({{publicationInfo.date}})</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<dl class="uk-description-list-horizontal custom-description-list-horizontal">
|
<dl class="uk-description-list">
|
||||||
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt>
|
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt>
|
||||||
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd>
|
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd>
|
||||||
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt>
|
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt>
|
||||||
|
@ -228,11 +228,9 @@
|
||||||
<div *ngIf="organization.country != undefined && organization.country != ''">Country: {{organization.country}}</div>
|
<div *ngIf="organization.country != undefined && organization.country != ''">Country: {{organization.country}}</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="organization['trust'] != undefined && organization['trust'] != ''"
|
<div *ngIf="organization['trust'] != undefined && organization['trust'] != ''" title="{{organization['trust']}}%" >
|
||||||
class="uk-progress uk-progress-warning">
|
<div class="uk-text-center">{{organization['trust']}}%</div>
|
||||||
<div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "organization['trust']">
|
<progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress>
|
||||||
{{organization['trust']}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="organization['trust'] == undefined || organization['trust'] == ''">
|
<div *ngIf="organization['trust'] == undefined || organization['trust'] == ''">
|
||||||
<p>no trust found</p>
|
<p>no trust found</p>
|
||||||
|
@ -326,12 +324,11 @@
|
||||||
<dl class="uk-description-list-line">
|
<dl class="uk-description-list-line">
|
||||||
<dt class="title">Download from</dt>
|
<dt class="title">Download from</dt>
|
||||||
<dd class="line"
|
<dd class="line"
|
||||||
*ngFor="let key of publicationInfo.downloadFrom.keys() let i=index"
|
*ngFor="let key of publicationInfo.downloadFrom.keys() let i=index" >
|
||||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
|
||||||
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
|
|
||||||
<div *ngIf="i<5 || showAllDownloadFrom"
|
<div *ngIf="i<5 || showAllDownloadFrom"
|
||||||
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
||||||
<span class="uk-icon-external-link custom-icon">
|
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||||
|
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
|
||||||
<div *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
|
<div *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
|
||||||
{{key}}
|
{{key}}
|
||||||
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
|
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
|
||||||
|
@ -365,10 +362,10 @@
|
||||||
<dl class="uk-description-list-line">
|
<dl class="uk-description-list-line">
|
||||||
<dt class="title">Published in</dt>
|
<dt class="title">Published in</dt>
|
||||||
<dd class="line" *ngFor="let key of publicationInfo.publishedIn.keys() let i=index"
|
<dd class="line" *ngFor="let key of publicationInfo.publishedIn.keys() let i=index"
|
||||||
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
>
|
||||||
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
|
|
||||||
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
|
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
|
||||||
<span class="uk-icon-external-link custom-icon">
|
<span class="uk-icon-external-link custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||||
|
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
|
||||||
<div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
|
<div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
|
||||||
{{key}}
|
{{key}}
|
||||||
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
|
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
|
||||||
|
@ -406,8 +403,8 @@
|
||||||
<dd class="line"
|
<dd class="line"
|
||||||
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
*ngFor="let item of publicationInfo.fundedByProjects let i=index">
|
||||||
<div *ngIf="i<5 || showAllFundedBy">
|
<div *ngIf="i<5 || showAllFundedBy">
|
||||||
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
|
<span data-uk-tooltip="pos:right; delay:10"
|
||||||
title="{{buildFundingTooltip(item)}}">
|
title="{{buildFundingTooltip(item)}}" >
|
||||||
|
|
||||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||||
<a *ngIf="!item['inline'] && item.id"
|
<a *ngIf="!item['inline'] && item.id"
|
||||||
|
|
|
@ -171,24 +171,24 @@ export class PublicationService {
|
||||||
if(this.publicationInfo.relatedResearchResults == undefined) {
|
if(this.publicationInfo.relatedResearchResults == undefined) {
|
||||||
this.publicationInfo.relatedResearchResults =
|
this.publicationInfo.relatedResearchResults =
|
||||||
new Map<string, { "name": string, "id": string, "date": string,
|
new Map<string, { "name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}[]>();
|
"trust": number, "class": string}[]>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!this.publicationInfo.relatedResearchResults.has(provenanceAction)) {
|
if(!this.publicationInfo.relatedResearchResults.has(provenanceAction)) {
|
||||||
this.publicationInfo.relatedResearchResults.set(provenanceAction,
|
this.publicationInfo.relatedResearchResults.set(provenanceAction,
|
||||||
new Array<{ "name": string, "id": string, "date": string,
|
new Array<{ "name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>());
|
"trust": number, "class": string}>());
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if(this.publicationInfo.relatedResearchResults == undefined) {
|
if(this.publicationInfo.relatedResearchResults == undefined) {
|
||||||
this.publicationInfo.relatedResearchResults = new Array<{
|
this.publicationInfo.relatedResearchResults = new Array<{
|
||||||
"name": string, "id": string, "date": string,
|
"name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>();
|
"trust": number, "class": string}>();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
counter = this.publicationInfo.relatedResearchResults.get(provenanceAction).length;
|
counter = this.publicationInfo.relatedResearchResults.get(provenanceAction).length;
|
||||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||||
|
|
||||||
//let url;
|
//let url;
|
||||||
if(relation['resulttype'].classname == "publication") {
|
if(relation['resulttype'].classname == "publication") {
|
||||||
|
@ -204,17 +204,17 @@ export class PublicationService {
|
||||||
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
||||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['name'] = titleName;
|
||||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
||||||
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(relation.trust*100)+"%";
|
this.publicationInfo.relatedResearchResults.get(provenanceAction)[counter]['trust'] = Math.round(relation.trust*100);
|
||||||
|
|
||||||
} else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
|
} else if(relation['to'].class == "hasAmongTopNSimilarDocuments") {
|
||||||
if(this.publicationInfo.similarResearchResults == undefined) {
|
if(this.publicationInfo.similarResearchResults == undefined) {
|
||||||
this.publicationInfo.similarResearchResults = new Array<{
|
this.publicationInfo.similarResearchResults = new Array<{
|
||||||
"name": string, "id": string, "date": string,
|
"name": string, "id": string, "date": string,
|
||||||
"trust": string, "class": string}>();
|
"trust": number, "class": string}>();
|
||||||
}
|
}
|
||||||
|
|
||||||
counter = this.publicationInfo.similarResearchResults.length;
|
counter = this.publicationInfo.similarResearchResults.length;
|
||||||
this.publicationInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": "", "class": ""}
|
this.publicationInfo.similarResearchResults[counter] = {"name": "", "id": "", "date": "", "trust": null, "class": ""}
|
||||||
|
|
||||||
//let url;
|
//let url;
|
||||||
if(relation['resulttype'].classname == "publication") {
|
if(relation['resulttype'].classname == "publication") {
|
||||||
|
@ -230,23 +230,23 @@ export class PublicationService {
|
||||||
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
let titleName = Array.isArray(relation['title']) ? relation['title'][0].content : relation['title'].content;
|
||||||
this.publicationInfo.similarResearchResults[counter]['name'] = titleName;
|
this.publicationInfo.similarResearchResults[counter]['name'] = titleName;
|
||||||
this.publicationInfo.similarResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
this.publicationInfo.similarResearchResults[counter]['date'] = relation.dateofacceptance.substring(0,4);;
|
||||||
this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100)+"%";
|
this.publicationInfo.similarResearchResults[counter]['trust'] = Math.round(relation.trust*100);
|
||||||
} else if(relation['to'].class == "hasAuthorInstitution") {
|
} else if(relation['to'].class == "hasAuthorInstitution") {
|
||||||
if(this.publicationInfo.organizations == undefined) {
|
if(this.publicationInfo.organizations == undefined) {
|
||||||
this.publicationInfo.organizations = new Array<{
|
this.publicationInfo.organizations = new Array<{
|
||||||
"name": string, "shortname": string,
|
"name": string, "shortname": string,
|
||||||
"id": string, "websiteUrl": string,
|
"id": string, "websiteUrl": string,
|
||||||
"country": string, "trust": string}>();
|
"country": string, "trust": number}>();
|
||||||
}
|
}
|
||||||
|
|
||||||
let organization: {
|
let organization: {
|
||||||
"name": string, "shortname": string,
|
"name": string, "shortname": string,
|
||||||
"id": string, "websiteUrl": string,
|
"id": string, "websiteUrl": string,
|
||||||
"country": string, "trust": string
|
"country": string, "trust": number
|
||||||
} = {
|
} = {
|
||||||
"name": "", "shortname": "",
|
"name": "", "shortname": "",
|
||||||
"id": "", "websiteUrl": "",
|
"id": "", "websiteUrl": "",
|
||||||
"country": "", "trust": ""
|
"country": "", "trust": null
|
||||||
};
|
};
|
||||||
|
|
||||||
organization.id = relation['to'].content;
|
organization.id = relation['to'].content;
|
||||||
|
@ -257,7 +257,7 @@ export class PublicationService {
|
||||||
organization.country = relation.country.classname;
|
organization.country = relation.country.classname;
|
||||||
}
|
}
|
||||||
if(relation.trust) {
|
if(relation.trust) {
|
||||||
organization.trust = Math.round(relation.trust*100)+"%";
|
organization.trust = Math.round(relation.trust*100);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.publicationInfo.organizations.push(organization);
|
this.publicationInfo.organizations.push(organization);
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {Component, Input} from '@angular/core';
|
||||||
<h2 *ngIf="title != undefined">
|
<h2 *ngIf="title != undefined">
|
||||||
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
|
||||||
class="uk-icon-external-link custom-icon {{title['accessMode']}}"
|
class="uk-icon-external-link custom-icon {{title['accessMode']}}"
|
||||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
data-uk-tooltip="pos:bottom-right"
|
||||||
[title]="title['accessMode']">
|
[title]="title['accessMode']">
|
||||||
<a *ngIf="title['name'] != undefined && title['name'] != ''"
|
<a *ngIf="title['name'] != undefined && title['name'] != ''"
|
||||||
href="{{title['url']}}" target="_blank"
|
href="{{title['url']}}" target="_blank"
|
||||||
|
@ -21,14 +21,14 @@ import {Component, Input} from '@angular/core';
|
||||||
<span *ngIf="(title['name'] != undefined && title['name'] != '') &&
|
<span *ngIf="(title['name'] != undefined && title['name'] != '') &&
|
||||||
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
||||||
[class]="title['accessMode']"
|
[class]="title['accessMode']"
|
||||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
data-uk-tooltip="pos:bottom-right"
|
||||||
[title]="title['accessMode']"
|
[title]="title['accessMode']"
|
||||||
[innerHTML]="title['name']">
|
[innerHTML]="title['name']">
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="(title['name'] == undefined || title['name'] == '') &&
|
<span *ngIf="(title['name'] == undefined || title['name'] == '') &&
|
||||||
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
|
||||||
[class]="title['accessMode']"
|
[class]="title['accessMode']"
|
||||||
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
|
data-uk-tooltip="pos:bottom-right"
|
||||||
[title]="title['accessMode']">
|
[title]="title['accessMode']">
|
||||||
[no title available]
|
[no title available]
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Trust</th>
|
<th width="20%">Trust</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -38,14 +38,12 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="item['trust'] != ''" class="uk-progress uk-progress-warning">
|
<div *ngIf="item['trust'] != ''" title="{{item['trust']}}%" >
|
||||||
<div class="uk-progress-bar" role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-valuemax="100" [style.width] = "item['trust']">
|
<div class="uk-text-center">{{item['trust']}}%</div>
|
||||||
{{item['trust']}}
|
<progress class="uk-progress uk-margin-remove" value="{{item['trust']}}" max="100"></progress>
|
||||||
</div>
|
</div>
|
||||||
<!--div class="uk-progress-bar" style="width: 40%;">40%</div-->
|
|
||||||
</div>
|
|
||||||
<div *ngIf="item['trust'] == ''">
|
<div *ngIf="item['trust'] == ''">
|
||||||
<p>no trust found</p>
|
<p>No trust available</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -56,7 +54,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
||||||
})
|
})
|
||||||
|
|
||||||
export class TabTableComponent {
|
export class TabTableComponent {
|
||||||
@Input() info: { "name": string, "url": string, "date": string, "trust": string}[];//Map<string, string[]>;
|
@Input() info: { "name": string, "url": string, "date": string, "trust": number}[];//Map<string, string[]>;
|
||||||
|
|
||||||
public routerHelper:RouterHelper = new RouterHelper();
|
public routerHelper:RouterHelper = new RouterHelper();
|
||||||
public searchLinkToPublication: string;
|
public searchLinkToPublication: string;
|
||||||
|
|
|
@ -25,7 +25,9 @@ export class RefineResultsUtils {
|
||||||
value.name = field[i].name;
|
value.name = field[i].name;
|
||||||
value.number = field[i].count;
|
value.number = field[i].count;
|
||||||
value.id = field[i].id;
|
value.id = field[i].id;
|
||||||
filter.values.push(value);
|
if(RefineResultsUtils.includeValue(value)){
|
||||||
|
filter.values.push(value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
filters.push(filter);
|
filters.push(filter);
|
||||||
|
@ -34,5 +36,11 @@ export class RefineResultsUtils {
|
||||||
}
|
}
|
||||||
return filters;
|
return filters;
|
||||||
}
|
}
|
||||||
|
private static includeValue (field):boolean {
|
||||||
|
if( field.name == "unidentified"){
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class DatasetInfo {
|
||||||
"funderShortname": string, "funderName": string,
|
"funderShortname": string, "funderName": string,
|
||||||
"funding": string, "inline": boolean}[];
|
"funding": string, "inline": boolean}[];
|
||||||
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
||||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": string, "class": string}[]>;
|
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": number, "class": string}[]>;
|
||||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[];
|
||||||
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,14 +23,14 @@ export class PublicationInfo {
|
||||||
"funding": string, "code": string, inline: boolean}[];
|
"funding": string, "code": string, inline: boolean}[];
|
||||||
bioentities: Map<string, Map<string, string>>; //<site name, <>>
|
bioentities: Map<string, Map<string, string>>; //<site name, <>>
|
||||||
software: { "name": string, "url": string}[]; //<site name, <>>
|
software: { "name": string, "url": string}[]; //<site name, <>>
|
||||||
//relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[];
|
//relatedPublications: { "name": string, "url": string, "date": string, "trust": number}[];
|
||||||
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[];
|
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": number}[];
|
||||||
//similarPublications: {"name": string, "url": string, "date": string, "trust": string}[];
|
//similarPublications: {"name": string, "url": string, "date": string, "trust": number}[];
|
||||||
//similarDatasets: {"name": string, "url": string, "date": string, "trust": string}[];
|
//similarDatasets: {"name": string, "url": string, "date": string, "trust": number}[];
|
||||||
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
||||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": string, "class": string}[]>;
|
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": number, "class": string}[]>;
|
||||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": string, "class": string}[];
|
similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[];
|
||||||
references: { "name": string, "url": string}[];
|
references: { "name": string, "url": string}[];
|
||||||
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean}[];
|
||||||
organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": string}[];
|
organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": number}[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,38 @@ export class EntitiesSearchService {
|
||||||
return [{id:'-2',label:'Error'}];;
|
return [{id:'-2',label:'Error'}];;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
searchDataProvidersBySubjects(keyword:string, DepositType:string):any {
|
||||||
|
this.ready = false;
|
||||||
|
console.info("In searchOrganizationsforDeposit");
|
||||||
|
|
||||||
|
let link = OpenaireProperties.getSearchResourcesAPIURL();
|
||||||
|
|
||||||
|
let url = link+"?query=";
|
||||||
|
if(keyword!= null && keyword != '' ) {
|
||||||
|
url += "((oaftype exact datasource and deletedbyinference=false and "+
|
||||||
|
"(reldatasourcecompatibilityid=driver or reldatasourcecompatibilityid=driver-openaire2.0 or reldatasourcecompatibilityid=openaire2.0 or reldatasourcecompatibilityid=openaire3.0 or reldatasourcecompatibilityid=openaire2.0_data or reldatasourcecompatibilityid=hostedBy or relprojectid=*))"+
|
||||||
|
" and (datasourcesubjects all "+'"'+keyword+'") "' +
|
||||||
|
// "and " + this.quote(params) + " " +
|
||||||
|
"and (collectedfrom exact "+StringUtils.quote(StringUtils.URIEncode(DepositType))+")) ";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
url += "&page=0&size=10";
|
||||||
|
url += "&format=json";
|
||||||
|
|
||||||
|
// let url = OpenaireProperties. getSearchAPIURLLast()+"projects?"+((keyword && keyword.length > 0)?("q=" +keyword):"")+((funderId && funderId.length > 0 )?"&fq=funderid exact " + '"'+funderId+ '"':"")+"&size=10&page=0&format=json";
|
||||||
|
return this.http.get(url).toPromise()
|
||||||
|
.then(request =>
|
||||||
|
{
|
||||||
|
request = request.json().results;
|
||||||
|
console.log(request);
|
||||||
|
this.ready = true;
|
||||||
|
return this.parse(request,"oaf:organization","organization");
|
||||||
|
}).catch((ex) => {
|
||||||
|
console.error('An error occured', ex);
|
||||||
|
return [{id:'-2',label:'Error'}];;
|
||||||
|
});
|
||||||
|
}
|
||||||
searchByType(keyword:string,type:string){
|
searchByType(keyword:string,type:string){
|
||||||
if (type == "project"){
|
if (type == "project"){
|
||||||
return this.searchEntity(keyword,"projects","oaf:project","project");
|
return this.searchEntity(keyword,"projects","oaf:project","project");
|
||||||
|
|
|
@ -92,7 +92,6 @@ export class SearchFields {
|
||||||
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", equalityOperator: " exact "},
|
["datasourcecompatibilityname"]:{name:"Compatibility Level", type:"vocabulary", param:"compatibility", equalityOperator: " exact "},
|
||||||
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
|
["relorganizationid"]:{name:"Organization", type:"entity", param:"organization", equalityOperator: " exact "},
|
||||||
["collectedfromdatasourceid"]:{name:"Collected from Data Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
|
["collectedfromdatasourceid"]:{name:"Collected from Data Provider", type:"entity", param:"collectedFrom", equalityOperator: " exact "}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiname","datasourcecompatibilityname"];
|
public COMPATIBLE_DATAPROVIDER_FIELDS:string[] = ["datasourcetypeuiname","datasourcecompatibilityname"];
|
||||||
|
|
Loading…
Reference in New Issue