(Issue #2897) Publication/Dataset landing page - add provenance for each project relationship: inside tooltip in fundedBy section (UKNOWN and user:insert cases hidden) (small bug fixed in tooltip too & font-size changed) | Unidentified projects handled in dataset landing page (like in publication landing) | Publication & Dataset images added in 'Similar Research Results' & 'Related Research Results' tabs | Search Pages (simple & advanced): Out of bounds message when requested page > max page)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47808 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
bd37e593dd
commit
a894909968
|
@ -207,22 +207,37 @@
|
|||
<div *ngIf="i<5 || showAllFundedBy">
|
||||
<span data-uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||
<a *ngIf="!item['inline']"
|
||||
|
||||
<a *ngIf="!item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
{{item['funderShortname']?item['funderShortname']:item['funderName']}}
|
||||
| {{ item['acronym']?item['acronym']:item['title']}}
|
||||
<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']" href="{{item['url']}}"-->
|
||||
<a *ngIf="item['inline']"
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
{{item['funderShortname']?item['funderShortname']:item['funderName']}}
|
||||
| {{ item['acronym']?item['acronym']:item['title']}}
|
||||
<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 uk-icon="icon: info"></span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -155,15 +155,21 @@ export class DatasetComponent {
|
|||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, inline: boolean}) {
|
||||
let tooltipContent: string = "<div class='uk-margin uk-light'>";
|
||||
"funding": string, "code": string, "provenanceAction":string, "inline": boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h4>"+item.title+"</h4>";
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "Project Code: "+item.code;
|
||||
tooltipContent += "<div>Project Code: "+item.code + "</div>";
|
||||
}
|
||||
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
if(item.funderName && item.funderShortname) {
|
||||
|
@ -181,8 +187,16 @@ export class DatasetComponent {
|
|||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(tooltipContent) {
|
||||
tooltipContent = "<div>" + tooltipContent + "</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>"
|
||||
|
|
|
@ -100,7 +100,8 @@ export class DatasetService {
|
|||
this.datasetInfo.fundedByProjects = new Array<
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "inline": boolean
|
||||
"funding": string, "code": string,
|
||||
"provenanceAction": string, "inline": boolean
|
||||
}>();
|
||||
}
|
||||
|
||||
|
@ -109,13 +110,37 @@ export class DatasetService {
|
|||
this.datasetInfo.fundedByProjects[counter] = {
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"funding": "", "inline": false
|
||||
"funding": "", "code": "", "provenanceAction": "", "inline": false
|
||||
}
|
||||
|
||||
if(mydata.title != 'unidentified') {
|
||||
this.datasetInfo.fundedByProjects[counter]['id'] = mydata['to'].content;
|
||||
this.datasetInfo.fundedByProjects[counter]['acronym'] = mydata.acronym;
|
||||
this.datasetInfo.fundedByProjects[counter]['title'] = mydata.title;
|
||||
this.datasetInfo.fundedByProjects[counter]['code'] = mydata.code;
|
||||
let provenanceAction: string = mydata.provenanceaction;
|
||||
if( provenanceAction == "sysimport:crosswalk:repository"
|
||||
|| provenanceAction == "sysimport:crosswalk:entityregistry"
|
||||
|| provenanceAction == "sysimport:crosswalk:datasetarchive") {
|
||||
|
||||
this.datasetInfo.fundedByProjects[counter]['provenanceAction'] = "Repository";
|
||||
}
|
||||
else if( provenanceAction == "iis"
|
||||
|| provenanceAction == "sysimport:mining:repository") {
|
||||
this.datasetInfo.fundedByProjects[counter]['provenanceAction'] = "Algorithm";
|
||||
} else if( provenanceAction == "user:claim:pid"
|
||||
|| provenanceAction == "user:claim:search"
|
||||
|| provenanceAction == "user:claim:datacite") {
|
||||
this.datasetInfo.fundedByProjects[counter]['provenanceAction'] = "User";
|
||||
}
|
||||
} else {
|
||||
this.datasetInfo.fundedByProjects[counter]['id'] = "";
|
||||
this.datasetInfo.fundedByProjects[counter]['acronym'] = "";
|
||||
this.datasetInfo.fundedByProjects[counter]['title'] = "";
|
||||
this.datasetInfo.fundedByProjects[counter]['code'] = "";
|
||||
this.datasetInfo.fundedByProjects[counter]['provenanceAction'] = "";
|
||||
}
|
||||
|
||||
this.datasetInfo.fundedByProjects[counter]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject()+*/mydata['to'].content;
|
||||
this.datasetInfo.fundedByProjects[counter]['acronym'] = mydata.acronym;
|
||||
this.datasetInfo.fundedByProjects[counter]['title'] = mydata.title;
|
||||
|
||||
if(mydata.hasOwnProperty("funding")) {
|
||||
let length1 = Array.isArray(mydata['funding']) ? mydata['funding'].length : 1;
|
||||
|
|
|
@ -462,7 +462,6 @@
|
|||
<span uk-tooltip="pos:right; delay:10"
|
||||
title="{{buildFundingTooltip(item)}}">
|
||||
|
||||
<!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
|
||||
<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>
|
||||
|
@ -470,7 +469,6 @@
|
|||
<span *ngIf="item['acronym'] || item['title']">| {{ item['acronym']?item['acronym']:item['title']}}</span>
|
||||
</a>
|
||||
|
||||
<!--a *ngIf="item['inline']" href="{{item['url']}}"-->
|
||||
<a *ngIf="item['inline'] && item.id"
|
||||
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
|
||||
<mark>
|
||||
|
@ -494,24 +492,7 @@
|
|||
</mark>
|
||||
</span>
|
||||
|
||||
<!--i class="uk-icon-info-circle"
|
||||
data-uk-modal="{target:'#my-id'}"-->
|
||||
<span uk-icon="icon: info"></span>
|
||||
<!--div id="my-id" class="uk-modal">
|
||||
<div class="uk-modal-dialog uk-modal-dialog-lightbox uk-text-center">
|
||||
<a href="" class="uk-modal-close uk-close uk-close-alt"></a>
|
||||
<div>
|
||||
<h4>{{item['title']}}</h4>
|
||||
Project Code: {{item['code']}}
|
||||
<div>
|
||||
Funder: {{item['funderName']}} ({{item['funderShortname']}})
|
||||
</div>
|
||||
<div>
|
||||
Funding: {{item['funding']}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div-->
|
||||
</span>
|
||||
</div>
|
||||
</dd>
|
||||
|
|
|
@ -191,14 +191,19 @@ export class PublicationComponent {
|
|||
|
||||
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, inline: boolean}) {
|
||||
let tooltipContent: string = "<div class='uk-margin uk-light'>";
|
||||
"funding": string, "code": string, "provenanceAction": string, inline: boolean}) {
|
||||
let tooltipContent: string = "<div class='tooltip-custom-font-size uk-light'>";
|
||||
|
||||
if(item.title) {
|
||||
tooltipContent += "<h4>"+item.title+"</h4>";
|
||||
tooltipContent += "<h5>"+item.title+"</h5>";
|
||||
}
|
||||
|
||||
if(item.code || item.funderName || item.funderShortname || item.funding) {
|
||||
tooltipContent += "<p>";
|
||||
}
|
||||
|
||||
if(item.code) {
|
||||
tooltipContent += "Project Code: "+item.code;
|
||||
tooltipContent += "<div>Project Code: "+item.code+"</div>";
|
||||
}
|
||||
if(item.funderName || item.funderShortname) {
|
||||
tooltipContent += "<div>Funder: ";
|
||||
|
@ -209,7 +214,6 @@ export class PublicationComponent {
|
|||
} else {
|
||||
tooltipContent += item.funderShortname;
|
||||
}
|
||||
|
||||
tooltipContent += "</div>";
|
||||
}
|
||||
|
||||
|
@ -217,21 +221,20 @@ export class PublicationComponent {
|
|||
tooltipContent += "<div>Funding: "+ item.funding + "</div>";
|
||||
}
|
||||
|
||||
if(tooltipContent) {
|
||||
tooltipContent = "<div>" + tooltipContent + "</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;
|
||||
/*<div>
|
||||
<h4>{{item['title']}}</h4>
|
||||
Project Code: {{item['code']}}
|
||||
<div>
|
||||
Funder: {{item['funderName']}} ({{item['funderShortname']}})
|
||||
</div>
|
||||
<div>
|
||||
Funding: {{item['funding']}}
|
||||
</div>
|
||||
</div>*/
|
||||
}
|
||||
updateDescription(description:string){
|
||||
this._meta.updateMeta("description", description);
|
||||
|
|
|
@ -102,7 +102,7 @@ export class PublicationService {
|
|||
this.publicationInfo.fundedByProjects = new Array<
|
||||
{ "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, "inline": boolean
|
||||
"funding": string, "code": string, "provenanceAction": string, "inline": boolean
|
||||
}>();
|
||||
}
|
||||
|
||||
|
@ -111,20 +111,35 @@ export class PublicationService {
|
|||
this.publicationInfo.fundedByProjects[counter] = {
|
||||
"id": "", "acronym": "", "title": "",
|
||||
"funderShortname": "", "funderName": "",
|
||||
"funding": "", "code": "", "inline": false
|
||||
"funding": "", "code": "", "provenanceAction": "", "inline": false
|
||||
}
|
||||
|
||||
if(relation.title != 'unidentified') {
|
||||
this.publicationInfo.fundedByProjects[counter]['id'] =
|
||||
/*OpenaireProperties.getsearchLinkToProject() + */relation['to'].content;
|
||||
this.publicationInfo.fundedByProjects[counter]['id'] = relation['to'].content;
|
||||
this.publicationInfo.fundedByProjects[counter]['acronym'] = relation.acronym;
|
||||
this.publicationInfo.fundedByProjects[counter]['title'] = relation.title;
|
||||
this.publicationInfo.fundedByProjects[counter]['code'] = relation.code;
|
||||
let provenanceAction: string = relation.provenanceaction;
|
||||
if( provenanceAction == "sysimport:crosswalk:repository"
|
||||
|| provenanceAction == "sysimport:crosswalk:entityregistry"
|
||||
|| provenanceAction == "sysimport:crosswalk:datasetarchive") {
|
||||
|
||||
this.publicationInfo.fundedByProjects[counter]['provenanceAction'] = "Repository";
|
||||
}
|
||||
else if( provenanceAction == "iis"
|
||||
|| provenanceAction == "sysimport:mining:repository") {
|
||||
this.publicationInfo.fundedByProjects[counter]['provenanceAction'] = "Algorithm";
|
||||
} else if( provenanceAction == "user:claim:pid"
|
||||
|| provenanceAction == "user:claim:search"
|
||||
|| provenanceAction == "user:claim:datacite") {
|
||||
this.publicationInfo.fundedByProjects[counter]['provenanceAction'] = "User";
|
||||
}
|
||||
} else {
|
||||
this.publicationInfo.fundedByProjects[counter]['id'] = "";
|
||||
this.publicationInfo.fundedByProjects[counter]['acronym'] = "";
|
||||
this.publicationInfo.fundedByProjects[counter]['title'] = "";
|
||||
this.publicationInfo.fundedByProjects[counter]['code'] = "";
|
||||
this.publicationInfo.fundedByProjects[counter]['provenanceAction'] = "";
|
||||
}
|
||||
|
||||
if(relation.hasOwnProperty("funding")) {
|
||||
|
|
|
@ -15,9 +15,11 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
<tbody>
|
||||
<tr *ngFor="let item of info" class="{{item['class']}}">
|
||||
<td *ngIf="item != undefined">
|
||||
<span *ngIf="item['class'] == 'dataset'" class="glyphicon glyphicon-star" aria-hidden="true">
|
||||
<!--span *ngIf="item['class'] == 'dataset'" class="glyphicon glyphicon-star" aria-hidden="true"-->
|
||||
<img *ngIf="item['class'] == 'publication'" class= "entityIcon" src="assets/publication.png" alt="(Publication)">
|
||||
<img *ngIf="item['class'] == 'dataset'" class= "entityIcon" src="assets/dataset.png" alt="(Dataset)">
|
||||
|
||||
</span>
|
||||
<!--/span-->
|
||||
<!--a *ngIf="item['url'] != '' && item['name'] != ''" href="{{item['url']}}"-->
|
||||
<a *ngIf="item['id'] != '' && item['name'] != '' && item['class'] == 'dataset'"
|
||||
[queryParams]="{datasetId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataset">
|
||||
|
|
|
@ -96,6 +96,16 @@ export class AdvancedSearchDataProvidersComponent {
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -101,6 +101,16 @@ export class AdvancedSearchDatasetsComponent {
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -100,6 +100,15 @@ public resourcesQuery = "(oaftype exact organization)";
|
|||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -100,6 +100,15 @@ export class AdvancedSearchProjectsComponent {
|
|||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -101,6 +101,15 @@ export class AdvancedSearchPublicationsComponent {
|
|||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -72,7 +72,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
|||
|
||||
<search-result *ngIf="!tableView"
|
||||
[results]="results"
|
||||
[status]=searchUtils.status
|
||||
[status]="searchUtils.status"
|
||||
[type]="entityType" [urlParam]="urlParam"
|
||||
[showLoading]="true">
|
||||
</search-result>
|
||||
|
|
|
@ -9,6 +9,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
|||
<ul class="uk-list uk-list-divider uk-margin" style="min-height: 1100px;">
|
||||
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
|
||||
<div *ngIf="status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
|
||||
<div *ngIf="status == errorCodes.OUT_OF_BOUND" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">Requested page out of bounds</div>
|
||||
<div *ngIf="status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
|
||||
<div *ngIf="status == errorCodes.LOADING && showLoading" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
|
||||
|
||||
|
|
|
@ -264,6 +264,16 @@ public getResultsForDeposit(id:string, type:string, page: number, size: number)
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -88,7 +88,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
|
|||
if(entity == "project") {
|
||||
parameters = "projects/"+id;
|
||||
}
|
||||
|
||||
|
||||
if(parameters != "") {
|
||||
|
||||
this._searchDatasetsService.searchDatasetsForEntity(parameters, page, size).subscribe(
|
||||
|
@ -197,6 +197,16 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -116,6 +116,16 @@ export class SearchOrganizationsComponent {
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -121,6 +121,16 @@ export class SearchProjectsComponent {
|
|||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -94,7 +94,7 @@ public getResultsForEntity(entity:string, id:string, page: number, size: number)
|
|||
|
||||
if(entity == "project") {
|
||||
parameters = "projects/"+id;
|
||||
}
|
||||
}
|
||||
|
||||
if(parameters != "") {
|
||||
|
||||
|
@ -200,13 +200,25 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
|
|||
}
|
||||
this.searchPage.checkSelectedFilters(this.filters);
|
||||
this.searchPage.updateBaseUrlWithParameters(this.filters);
|
||||
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
|
||||
this.searchUtils.status = errorCodes.DONE;
|
||||
if(this.searchUtils.totalResults == 0 ){
|
||||
this.searchUtils.status = errorCodes.NONE;
|
||||
}
|
||||
//this.searchPage.closeLoading();
|
||||
this.disableForms = false;
|
||||
|
||||
// Page out of limit!!!
|
||||
let totalPages:any = this.searchUtils.totalResults/(this.searchUtils.size);
|
||||
if(!(Number.isInteger(totalPages))) {
|
||||
totalPages = (parseInt(totalPages, 10) + 1);
|
||||
}
|
||||
if(totalPages < page) {
|
||||
this.searchUtils.totalResults = 0;
|
||||
this.searchUtils.status = errorCodes.OUT_OF_BOUND;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
|
|
@ -18,7 +18,7 @@ export class DatasetInfo {
|
|||
collectedFrom: { "name": string, "id": string}[];
|
||||
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "inline": boolean}[];
|
||||
"funding": string, "code": string, "provenanceAction": string, "inline": boolean}[];
|
||||
provenanceVocabulary: {"iis": string, "sysimport": string, "user": string} = {"iis": "Inferred", "sysimport": "Harvested", "user": "Claimed"};
|
||||
relatedResearchResults: Map<string, { "name": string, "id": string, "date": string, "trust": number, "class": string}[]>;
|
||||
similarResearchResults: { "name": string, "id": string, "date": string, "trust": number, "class": string}[];
|
||||
|
|
|
@ -20,7 +20,8 @@ export class PublicationInfo {
|
|||
collectedFrom: { "name": string, "id": string}[];
|
||||
fundedByProjects: { "id": string, "acronym": string, "title": string,
|
||||
"funderShortname": string, "funderName": string,
|
||||
"funding": string, "code": string, inline: boolean}[];
|
||||
"funding": string, "code": string, "provenanceAction": string,
|
||||
inline: boolean}[];
|
||||
bioentities: Map<string, Map<string, string>>; //<site name, <>>
|
||||
software: { "name": string, "url": string}[]; //<site name, <>>
|
||||
//relatedPublications: { "name": string, "url": string, "date": string, "trust": number}[];
|
||||
|
|
|
@ -315,4 +315,5 @@ export class ErrorCodes {
|
|||
public NONE = 2;
|
||||
public ERROR = 3;
|
||||
public NOT_AVAILABLE = 4;
|
||||
public OUT_OF_BOUND = 5;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,10 @@
|
|||
max-width: none;
|
||||
background: rgba(100, 100, 100, 1);
|
||||
}*/
|
||||
.tooltip-custom-font-size {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
.custom-select-mini{
|
||||
max-width:170px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue