Loading message in every tab (with extra query) of landing pages | checks for undefined, null, empty simplified in html templates of landing pages | changed data-uk-tooltip to uk-tooltip | Organization landing: rename CSV buttons | Dataproviders landing: add both publications-datasets tabs at the same time | Projects landing: to get number of datasets, add a function to fetchDatasets class instead of calling directly search service | Publication & Dataset landing: added ul-light class for better visibility on dark background on tooltip in funded by section | Publication landing: small bug fix in journal display & journal/publisher display in download from section | Datasets landing: small bug fix in publisher display in download from section | claims project manager: search form moved to top, save changes button moved under pending claims | filters' modal of search pages moved to filters' component (old component not removed yet) and became smaller | Compatible dataproviders page: small bug fixes in url, filters, filter-name: changed to Funder from Funder database

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47533 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-06-15 15:20:25 +00:00
parent a507574a4c
commit dc34b0d85a
40 changed files with 538 additions and 408 deletions

View File

@ -54,33 +54,13 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
</div> </div>
<div class="uk-overflow-container custom-dataTable-content"> <div class="uk-overflow-container custom-dataTable-content">
<!--table *ngIf="pending_claims && pending_claims.length > 0" class="uk-table uk-table-striped">
<thead>
<tr>
<th>Research Result</th>
<th class="uk-text-center">Claimed by</th>
<th class="uk-text-center">Claimed Date</th>
<th class="uk-text-center">Approve</th>
</tr>
</thead>
<tbody>
<tr class="uk-table-middle" *ngFor="let claim of pending_claims ">
<td class="uk-width-2-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
<td class="uk-width-1-6 uk-text-center" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
<td class="uk-width-1-6 uk-text-center">
<label> <div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
Yes <input [id]="claim.id" type="checkbox" (click)="selectApprove(claim.id,$event)" [ngModel]="isSelectedRight(claim.id)"/> <form class="uk-text-center uk-panel">
</label> <input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery" name="keyword" />
<label> </form>
No <input [id]="claim.id" type="checkbox" (click)="selectDisapprove(claim.id,$event)" [ngModel]="isSelectedWrong(claim.id)"/> </div>
</label>
</td>
</tr>
</tbody>
</table-->
<span *ngIf="pending_claims && pending_claims.length > 0 && totalPendingResults.count > 0"> <span *ngIf="pending_claims && pending_claims.length > 0 && totalPendingResults.count > 0">
{{totalPendingResults.count}} pending claims, page {{activePendingPage.page}} of {{totalPages(totalPendingResults.count)}} {{totalPendingResults.count}} pending claims, page {{activePendingPage.page}} of {{totalPages(totalPendingResults.count)}}
<paging-no-load class="uk-float-right" [currentPage]="activePendingPage.page" [totalResults]="totalPendingResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table1, $event, 'pending')"></paging-no-load> <paging-no-load class="uk-float-right" [currentPage]="activePendingPage.page" [totalResults]="totalPendingResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table1, $event, 'pending')"></paging-no-load>
@ -95,12 +75,6 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
<th class="uk-text-center"><mfDefaultSorter [by]="sortByClaimDate1">Claimed Date</mfDefaultSorter></th> <th class="uk-text-center"><mfDefaultSorter [by]="sortByClaimDate1">Claimed Date</mfDefaultSorter></th>
<th class="uk-text-center">Approve</th> <th class="uk-text-center">Approve</th>
</tr> </tr>
<tr>
<td colspan="4">
Filter pending claims:
<input class="form-control" [(ngModel)]="filterQuery"/>
</td>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr class="uk-table-middle" *ngFor="let claim1 of mf1.data"> <tr class="uk-table-middle" *ngFor="let claim1 of mf1.data">
@ -119,15 +93,12 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
</td> </td>
</tr> </tr>
</tbody> </tbody>
<!--paging-no-load [currentPage]="1" [totalResults]="pending_claims.length" [size]="rowsOnPage" ></paging-no-load-->
<tfoot class="uk-child-width-1-1">
<!--paging-no-load class="uk-width-1-1" [currentPage]="1" [totalResults]="pending_claims.length" [size]="rowsOnPage" (pageChange)="refreshTable(mf1, $event)"></paging-no-load-->
</tfoot>
</table> </table>
</div> </div>
<div class="uk-text-small uk-text-right">*Note that claims you did not approved or disapproved are considered as right (but not curated)</div>
<button class="uk-button uk-button-primary uk-float-right" type="submit" (click)="saveChanges()">Save Changes</button>
<h2> Already Curated Claims</h2> <h2> Already Curated Claims</h2>
<div *ngIf=" curated_claims && curated_claims.length == 0" > <div *ngIf=" curated_claims && curated_claims.length == 0" >
@ -135,38 +106,13 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
</div> </div>
<div class="uk-overflow-container custom-dataTable-content"> <div class="uk-overflow-container custom-dataTable-content">
<!--table *ngIf="curated_claims && curated_claims.length > 0" class="uk-table uk-table-striped">
<thead>
<tr>
<th>Research Result</th>
<th class="uk-text-center">Claimed by</th>
<th class="uk-text-center">Claimed Date</th>
<th class="uk-text-center">Curated by</th>
<th class="uk-text-center">Curation Date</th>
<th class="uk-text-center">Approved</th>
</tr>
</thead>
<tbody>
<tr class="uk-table-middle" *ngFor="let claim of curated_claims let i=index">
<td class="uk-width-1-6" *ngIf="claim.targetType != 'project'"><claim-entity [entity]="claim.target" [type]="claim.targetType" > </claim-entity></td>
<td class="uk-width-1-6" *ngIf="claim.sourceType != 'project'"><claim-entity [entity]="claim.source" [type]="claim.sourceType" > </claim-entity></td>
<td class="uk-width-1-6 uk-text-center">{{claim.userMail}}</td>
<td class="uk-width-1-6 uk-text-center">{{claim.date}}</td>
<td class="uk-width-1-6 uk-text-center">{{claim.curatedBy}}</td>
<td class="uk-width-1-6 uk-text-center">{{claim.curationDate}}</td>
<td class="uk-width-1-6 uk-text-center">
<label> <div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
Yes <input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" [ngModel]="isRight(claim)"/> <form class="uk-text-center uk-panel">
</label> <input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery2" name="keyword" />
</form>
</div>
<label>
No <input [id]="claim.id" type="checkbox" [disabled]="!editable.has(i)" [ngModel]="isWrong(claim)"/>
</label>
</td>
</tr>
</tbody>
</table-->
<span *ngIf="curated_claims && curated_claims.length > 0 && totalCuratedResults.count > 0"> <span *ngIf="curated_claims && curated_claims.length > 0 && totalCuratedResults.count > 0">
{{totalCuratedResults.count}} curated claims, page {{activeCuratedPage.page}} of {{totalPages(totalCuratedResults.count)}} {{totalCuratedResults.count}} curated claims, page {{activeCuratedPage.page}} of {{totalPages(totalCuratedResults.count)}}
<paging-no-load class="uk-float-right" [currentPage]="activeCuratedPage.page" [totalResults]="totalCuratedResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table2, $event, 'curated')"> </paging-no-load> <paging-no-load class="uk-float-right" [currentPage]="activeCuratedPage.page" [totalResults]="totalCuratedResults.count" [size]="rowsOnPage" (pageChange)="refreshTable(table2, $event, 'curated')"> </paging-no-load>
@ -176,6 +122,19 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
[mfData]="curated_claims | claimsDatatable : [filterQuery2, totalCuratedResults, activeCuratedPage]" #mf2="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1"> [mfData]="curated_claims | claimsDatatable : [filterQuery2, totalCuratedResults, activeCuratedPage]" #mf2="mfDataTable" [mfRowsOnPage]="rowsOnPage" [mfActivePage]="1">
<!--[(mfSortBy)]="sortByCurationDate2" [(mfSortOrder)]="sortOrder"--> <!--[(mfSortBy)]="sortByCurationDate2" [(mfSortOrder)]="sortOrder"-->
<thead> <thead>
<!--tr>
<td colspan="6">
<form class="uk-text-center uk-panel uk-background-muted">
<input type="text" class="uk-input uk-width-1-3" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="filterQuery2" name="keyword" />
</form>
</td>
</tr-->
<!--tr>
<td>
Filter curated claims:
<input class="uk-input uk-width-1-3" [(ngModel)]="filterQuery2"/>
</td>
</tr-->
<tr> <tr>
<th><mfDefaultSorter [by]="sortByTitle1">Research Result</mfDefaultSorter></th> <th><mfDefaultSorter [by]="sortByTitle1">Research Result</mfDefaultSorter></th>
<!--th>Link to</th--> <!--th>Link to</th-->
@ -185,12 +144,6 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
<th class="uk-text-center"><mfDefaultSorter [by]="sortByCurationDate2">Curation Date</mfDefaultSorter></th> <th class="uk-text-center"><mfDefaultSorter [by]="sortByCurationDate2">Curation Date</mfDefaultSorter></th>
<th class="uk-text-center">Approved</th> <th class="uk-text-center">Approved</th>
</tr> </tr>
<tr>
<td colspan="4">
Filter curated claims:
<input class="form-control" [(ngModel)]="filterQuery2"/>
</td>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr class="uk-table-middle" *ngFor="let claim of mf2.data let i=index"> <tr class="uk-table-middle" *ngFor="let claim of mf2.data let i=index">
@ -215,28 +168,9 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
<!--td><button class="uk-button" (click)="editable.add(i)">Edit</button></td--> <!--td><button class="uk-button" (click)="editable.add(i)">Edit</button></td-->
</tr> </tr>
</tbody> </tbody>
<!--tfoot>
<tr>
<td>
<mfBootstrapPaginator></mfBootstrapPaginator>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<paging-no-load [currentPage]="1" [totalResults]="curated_claims.length" [size]="rowsOnPage" (pageChange)="refreshTable(mf2, $event)"> </paging-no-load>
</td>
</tr>
</tfoot-->
</table> </table>
</div> </div>
<div class="uk-text-small uk-text-right">*Note that claims you did not approved or disapproved are considered as right (but not curated)</div>
<button class="uk-button uk-button-success uk-float-right" type="button" (click)="saveChanges()">Save Changes</button>
<!--modal-select (alertOutput)="curatorSelected($event)"></modal-select--> <!--modal-select (alertOutput)="curatorSelected($event)"></modal-select-->
<modal-loading [message]= "'Loading...'"></modal-loading> <modal-loading [message]= "'Loading...'"></modal-loading>
</div> </div>
@ -244,7 +178,6 @@ import {ClaimsDatatablePipe} from '../../utils/pipes/claimsDatatable.pipe';
}) })
export class ClaimsByTokenComponent { export class ClaimsByTokenComponent {
//change true - false to accept: yes - no
public token: string = ""; public token: string = "";
public sub: any; public sub: any;
public project: any; public project: any;
@ -256,7 +189,7 @@ export class ClaimsByTokenComponent {
public editable: Set<string>; public editable: Set<string>;
public contact_person: string[] = ["Konstantina", "Argiro", "Katerina"]; public contact_person: string[] = ["Konstantina", "Argiro", "Katerina"];
// when 'empty' show form to fill email, when 'valid' show proper claims, when 'invalid' show no matched entry-wanna retry // when 'valid' show proper claims, when 'invalid' show no matched entry-wanna retry
public accessStatus: string;// = "empty"; public accessStatus: string;// = "empty";
public rowsOnPage = 5; public rowsOnPage = 5;

View File

@ -17,12 +17,12 @@
<showTitle [title]="dataProviderInfo.title"></showTitle> <showTitle [title]="dataProviderInfo.title"></showTitle>
<dl class="uk-description-list"> <dl class="uk-description-list">
<dt *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">Type: </dt> <dt *ngIf="dataProviderInfo.type">Type: </dt>
<dd *ngIf="dataProviderInfo.type != undefined && dataProviderInfo.type != ''">{{dataProviderInfo.type}}</dd> <dd *ngIf="dataProviderInfo.type">{{dataProviderInfo.type}}</dd>
<dt *ngIf="dataProviderInfo.compatibility != undefined && dataProviderInfo.compatibility != ''">Compatibility: </dt> <dt *ngIf="dataProviderInfo.compatibility">Compatibility: </dt>
<dd *ngIf="dataProviderInfo.compatibility != undefined && dataProviderInfo.compatibility != ''">{{dataProviderInfo.compatibility}}</dd> <dd *ngIf="dataProviderInfo.compatibility">{{dataProviderInfo.compatibility}}</dd>
<dt *ngIf="dataProviderInfo.oaiPmhURL != undefined && dataProviderInfo.oaiPmhURL != ''">OAI-PMH: </dt> <dt *ngIf="dataProviderInfo.oaiPmhURL">OAI-PMH: </dt>
<dd *ngIf="dataProviderInfo.oaiPmhURL != undefined && dataProviderInfo.oaiPmhURL != ''"> <dd *ngIf="dataProviderInfo.oaiPmhURL">
<span class="custom-external custom-icon"> <span class="custom-external custom-icon">
<a href="{{dataProviderInfo.oaiPmhURL}}" target="_blank"> <a href="{{dataProviderInfo.oaiPmhURL}}" target="_blank">
{{dataProviderInfo.oaiPmhURL}} {{dataProviderInfo.oaiPmhURL}}
@ -30,7 +30,7 @@
</span> </span>
</dd> </dd>
<dt *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0">Countries: </dt> <dt *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0">Countries: </dt>
<dd *ngIf="dataProviderInfo.countries != undefined">{{dataProviderInfo.countries}}</dd> <dd *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0">{{dataProviderInfo.countries}}</dd>
</dl> </dl>
<!--tabs [id] = "datasourceId" <!--tabs [id] = "datasourceId"
@ -99,9 +99,18 @@
</relatedDatasourcesTab> </relatedDatasourcesTab>
<div *ngIf=" tab.content=='statisticsTab' && statsClicked"> <div *ngIf=" tab.content=='statisticsTab' && statsClicked">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary"> <!--div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
There are no statistics There are no statistics
</div> </div-->
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE && fetchDatasets.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no statistics</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR || fetchDatasets.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE || fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING || fetchDatasets.searchUtils.status == errorCodes.LOADING"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)"> <div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
<p class="uk-text-bold">Latest Documents Timeline</p> <p class="uk-text-bold">Latest Documents Timeline</p>
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame> <i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>

View File

@ -12,7 +12,7 @@ import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.cl
import { SearchProjectsService } from '../../services/searchProjects.service'; import { SearchProjectsService } from '../../services/searchProjects.service';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import { SearchDataprovidersService } from '../../services/searchDataproviders.service'; import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
@Component({ @Component({
selector: 'dataprovider', selector: 'dataprovider',
@ -69,6 +69,9 @@ export class DataProviderComponent {
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
showTabs:boolean = false; showTabs:boolean = false;
public errorCodes:ErrorCodes = new ErrorCodes();
constructor (private element: ElementRef, constructor (private element: ElementRef,
private _dataproviderService: DataProviderService, private _dataproviderService: DataProviderService,
private route: ActivatedRoute, private route: ActivatedRoute,
@ -196,10 +199,9 @@ export class DataProviderComponent {
} }
private count(page: number, size: number) { private count(page: number, size: number) {
console.info("number of tabs: "+this.dataProviderInfo.tabs.length);
for(let i=1; i<this.dataProviderInfo.tabs.length; i++) { for(let i=1; i<this.dataProviderInfo.tabs.length; i++) {
let content: string = this.dataProviderInfo.tabs[i].content; let content: string = this.dataProviderInfo.tabs[i].content;
if(content=='publicationsTab') { if(content=='publicationsTab') {
this.countPublications(page, size); this.countPublications(page, size);
} else if(content=='datasetsTab') { } else if(content=='datasetsTab') {
@ -215,7 +217,6 @@ export class DataProviderComponent {
} }
private search(content: string, page: number, size: number) { private search(content: string, page: number, size: number) {
console.info(content);
if(content=='publicationsTab') { if(content=='publicationsTab') {
this.searchPublications(page, size); this.searchPublications(page, size);
} else if(content=='datasetsTab') { } else if(content=='datasetsTab') {
@ -234,10 +235,7 @@ export class DataProviderComponent {
} }
private searchPublications(page: number, size: number) { private searchPublications(page: number, size: number) {
console.info("Search publications???");
if(this.reloadPublications) { if(this.reloadPublications) {
console.info("Search publications!");
this.fetchPublications.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size); this.fetchPublications.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size);
} }
this.reloadPublications = false; this.reloadPublications = false;
@ -270,7 +268,6 @@ export class DataProviderComponent {
} }
private searchDatasources(page: number, size: number) { private searchDatasources(page: number, size: number) {
console.info("search intro");
if(this.reloadDataproviders) { if(this.reloadDataproviders) {
this.fetchDataproviders.getResultsForDataproviders(this.datasourceId, page, size); this.fetchDataproviders.getResultsForDataproviders(this.datasourceId, page, size);
@ -285,7 +282,6 @@ export class DataProviderComponent {
private searchRelatedDatasources(page: number, size: number) { private searchRelatedDatasources(page: number, size: number) {
if(this.reloadRelatedDatasources) { if(this.reloadRelatedDatasources) {
console.info("my id is: "+this.datasourceId);
this.fetchResultsAggregators.getAggregatorResults(this.datasourceId, page, size); this.fetchResultsAggregators.getAggregatorResults(this.datasourceId, page, size);
} }
this.reloadRelatedDatasources = false; this.reloadRelatedDatasources = false;

View File

@ -71,7 +71,7 @@ export class DataProviderService {
this.dataProviderInfo.tabs.push({"name": "Publications", "content": "publicationsTab"}); this.dataProviderInfo.tabs.push({"name": "Publications", "content": "publicationsTab"});
} }
if(this.dataProviderInfo.tabsInTypes.datasetsTab.has(data[1].classid)) { if(this.dataProviderInfo.tabsInTypes.datasetsTab.has(data[1].classid)) {
this.dataProviderInfo.tabs.push({"name": "Datasets", "content": "datasetsTab"}); this.dataProviderInfo.tabs.push({"name": "Research Data", "content": "datasetsTab"});
} }
if(this.dataProviderInfo.tabsInTypes.projectsTab.has(data[1].classid)) { if(this.dataProviderInfo.tabsInTypes.projectsTab.has(data[1].classid)) {

View File

@ -1,14 +1,19 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class'; import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'datasetsTab', selector: 'datasetsTab',
template: ` template: `
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no research data</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<!--div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
There are no datasets There are no datasets
</div> </div-->
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0"> <div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" > <div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" >
@ -29,6 +34,7 @@ export class DatasetsTabComponent {
@Input() paramsForSearchLink = {}; @Input() paramsForSearchLink = {};
@Input() fetchDatasets : FetchDatasets; @Input() fetchDatasets : FetchDatasets;
public linkToSearchDatasets = ""; public linkToSearchDatasets = "";
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {} constructor () {}

View File

@ -1,14 +1,19 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'datasourcesTab', selector: 'datasourcesTab',
template: ` template: `
<div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no data providers</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<!--div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert">
There are no datasources There are no datasources
</div> </div-->
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0"> <div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10"> <div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
@ -31,13 +36,12 @@ export class DatasourcesTabComponent {
@Input() paramsForSearchLink = {}; @Input() paramsForSearchLink = {};
@Input() fetchDataproviders : FetchDataproviders; @Input() fetchDataproviders : FetchDataproviders;
public linkToSearchDataproviders = ""; public linkToSearchDataproviders = "";
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
console.info("datasources tab: init");
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders(); this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders();
// console.info(this.linkToSearchDataproviders);
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core';
@Component({ @Component({
selector: 'organizationsTab', selector: 'organizationsTab',
template: ` template: `
<div *ngIf=" !organizations || organizations.length == 0" class = "uk-alert"> <div *ngIf=" !organizations || organizations.length == 0" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">
There are no organizations There are no organizations
</div> </div>

View File

@ -2,14 +2,19 @@ import {Component, Input} from '@angular/core';
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class'; import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'projectsTab', selector: 'projectsTab',
template: ` template: `
<div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchProjects.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no projects</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<!--div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert">
There are no projects There are no projects
</div> </div-->
<div *ngIf="fetchProjects.searchUtils.totalResults > 0"> <div *ngIf="fetchProjects.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10"> <div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10">
@ -31,6 +36,7 @@ export class ProjectsTabComponent {
@Input() paramsForSearchLink = {}; @Input() paramsForSearchLink = {};
@Input() fetchProjects : FetchProjects; @Input() fetchProjects : FetchProjects;
public linkToSearchProjects = ""; public linkToSearchProjects = "";
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {} constructor () {}

View File

@ -1,14 +1,19 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'publicationsTab', selector: 'publicationsTab',
template: ` template: `
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no publications</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
There are no publications There are no publications
</div> </div-->
<div *ngIf="fetchPublications.searchUtils.totalResults > 0"> <div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10"> <div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
@ -32,12 +37,12 @@ export class PublicationsTabComponent {
@Input() paramsForSearchLink = {};//: string = ""; @Input() paramsForSearchLink = {};//: string = "";
@Input() fetchPublications : FetchPublications; @Input() fetchPublications : FetchPublications;
public linkToSearchPublications = ""; public linkToSearchPublications = "";
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();//+this.paramsForSearchLink; this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();//+this.paramsForSearchLink;
console.info("publications tab: init");
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -3,16 +3,20 @@ import {Component, Input} from '@angular/core';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class'; import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
@Component({ @Component({
selector: 'relatedDatasourcesTab', selector: 'relatedDatasourcesTab',
template: ` template: `
<div *ngIf="fetchResults.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no related data providers</div>
<div *ngIf="fetchResults.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchResults.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchResults.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="fetchResults.results.length == 0" class = "uk-alert"> <!--div *ngIf="fetchResults.results.length == 0" class = "uk-alert">
There are no related dataproviders There are no related dataproviders
</div> </div-->
<div *ngIf="fetchResults.results.length > 0"> <div *ngIf="fetchResults.results.length > 0">
<table class="uk-table uk-table-striped"> <table class="uk-table uk-table-striped">
@ -49,9 +53,11 @@ export class RelatedDatasourcesTabComponent {
@Input() type: string; @Input() type: string;
@Input() dataproviderId: string; @Input() dataproviderId: string;
@Input() fetchResults : any; @Input() fetchResults : any;
public linkToSearchResults: string = ""; public linkToSearchResults: string = "";
public searchLinkToDataProvider: string = ""; public searchLinkToDataProvider: string = "";
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
public errorCodes:ErrorCodes = new ErrorCodes();
//public queryParams: string[] = []; //public queryParams: string[] = [];
//public queryParamsIds: string[] = []; //public queryParamsIds: string[] = [];
@ -59,7 +65,6 @@ export class RelatedDatasourcesTabComponent {
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
console.info("related datasources tab: init");
if(this.type == "publications") { if(this.type == "publications") {
this.linkToSearchResults = OpenaireProperties.getLinkToAdvancedSearchPublications();//+"?&hostedBy=";//+ +"&ho=and&collectedFrom="+ +"&co=and"; this.linkToSearchResults = OpenaireProperties.getLinkToAdvancedSearchPublications();//+"?&hostedBy=";//+ +"&ho=and&collectedFrom="+ +"&co=and";
} else { } else {

View File

@ -1,16 +1,25 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component'; import { SearchDatasetsComponent } from '../../searchPages/simple/searchDatasets.component';
import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component'; import { SearchPublicationsComponent } from '../../searchPages/simple/searchPublications.component';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
@Component({ @Component({
selector: 'statisticsTab', selector: 'statisticsTab',
template: ` template: `
<div *ngIf="show"> <div *ngIf="show">
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NONE && DatasetsComponent.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no statistics</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.ERROR || DatasetsComponent.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE || DatasetsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.LOADING || DatasetsComponent.searchUtils.status == errorCodes.LOADING"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<!--div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
There are no statistics There are no statistics
</div> </div-->
<div *ngIf="(searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0)"> <div *ngIf="searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0">
<p class="uk-text-bold">Latest Documents Timeline</p> <p class="uk-text-bold">Latest Documents Timeline</p>
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame> <i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>
<p class="uk-text-bold">Documents Types</p> <p class="uk-text-bold">Documents Types</p>
@ -51,6 +60,8 @@ export class StatisticsTabComponent {
private pubsFunderUrl:string; private pubsFunderUrl:string;
private dataProjectsUrl:string ; private dataProjectsUrl:string ;
private pubsProjectsUrl:string; private pubsProjectsUrl:string;
public errorCodes:ErrorCodes = new ErrorCodes();
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {

View File

@ -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; delay:10" <span 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>
@ -27,12 +27,12 @@
</div> </div>
<dl class="uk-description-list"> <dl class="uk-description-list">
<dt *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">Publisher: </dt> <dt *ngIf="datasetInfo.publisher">Publisher: </dt>
<dd *ngIf="datasetInfo.publisher != undefined && datasetInfo.publisher != ''">{{datasetInfo.publisher}}</dd> <dd *ngIf="datasetInfo.publisher">{{datasetInfo.publisher}}</dd>
<dt *ngIf="datasetInfo.type != undefined"> Type: </dt> <dt *ngIf="datasetInfo.type != undefined"> Type: </dt>
<dd *ngIf="datasetInfo.type != undefined">{{datasetInfo.type}}</dd> <dd *ngIf="datasetInfo.type != undefined">{{datasetInfo.type}}</dd>
<dt *ngIf="datasetInfo.embargoEndDate != undefined && datasetInfo.embargoEndDate != ''">Embargo end date: </dt> <dt *ngIf="datasetInfo.embargoEndDate">Embargo end date: </dt>
<dd *ngIf="datasetInfo.embargoEndDate != undefined && datasetInfo.embargoEndDate != ''">{{datasetInfo.embargoEndDate}}</dd> <dd *ngIf="datasetInfo.embargoEndDate">{{datasetInfo.embargoEndDate}}</dd>
<showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers>
<showSubjects [subjects]="datasetInfo.subjects" <showSubjects [subjects]="datasetInfo.subjects"
@ -62,8 +62,8 @@
<li> <li>
<a> <a>
Similar Research Results Similar Research Results
<span *ngIf="datasetInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{datasetInfo.similarResearchResults.length}} {{datasetInfo.similarResearchResults.length}}
</span> </span>
</a> </a>
@ -78,10 +78,10 @@
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"> <ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="datasetInfo.relatedResearchResults == undefined" class = "uk-alert uk-alert-primary" > <div *ngIf="!datasetInfo.relatedResearchResults" class = "uk-alert uk-alert-primary" >
There are no related research results There are no related research results
</div> </div>
<div *ngIf="datasetInfo.relatedResearchResults != undefined"> <div *ngIf="datasetInfo.relatedResearchResults">
<div *ngFor="let provenanceaction of datasetInfo.relatedResearchResults.keys()"> <div *ngFor="let provenanceaction of datasetInfo.relatedResearchResults.keys()">
<h4>{{provenanceaction}}</h4> <h4>{{provenanceaction}}</h4>
@ -91,10 +91,10 @@
</li> </li>
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="datasetInfo.similarResearchResults == undefined" class = "uk-alert uk-alert-primary" > <div *ngIf="!datasetInfo.similarResearchResults" class = "uk-alert uk-alert-primary" >
There are no similar research results There are no similar research results
</div> </div>
<div *ngIf="datasetInfo.similarResearchResults != undefined"> <div *ngIf="datasetInfo.similarResearchResults">
<tabTable [info]="datasetInfo.similarResearchResults"></tabTable> <tabTable [info]="datasetInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
@ -122,18 +122,18 @@
<addThis ></addThis> <addThis ></addThis>
</dd> </dd>
</dl> </dl>
<altmetrics *ngIf="datasetInfo.identifiers != undefined && datasetInfo.identifiers.get('doi') != undefined" <altmetrics *ngIf="datasetInfo.identifiers && datasetInfo.identifiers.get('doi')"
id="{{datasetInfo.identifiers.get('doi')[0]}}" type="doi"> id="{{datasetInfo.identifiers.get('doi')[0]}}" type="doi">
</altmetrics > </altmetrics >
</li> </li>
<li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0"> <li *ngIf="datasetInfo.downloadFrom && datasetInfo.downloadFrom.size > 0">
<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 datasetInfo.downloadFrom.keys() let i=index" > *ngFor="let key of datasetInfo.downloadFrom.keys() let i=index" >
<div *ngIf="i<5 || showAllDownloadFrom" <div *ngIf="i<5 || showAllDownloadFrom"
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}"> class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10" <span class="custom-external custom-icon" uk-tooltip="pos:right; delay:10"
[title]="datasetInfo.downloadFrom.get(key)['accessMode']"> [title]="datasetInfo.downloadFrom.get(key)['accessMode']">
<span *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1"> <span *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
{{key}} {{key}}
@ -200,8 +200,8 @@
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 5">...</dd> <dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects && datasetInfo.fundedByProjects.length > 5">...</dd>
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 5" class="uk-text-right"> <dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects && datasetInfo.fundedByProjects.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;"> <a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View more View more
</a> </a>
@ -215,13 +215,13 @@
<dd class="line" *ngFor="let item of datasetInfo.contexts"> <dd class="line" *ngFor="let item of datasetInfo.contexts">
<span *ngIf = "!item['inline']" > <span *ngIf = "!item['inline']" >
<span>{{item['labelContext']}}</span> <span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory'] != null">-> {{item['labelCategory']}}</span> <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span> <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</span> </span>
<mark *ngIf = "item['inline']" > <mark *ngIf = "item['inline']" >
<span>{{item['labelContext']}}</span> <span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory'] != null">-> {{item['labelCategory']}}</span> <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span> <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</mark> </mark>
</dd> </dd>
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <span uk-icon="icon: link"></span> Add links to contexts</a></dd> <dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <span uk-icon="icon: link"></span> Add links to contexts</a></dd>
@ -230,7 +230,7 @@
</li> </li>
<li><citeThis [result]="datasetInfo" [id]="datasetId"></citeThis></li> <li><citeThis [result]="datasetInfo" [id]="datasetId"></citeThis></li>
<li *ngIf="datasetInfo.collectedFrom != undefined && datasetInfo.collectedFrom.length > 0"> <li *ngIf="datasetInfo.collectedFrom && datasetInfo.collectedFrom.length > 0">
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngFor="let item of datasetInfo.collectedFrom let i=index"> <dd *ngFor="let item of datasetInfo.collectedFrom let i=index">

View File

@ -147,7 +147,7 @@ export class DatasetComponent {
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "code": string, inline: boolean}) { "funding": string, "code": string, inline: boolean}) {
let tooltipContent: string = ""; let tooltipContent: string = "<div class='uk-margin uk-light'>";
if(item.title) { if(item.title) {
tooltipContent += "<h4>"+item.title+"</h4>"; tooltipContent += "<h4>"+item.title+"</h4>";
@ -176,6 +176,7 @@ export class DatasetComponent {
tooltipContent = "<div>" + tooltipContent + "</div>"; tooltipContent = "<div>" + tooltipContent + "</div>";
} }
tooltipContent+="</div>"
return tooltipContent; return tooltipContent;
} }
} }

View File

@ -496,7 +496,8 @@ export class DatasetService {
} }
} }
if(this.datasetInfo.publisher != null if( this.datasetInfo.publisher != null
&& this.datasetInfo.publisher != ""
&& this.datasetInfo.identifiers != null && this.datasetInfo.identifiers != null
&& this.datasetInfo.identifiers.has("doi")) { && this.datasetInfo.identifiers.has("doi")) {

View File

@ -24,10 +24,10 @@
<!--div class="uk-width-2-3" *ngIf="organizationInfo != null"--> <!--div class="uk-width-2-3" *ngIf="organizationInfo != null"-->
<dl class="uk-description-list"> <dl class="uk-description-list">
<dt *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">Name: </dt> <dt *ngIf="organizationInfo.name">Name: </dt>
<dd *ngIf="organizationInfo.name != undefined && organizationInfo.name != ''">{{organizationInfo.name}}</dd> <dd *ngIf="organizationInfo.name">{{organizationInfo.name}}</dd>
<dt *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">Country: </dt> <dt *ngIf="organizationInfo.country">Country: </dt>
<dd *ngIf="organizationInfo.country != undefined && organizationInfo.country != ''">{{organizationInfo.country}}</dd> <dd *ngIf="organizationInfo.country">{{organizationInfo.country}}</dd>
</dl> </dl>
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
@ -113,9 +113,14 @@
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders--> <!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
<div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary"> <!--div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
There are no dataproviders There are no dataproviders
</div> </div-->
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no data providers</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0"> <div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
@ -164,16 +169,22 @@
</a--> </a-->
<span class="clickable" (click)="downloadfile(downloadURLAPI+'resources?size='+funder.number+'&'+csvProjectParamsHead+funder.id+csvParamsTail)"> <span class="clickable" (click)="downloadfile(downloadURLAPI+'resources?size='+funder.number+'&'+csvProjectParamsHead+funder.id+csvParamsTail)">
<span aria-hidden="true" class="glyphicon glyphicon-download"></span> <span aria-hidden="true" class="glyphicon glyphicon-download"></span>
<span class="uk-icon-download"> Projects report(CSV) for {{funder.name}}</span> <span class="uk-icon-download"> Project list for {{funder.name}} (CSV)</span>
</span> </span>
</li> </li>
<li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders"> <li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders">
<span class="clickable" (click)="confirmOpen(funder.name,funder.id, funder.number)"> <span class="clickable" (click)="confirmOpen(funder.name,funder.id, funder.number)">
<span aria-hidden="true" class="glyphicon glyphicon-download"></span> <span aria-hidden="true" class="glyphicon glyphicon-download"></span>
<span class="uk-icon-download"> Publications report(CSV) for {{funder.name}}</span> <span class="uk-icon-download"> Project Publications for {{funder.name}} (CSV)</span>
</span> </span>
</li> </li>
<!--li>
<span class="clickable">
<span aria-hidden="true" class="glyphicon glyphicon-download"></span>
<span class="uk-icon-download"> Publications of organization (CSV) - based on the affiliation information.</span>
</span>
</li-->
</ng-container> </ng-container>
</ul> </ul>
</div> </div>

View File

@ -10,7 +10,7 @@ import {SearchPublicationsService} from '../../services/searchPublications.servi
import {SearchDataprovidersService} from '../../services/searchDataproviders.service'; import {SearchDataprovidersService} from '../../services/searchDataproviders.service';
import {SearchProjectsService} from '../../services/searchProjects.service'; import {SearchProjectsService} from '../../services/searchProjects.service';
import { Meta} from '../../../angular2-meta'; import { Meta} from '../../../angular2-meta';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
import {SearchingProjectsTabComponent} from '../searchingProjectsInTab.component'; import {SearchingProjectsTabComponent} from '../searchingProjectsInTab.component';
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
@ -56,6 +56,8 @@ export class OrganizationComponent {
private funderId: string; private funderId: string;
private count: number; private count: number;
public errorCodes:ErrorCodes = new ErrorCodes();
constructor (private element: ElementRef, constructor (private element: ElementRef,
private _organizationService: OrganizationService, private _organizationService: OrganizationService,
private route: ActivatedRoute, private route: ActivatedRoute,
@ -197,7 +199,7 @@ export class OrganizationComponent {
private searchDataproviders() { private searchDataproviders() {
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10); this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10);
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders();// + "?organization=" + this.organizationId + "&or=and";; this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders();
} }
private searchDataprovidersInit() { private searchDataprovidersInit() {

View File

@ -123,14 +123,16 @@ export class PersonComponent {
this.updateTitle(this.personInfo.fullname); this.updateTitle(this.personInfo.fullname);
this.updateDescription("person, publication, research data, search, open access, "+this.personInfo.fullname); this.updateDescription("person, publication, research data, search, open access, "+this.personInfo.fullname);
this._searchDatasetsService.numOfEntityDatasets(this.personId, "people/").subscribe( /*this._searchDatasetsService.numOfEntityDatasets("people/"+this.personId).subscribe(
data => { data => {
this.fetchDatasets.searchUtils.totalResults = data; this.fetchDatasets.searchUtils.totalResults = data;
}, },
err => { err => {
console.log(err); console.log(err);
} }
); );*/
this.fetchDatasets.getNumResultsForEntity("people", this.personId);
}, },
err => { err => {

View File

@ -12,41 +12,41 @@
</div> </div>
<dl class="uk-description-list"> <dl class="uk-description-list">
<dt *ngIf="projectInfo.title != undefined && projectInfo.title != ''">Title: </dt> <dt *ngIf="projectInfo.title">Title: </dt>
<dd *ngIf="projectInfo.title != undefined && projectInfo.title != ''">{{projectInfo.title}}</dd> <dd *ngIf="projectInfo.title">{{projectInfo.title}}</dd>
<dt *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">Funding: </dt> <dt *ngIf="projectInfo.funding">Funding: </dt>
<dd *ngIf="projectInfo.funding != undefined && projectInfo.funding != ''">{{projectInfo.funding}}</dd> <dd *ngIf="projectInfo.funding">{{projectInfo.funding}}</dd>
<dt *ngIf="projectInfo.callIdentifier != undefined && projectInfo.callIdentifier != ''">Call: </dt> <dt *ngIf="projectInfo.callIdentifier">Call: </dt>
<dd *ngIf="projectInfo.callIdentifier != undefined && projectInfo.callIdentifier != ''">{{projectInfo.callIdentifier}}</dd> <dd *ngIf="projectInfo.callIdentifier">{{projectInfo.callIdentifier}}</dd>
<dt *ngIf="projectInfo.contractNum != undefined && projectInfo.contractNum != ''">Contract (GA) number: </dt> <dt *ngIf="projectInfo.contractNum">Contract (GA) number: </dt>
<dd *ngIf="projectInfo.contractNum != undefined && projectInfo.contractNum != ''">{{projectInfo.contractNum}}</dd> <dd *ngIf="projectInfo.contractNum">{{projectInfo.contractNum}}</dd>
<dt *ngIf="projectInfo.startDate != undefined && projectInfo.startDate != ''">Start Date: </dt> <dt *ngIf="projectInfo.startDate">Start Date: </dt>
<dd *ngIf="projectInfo.startDate != undefined && projectInfo.startDate != ''">{{projectInfo.startDate}}</dd> <dd *ngIf="projectInfo.startDate">{{projectInfo.startDate}}</dd>
<dt *ngIf="projectInfo.endDate != undefined && projectInfo.endDate != ''">End Date: </dt> <dt *ngIf="projectInfo.endDate">End Date: </dt>
<dd *ngIf="projectInfo.endDate != undefined && projectInfo.endDate != ''">{{projectInfo.endDate}}</dd> <dd *ngIf="projectInfo.endDate">{{projectInfo.endDate}}</dd>
<dt *ngIf="projectInfo.openAccessMandate != undefined && projectInfo.openAccessMandate != ''">Open Access mandate: </dt> <dt *ngIf="projectInfo.openAccessMandate != undefined">Open Access mandate: </dt>
<dd *ngIf="projectInfo.openAccessMandate != undefined && projectInfo.openAccessMandate != ''">{{projectInfo.openAccessMandate}}</dd> <dd *ngIf="projectInfo.openAccessMandate != undefined">{{projectInfo.openAccessMandate}}</dd>
<dt *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">Special Clause 39: </dt> <dt *ngIf="projectInfo.specialClause39">Special Clause 39: </dt>
<dd *ngIf="projectInfo.specialClause39 != undefined && projectInfo.specialClause39 != ''">{{projectInfo.specialClause39}}</dd> <dd *ngIf="projectInfo.specialClause39">{{projectInfo.specialClause39}}</dd>
<dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt> <dt *ngIf="projectInfo.organizations">Organizations: </dt>
<dd *ngIf="projectInfo.organizations != undefined"> <dd *ngIf="projectInfo.organizations">
<span *ngFor="let organization of projectInfo.organizations let i=index"> <span *ngFor="let organization of projectInfo.organizations let i=index">
<span> <span>
<!--a *ngIf="projectInfo.organizations.get(key) != null && <!--a *ngIf="projectInfo.organizations.get(key) != null &&
projectInfo.organizations.get(key) != ''" projectInfo.organizations.get(key) != ''"
href="{{(projectInfo.organizations.get(key))}}"--> href="{{(projectInfo.organizations.get(key))}}"-->
<a *ngIf="organization.id != null && organization.id != ''" <a *ngIf="organization.id"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization"> [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization.name}}</a></span><span {{organization.name}}</a></span><span
*ngIf="organization.id == null || organization.id == ''"> *ngIf="!organization.id">
{{organization.name}}</span><span {{organization.name}}</span><span
*ngIf="i<projectInfo.organizations.length-1">,</span> *ngIf="i<projectInfo.organizations.length-1">,</span>
</span> </span>
</dd> </dd>
<dt *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''">More information:</dt> <dt *ngIf="projectInfo.urlInfo">More information:</dt>
<dd *ngIf="projectInfo.urlInfo != undefined && projectInfo.urlInfo != ''"> <dd *ngIf="projectInfo.urlInfo">
<span class="custom-external custom-icon"> <span class="custom-external custom-icon">
<a target="_blank" href="{{projectInfo.url}}"> <a target="_blank" href="{{projectInfo.url}}">
{{projectInfo.urlInfo}} {{projectInfo.urlInfo}}
@ -89,15 +89,17 @@
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"> <ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary" > <!--div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary" >
There are no publications There are no publications
</div> </div-->
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no publications</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0"> <div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" > <div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
<!--a [href] = "linkToSearchPublications" >
View all {{fetchPublications.searchUtils.totalResults}} results
</a-->
<a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])" <a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications"> routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results View all {{fetchPublications.searchUtils.totalResults}} results
@ -111,9 +113,14 @@
</li> </li>
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary"> <!--div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
There are no research data There are no research data
</div> </div-->
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no research data</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0"> <div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
@ -130,10 +137,17 @@
</div> </div>
</li> </li>
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary"> <!--div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
There are no statistics There are no statistics
</div> </div-->
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NONE && DatasetsComponent.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no statistics</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.ERROR || DatasetsComponent.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE || DatasetsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.LOADING || DatasetsComponent.searchUtils.status == errorCodes.LOADING"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)"> <div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">

View File

@ -13,7 +13,7 @@ import { SearchDatasetsService } from '../../services/searchDatasets.service';
import {ModalLoading} from '../../utils/modal/loading.component'; import {ModalLoading} from '../../utils/modal/loading.component';
import {ReportsService} from '../../services/reports.service'; import {ReportsService} from '../../services/reports.service';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
import { Meta} from '../../../angular2-meta'; import { Meta} from '../../../angular2-meta';
@ -59,6 +59,7 @@ export class ProjectComponent{
public fetchDatasets : FetchDatasets; public fetchDatasets : FetchDatasets;
public linkToSearchDatasets = ""; public linkToSearchDatasets = "";
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
public errorCodes:ErrorCodes = new ErrorCodes();
@ViewChild (ModalLoading) loading : ModalLoading ; @ViewChild (ModalLoading) loading : ModalLoading ;
@ -69,7 +70,6 @@ export class ProjectComponent{
private _searchDatasetsService: SearchDatasetsService, private _searchDatasetsService: SearchDatasetsService,
private _reportsService: ReportsService, private _meta: Meta, private _reportsService: ReportsService, private _meta: Meta,
private _router: Router) { private _router: Router) {
console.info('project constructor.');
this.updateUrl(OpenaireProperties.getBaseLink()+this._router.url); this.updateUrl(OpenaireProperties.getBaseLink()+this._router.url);
} }
@ -85,7 +85,6 @@ export class ProjectComponent{
this.updateDescription("project, funding, open access, publications, datasets, "); this.updateDescription("project, funding, open access, publications, datasets, ");
this.projectId = params['projectId']; this.projectId = params['projectId'];
console.info("Id is :"+this.projectId);
if(this.projectId){ if(this.projectId){
this.publications_dynamic = this.publications_dynamic =
"<script type=\"text/javascript\">" "<script type=\"text/javascript\">"
@ -112,13 +111,16 @@ export class ProjectComponent{
this.searchPublications(); this.searchPublications();
// }); // });
this.subDatasetsCount = this._searchDatasetsService.numOfEntityDatasets(this.projectId, "projects/").subscribe( //this.subDatasetsCount = this._searchDatasetsService.numOfEntityDatasets(this.projectId, "projects/").subscribe(
data => { // data => {
this.fetchDatasets.searchUtils.totalResults = data; // this.fetchDatasets.searchUtils.totalResults = data;
}, // },
err => { // err => {
console.log(err); // console.log(err);
}); // }
//);
this.fetchDatasets.getNumResultsForEntity("project", this.projectId);
}else{ }else{
this.warningMessage="No valid project id"; this.warningMessage="No valid project id";
} }
@ -138,7 +140,7 @@ export class ProjectComponent{
ngOnDestroy() { ngOnDestroy() {
this.sub.unsubscribe(); this.sub.unsubscribe();
this.subDatasetsCount.unsubscribe(); //this.subDatasetsCount.unsubscribe();
} }
createClipboard() { createClipboard() {
@ -169,12 +171,12 @@ export class ProjectComponent{
} }
getProjectInfo (id:string) { getProjectInfo (id:string) {
console.info("inside getProjectInfo of component");
this.warningMessage = ''; this.warningMessage = '';
this.errorMessage="" this.errorMessage=""
this._projectService.getProjectInfo(id).subscribe( this._projectService.getProjectInfo(id).subscribe(
data => { data => {
this.projectInfo = data; this.projectInfo = data;
console.info(this.projectInfo.title);
this.projectName = this.projectInfo.acronym; this.projectName = this.projectInfo.acronym;
if(this.projectName == undefined || this.projectName == '') { if(this.projectName == undefined || this.projectName == '') {
this.projectName = this.projectInfo.title; this.projectName = this.projectInfo.title;
@ -204,8 +206,6 @@ export class ProjectComponent{
); );
} }
downloadfile(url:string){ downloadfile(url:string){
console.log("Downloading file: "+ url);
this.openLoading(); this.openLoading();
this.setMessageLoading("Downloading CSV file"); this.setMessageLoading("Downloading CSV file");

View File

@ -64,8 +64,6 @@ export class ProjectService {
} }
getHTMLInfo(id: string): any { getHTMLInfo(id: string): any {
console.info("getHTMLInfo in service");
let url = OpenaireProperties. getSearchAPIURLLast() + 'projects/'+id+"?format=json"; let url = OpenaireProperties. getSearchAPIURLLast() + 'projects/'+id+"?format=json";
let key = url; let key = url;
if (this._cache.has(key)) { if (this._cache.has(key)) {
@ -94,7 +92,6 @@ export class ProjectService {
if(data != null) { if(data != null) {
htmlInfo = {"title": data.title, "acronym": data.acronym, "callIdentifier": data.callidentifier}; htmlInfo = {"title": data.title, "acronym": data.acronym, "callIdentifier": data.callidentifier};
} }
console.info(htmlInfo);
return htmlInfo; return htmlInfo;
} }

View File

@ -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; delay:10" <span 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>
@ -23,30 +23,34 @@
</div> </div>
<dl class="uk-description-list"> <dl class="uk-description-list">
<dt *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">Publisher: </dt> <dt *ngIf="publicationInfo.publisher">Publisher: </dt>
<dd *ngIf="publicationInfo.publisher != undefined && publicationInfo.publisher != ''">{{publicationInfo.publisher}}</dd> <dd *ngIf="publicationInfo.publisher">{{publicationInfo.publisher}}</dd>
<dt *ngIf="publicationInfo.journal != undefined && publicationInfo.journal['journal'] != ''">Journal: </dt> <dt *ngIf="publicationInfo.journal &&
<dd *ngIf="publicationInfo.journal != undefined && publicationInfo.journal != ''"> (publicationInfo.journal['journal'] || publicationInfo.journal['issn'] || publicationInfo.journal['lissn'])">
{{publicationInfo.journal['journal']}} Journal:
<span *ngIf="publicationInfo.journal['issn'] != '' || publicationInfo.journal['lissn'] != ''"> </dt>
<dd *ngIf="publicationInfo.journal &&
(publicationInfo.journal['journal'] || publicationInfo.journal['issn'] || publicationInfo.journal['lissn'])">
<span *ngIf="publicationInfo.journal['journal']">{{publicationInfo.journal['journal']}}</span>
<span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['lissn']">
( (
</span> </span>
<span *ngIf="publicationInfo.journal['issn'] != ''"> <span *ngIf="publicationInfo.journal['issn']">
issn: {{publicationInfo.journal['issn']}} issn: {{publicationInfo.journal['issn']}}
</span> </span>
<span *ngIf="publicationInfo.journal['lissn'] != ''"> <span *ngIf="publicationInfo.journal['lissn']">
lissn: {{publicationInfo.journal['lissn']}} lissn: {{publicationInfo.journal['lissn']}}
</span> </span>
<span *ngIf="publicationInfo.journal['issn'] != '' || publicationInfo.journal['lissn'] != ''"> <span *ngIf="publicationInfo.journal['issn'] || publicationInfo.journal['lissn']">
) )
</span> </span>
</dd> </dd>
<dt *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''"> Languages: </dt> <dt *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0"> Languages: </dt>
<dd *ngIf="publicationInfo.languages != undefined && publicationInfo.languages != 'Undetermined' && publicationInfo.languages != ''">{{publicationInfo.languages}}</dd> <dd *ngIf="publicationInfo.languages && publicationInfo.languages.length > 0">{{publicationInfo.languages}}</dd>
<dt *ngIf="publicationInfo.types != undefined && publicationInfo.types.length > 0"> Types: </dt> <dt *ngIf="publicationInfo.types != undefined && publicationInfo.types.length > 0"> Types: </dt>
<dd *ngIf="publicationInfo.types != undefined && publicationInfo.types.length > 0">{{publicationInfo.types}}</dd> <dd *ngIf="publicationInfo.types != undefined && publicationInfo.types.length > 0">{{publicationInfo.types}}</dd>
<dt *ngIf="publicationInfo.embargoEndDate != undefined && publicationInfo.embargoEndDate != ''">Embargo end date: </dt> <dt *ngIf="publicationInfo.embargoEndDate">Embargo end date: </dt>
<dd *ngIf="publicationInfo.embargoEndDate != undefined && publicationInfo.embargoEndDate != ''">{{publicationInfo.embargoEndDate}}</dd> <dd *ngIf="publicationInfo.embargoEndDate">{{publicationInfo.embargoEndDate}}</dd>
<showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers> <showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers>
<showSubjects [subjects]="publicationInfo.subjects" <showSubjects [subjects]="publicationInfo.subjects"
@ -55,7 +59,7 @@
</showSubjects> </showSubjects>
</dl> </dl>
<blockquote *ngIf="publicationInfo.description != ''"> <blockquote *ngIf="publicationInfo.description">
<div class="uk-text-justify">{{publicationInfo.description}}</div> <div class="uk-text-justify">{{publicationInfo.description}}</div>
</blockquote> </blockquote>
@ -68,8 +72,8 @@
<li (click)="activeTab='References'"> <li (click)="activeTab='References'">
<a> <a>
References References
<span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.references" class="uk-badge uk-badge-notification">
{{publicationInfo.references.length}} {{publicationInfo.references.length}}
</span> </span>
</a> </a>
@ -85,8 +89,8 @@
<li (click)="activeTab='Similar Research Results'"> <li (click)="activeTab='Similar Research Results'">
<a> <a>
Similar Research Results Similar Research Results
<span *ngIf="publicationInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{publicationInfo.similarResearchResults.length}} {{publicationInfo.similarResearchResults.length}}
</span> </span>
</a> </a>
@ -94,19 +98,19 @@
<li (click)="activeTab='Related Organizations'"> <li (click)="activeTab='Related Organizations'">
<a> <a>
Related Organizations Related Organizations
<span *ngIf="publicationInfo.organizations == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.organizations" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.organizations != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.organizations" class="uk-badge uk-badge-notification">
{{publicationInfo.organizations.length}} {{publicationInfo.organizations.length}}
</span> </span>
</a> </a>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined" (click)="activeTab='Bioentities'"> <li *ngIf="publicationInfo.bioentities" (click)="activeTab='Bioentities'">
<a> <a>
Bioentities Bioentities
<span class="uk-badge uk-badge-notification">{{bioentitiesNum}}</span> <span class="uk-badge uk-badge-notification">{{bioentitiesNum}}</span>
</a> </a>
</li> </li>
<li *ngIf="publicationInfo.software != undefined" (click)="activeTab='Software'"> <li *ngIf="publicationInfo.software" (click)="activeTab='Software'">
<a> <a>
Software Software
<span class="uk-badge uk-badge-notification">{{publicationInfo.software.length}}</span> <span class="uk-badge uk-badge-notification">{{publicationInfo.software.length}}</span>
@ -129,8 +133,8 @@
<li (click)="activeTab='References'"> <li (click)="activeTab='References'">
<a> <a>
References References
<span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.references" class="uk-badge uk-badge-notification">
{{publicationInfo.references.length}} {{publicationInfo.references.length}}
</span> </span>
</a> </a>
@ -146,8 +150,8 @@
<li (click)="activeTab='Similar Research Results'"> <li (click)="activeTab='Similar Research Results'">
<a> <a>
Similar Research Results Similar Research Results
<span *ngIf="publicationInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{publicationInfo.similarResearchResults.length}} {{publicationInfo.similarResearchResults.length}}
</span> </span>
</a> </a>
@ -155,19 +159,19 @@
<li (click)="activeTab='Related Organizations'"> <li (click)="activeTab='Related Organizations'">
<a> <a>
Related Organizations Related Organizations
<span *ngIf="publicationInfo.organizations == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="!publicationInfo.organizations" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.organizations != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.organizations" class="uk-badge uk-badge-notification">
{{publicationInfo.organizations.length}} {{publicationInfo.organizations.length}}
</span> </span>
</a> </a>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined" (click)="activeTab='Bioentities'"> <li *ngIf="publicationInfo.bioentities" (click)="activeTab='Bioentities'">
<a> <a>
Bioentities Bioentities
<span class="uk-badge uk-badge-notification">{{bioentitiesNum}}</span> <span class="uk-badge uk-badge-notification">{{bioentitiesNum}}</span>
</a> </a>
</li> </li>
<li *ngIf="publicationInfo.software != undefined" (click)="activeTab='Software'"> <li *ngIf="publicationInfo.software" (click)="activeTab='Software'">
<a> <a>
Software Software
<span class="uk-badge uk-badge-notification">{{publicationInfo.software.length}}</span> <span class="uk-badge uk-badge-notification">{{publicationInfo.software.length}}</span>
@ -182,35 +186,35 @@
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"> <ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.references == undefined" class = "uk-alert uk-alert-primary" > <div *ngIf="!publicationInfo.references" class = "uk-alert uk-alert-primary" >
There are no references There are no references
</div> </div>
<div *ngIf="publicationInfo.references != undefined"> <div *ngIf="publicationInfo.references">
<tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging> <tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging>
<div *ngFor="let item of publicationInfo.references.slice(0,10)"> <div *ngFor="let item of publicationInfo.references.slice(0,10)">
<p *ngIf=" item != undefined && item['url'] != undefined" <p *ngIf=" item && item['url']"
class="custom-external custom-icon"> class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank"> <a href="{{item['url']}}" target="_blank">
{{item['name']}} {{item['name']}}
</a> </a>
</p> </p>
<p *ngIf="item['url'] == undefined"> <p *ngIf="!item['url']">
{{item['name']}} {{item['name']}}
</p> </p>
</div> </div>
<div *ngIf="showAllReferences"> <div *ngIf="showAllReferences">
<div *ngFor="let item of publicationInfo.references.slice(10)"> <div *ngFor="let item of publicationInfo.references.slice(10)">
<p *ngIf=" item != undefined && item['url'] != undefined" <p *ngIf=" item && item['url']"
class="custom-external custom-icon"> class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank"> <a href="{{item['url']}}" target="_blank">
{{item['name']}} {{item['name']}}
</a> </a>
</p> </p>
<p *ngIf="item['url'] == undefined"> <p *ngIf="!item['url']">
{{item['name']}} {{item['name']}}
</p> </p>
</div> </div>
@ -222,10 +226,10 @@
</li> </li>
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.relatedResearchResults == undefined" class = "uk-alert uk-alert-primary"> <div *ngIf="!publicationInfo.relatedResearchResults" class = "uk-alert uk-alert-primary">
There are no related research results There are no related research results
</div> </div>
<div *ngIf="publicationInfo.relatedResearchResults != undefined"> <div *ngIf="publicationInfo.relatedResearchResults">
<div *ngFor="let provenanceaction of publicationInfo.relatedResearchResults.keys()"> <div *ngFor="let provenanceaction of publicationInfo.relatedResearchResults.keys()">
<h4>{{provenanceaction}}</h4> <h4>{{provenanceaction}}</h4>
@ -236,20 +240,20 @@
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.similarResearchResults == undefined" class = "uk-alert uk-alert-primary"> <div *ngIf="!publicationInfo.similarResearchResults" class = "uk-alert uk-alert-primary">
There are no similar research results There are no similar research results
</div> </div>
<div *ngIf="publicationInfo.similarResearchResults != undefined"> <div *ngIf="publicationInfo.similarResearchResults">
<tabTable [info]="publicationInfo.similarResearchResults"></tabTable> <tabTable [info]="publicationInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
<li class="uk-animation-fade"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.organizations == undefined" class = "uk-alert uk-alert-primary"> <div *ngIf="!publicationInfo.organizations" class = "uk-alert uk-alert-primary">
There are no related organizations There are no related organizations
</div> </div>
<div *ngIf="publicationInfo.organizations != undefined"> <div *ngIf="publicationInfo.organizations">
<table class="uk-table uk-table-striped"> <table class="uk-table uk-table-striped">
<thead> <thead>
@ -261,38 +265,30 @@
<tbody> <tbody>
<tr *ngFor="let organization of publicationInfo.organizations"> <tr *ngFor="let organization of publicationInfo.organizations">
<td> <td>
<a *ngIf="(organization['id'] != undefined && organization['id'] != '') <a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))"
&& ((organization['name'] != undefined && organization['name'] != '')
|| (organization['shortname'] != undefined && organization['shortname'] != ''))"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization"> [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization['name']}} {{organization['name']}}
<span *ngIf="organization.name != undefined && organization.name != '' <span *ngIf="organization.name && organization.shortname"> ( </span>
&& organization.shortname != undefined && organization.shortname != ''"> ( </span> <span *ngIf="organization.shortname">{{organization.shortname}}</span>
<span *ngIf="organization.shortname != undefined && organization.shortname != ''">{{organization.shortname}}</span> <span *ngIf="organization.name && organization.shortname"> ) </span>
<span *ngIf="organization.name != undefined && organization.name != ''
&& organization.shortname != undefined && organization.shortname != ''"> ) </span>
</a> </a>
<p *ngIf="(organization['id'] == undefined || organization['id'] == '') <p *ngIf="(!organization['id']) && ((organization['name']) || (organization['shortname']))">
&& ((organization['name'] != undefined && organization['name'] != '')
|| (organization['shortname'] != undefined && organization['shortname'] != ''))">
{{organization['name']}} {{organization['name']}}
<span *ngIf="organization.name != undefined && organization.name != '' <span *ngIf="organization.name && organization.shortname"> ( </span>
&& organization.shortname != undefined && organization.shortname != ''"> ( </span> <span *ngIf="organization.shortname">{{organization.shortname}}</span>
<span *ngIf="organization.shortname != undefined && organization.shortname != ''">{{organization.shortname}}</span> <span *ngIf="organization.name && organization.shortname"> ) </span>
<span *ngIf="organization.name != undefined && organization.name != ''
&& organization.shortname != undefined && organization.shortname != ''"> ) </span>
</p> </p>
<div *ngIf="organization.websiteUrl != undefined && organization.websiteUrl != ''">Website url: <div *ngIf="organization.websiteUrl">Website url:
<a href="{{organization.websiteUrl}}" target="_blank">{{organization.websiteUrl}}</a> <a href="{{organization.websiteUrl}}" target="_blank">{{organization.websiteUrl}}</a>
</div> </div>
<div *ngIf="organization.country != undefined && organization.country != ''">Country: {{organization.country}}</div> <div *ngIf="organization.country">Country: {{organization.country}}</div>
</td> </td>
<td> <td>
<div *ngIf="organization['trust'] != undefined && organization['trust'] != ''" title="{{organization['trust']}}%" > <div *ngIf="organization['trust']" title="{{organization['trust']}}%" >
<div class="uk-text-center">{{organization['trust']}}%</div> <div class="uk-text-center">{{organization['trust']}}%</div>
<progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress> <progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress>
</div> </div>
<div *ngIf="organization['trust'] == undefined || organization['trust'] == ''"> <div *ngIf="!organization['trust']">
<p>no trust found</p> <p>no trust found</p>
</div> </div>
</td> </td>
@ -304,7 +300,7 @@
</div> </div>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined" class="uk-animation-fade"> <li *ngIf="publicationInfo.bioentities" class="uk-animation-fade">
<table id="bioentitiesTable" class="uk-table uk-table-striped"> <table id="bioentitiesTable" class="uk-table uk-table-striped">
<thead> <thead>
<tr> <tr>
@ -314,7 +310,7 @@
</thead> </thead>
<tbody *ngFor="let key of publicationInfo.bioentities.keys()"> <tbody *ngFor="let key of publicationInfo.bioentities.keys()">
<tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()"> <tr *ngFor="let keyIn of publicationInfo.bioentities.get(key).keys()">
<td class="uk-text-center" *ngIf="keyIn != undefined"> <td class="uk-text-center" *ngIf="keyIn">
<span class="custom-external custom-icon"> <span class="custom-external custom-icon">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}" <a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}"
target="_blank"> target="_blank">
@ -329,7 +325,7 @@
</tbody> </tbody>
</table> </table>
</li> </li>
<li *ngIf="publicationInfo.software != undefined" class="uk-animation-fade"> <li *ngIf="publicationInfo.software" class="uk-animation-fade">
<table id="softwareTable" class="uk-table uk-table-striped"> <table id="softwareTable" class="uk-table uk-table-striped">
<thead> <thead>
@ -375,19 +371,19 @@
<addThis></addThis> <addThis></addThis>
</dd> </dd>
</dl> </dl>
<altmetrics *ngIf="publicationInfo.identifiers != undefined && publicationInfo.identifiers.get('doi') != undefined" <altmetrics *ngIf="publicationInfo.identifiers && publicationInfo.identifiers.get('doi')"
id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi"> id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi">
</altmetrics> </altmetrics>
</li> </li>
<li *ngIf="publicationInfo.downloadFrom != undefined && publicationInfo.downloadFrom.size > 0"> <li *ngIf="publicationInfo.downloadFrom && publicationInfo.downloadFrom.size > 0">
<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" >
<div *ngIf="i<5 || showAllDownloadFrom" <div *ngIf="i<5 || showAllDownloadFrom"
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}"> class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10" <span class="custom-external custom-icon" uk-tooltip="pos:right; delay:10"
[title]="publicationInfo.downloadFrom.get(key)['accessMode']"> [title]="publicationInfo.downloadFrom.get(key)['accessMode']">
<span *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1"> <span *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
{{key}} {{key}}
@ -418,13 +414,13 @@
</dd> </dd>
</dl> </dl>
</li> </li>
<li *ngIf="publicationInfo.publishedIn != undefined && publicationInfo.publishedIn.size > 0"> <li *ngIf="publicationInfo.publishedIn && publicationInfo.publishedIn.size > 0">
<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"
> >
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}"> <div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10" <span class="custom-external custom-icon" uk-tooltip="pos:right; delay:10"
[title]="publicationInfo.publishedIn.get(key)['accessMode']"> [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}}
@ -463,8 +459,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; delay:10" <span 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"
@ -524,8 +520,8 @@
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 5">...</dd> <dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects && publicationInfo.fundedByProjects.length > 5">...</dd>
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 5" class="uk-text-right"> <dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects && publicationInfo.fundedByProjects.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;"> <a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View more View more
</a> </a>
@ -540,13 +536,13 @@
<dd class="line" *ngFor="let item of publicationInfo.contexts"> <dd class="line" *ngFor="let item of publicationInfo.contexts">
<span *ngIf = "!item['inline']" > <span *ngIf = "!item['inline']" >
<span>{{item['labelContext']}}</span> <span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory'] != null">-> {{item['labelCategory']}}</span> <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span> <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</span> </span>
<mark *ngIf = "item['inline']" > <mark *ngIf = "item['inline']" >
<span>{{item['labelContext']}}</span> <span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory'] != null">-> {{item['labelCategory']}}</span> <span *ngIf="item['labelCategory']">-> {{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept'] != null">: {{item['labelConcept']}}</span> <span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</mark> </mark>
</dd> </dd>
<dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <span uk-icon="icon: link"></span> Add links to contexts</a></dd> <dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <span uk-icon="icon: link"></span> Add links to contexts</a></dd>
@ -554,7 +550,7 @@
</li> </li>
<li><citeThis [result]="publicationInfo" [id]="articleId"></citeThis></li> <li><citeThis [result]="publicationInfo" [id]="articleId"></citeThis></li>
<li *ngIf="publicationInfo.collectedFrom != undefined && publicationInfo.collectedFrom.length > 0"> <li *ngIf="publicationInfo.collectedFrom && publicationInfo.collectedFrom.length > 0">
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngFor="let item of publicationInfo.collectedFrom let i=index"> <dd *ngFor="let item of publicationInfo.collectedFrom let i=index">
@ -587,10 +583,3 @@
</div> </div>
</div> </div>
</div> </div>
<!--script>
$("#tabs").on('change.uk.tab', function(event, area, previous){
console.info("Switcher switched to ", area);
});
</script-->

View File

@ -168,7 +168,7 @@ export class PublicationComponent {
public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string, "funderShortname": string, "funderName": string,
"funding": string, "code": string, inline: boolean}) { "funding": string, "code": string, inline: boolean}) {
let tooltipContent: string = "<div class='uk-margin'>"; let tooltipContent: string = "<div class='uk-margin uk-light'>";
if(item.title) { if(item.title) {
tooltipContent += "<h4>"+item.title+"</h4>"; tooltipContent += "<h4>"+item.title+"</h4>";

View File

@ -520,13 +520,23 @@ export class PublicationService {
this.publicationInfo.languages = new Array<string>(); this.publicationInfo.languages = new Array<string>();
if(data[6].hasOwnProperty("classname")) { if(data[6].hasOwnProperty("classname")) {
if(data[6].classname != "Undetermined") {
this.publicationInfo.languages[0] = data[6].classname; this.publicationInfo.languages[0] = data[6].classname;
}
} else { } else {
for(let i=0; i<data[6].length; i++) { for(let i=0; i<data[6].length; i++) {
this.publicationInfo.languages[i] = data[6][i].classname; if(data[6][i].classname != "Undetermined") {
this.publicationInfo.languages.push(data[6][i].classname);
} }
} }
} }
}
if(this.publicationInfo.languages != undefined) {
console.info("NUMBER OF LANGUAGES: "+this.publicationInfo.languages.length);
} else {
console.info("NUMBER OF LANGUAGES: 0 -- undefined");
}
console.info(this.publicationInfo.languages);
if(data[7] != null) { if(data[7] != null) {
let subject; let subject;
@ -586,7 +596,9 @@ export class PublicationService {
} }
} }
if(this.publicationInfo.publisher != null if( this.publicationInfo.publisher != undefined
&& this.publicationInfo.publisher != null
&& this.publicationInfo.publisher != ''
&& this.publicationInfo.identifiers != null && this.publicationInfo.identifiers != null
&& this.publicationInfo.identifiers.has('doi')) { && this.publicationInfo.identifiers.has('doi')) {
@ -595,7 +607,8 @@ export class PublicationService {
} }
let key: string; let key: string;
if(this.publicationInfo.journal != null) { if(this.publicationInfo.journal != undefined && this.publicationInfo.journal.journal != undefined
&& this.publicationInfo.journal.journal != null && this.publicationInfo.journal.journal != '') {
key = this.publicationInfo.publisher + "/ "+this.publicationInfo.journal['journal']; key = this.publicationInfo.publisher + "/ "+this.publicationInfo.journal['journal'];
} else { } else {
key = this.publicationInfo.publisher; key = this.publicationInfo.publisher;

View File

@ -4,16 +4,20 @@ import {ActivatedRoute} from '@angular/router';
import { FetchProjects } from '../utils/fetchEntitiesClasses/fetchProjects.class'; import { FetchProjects } from '../utils/fetchEntitiesClasses/fetchProjects.class';
import { SearchProjectsService } from '../services/searchProjects.service'; import { SearchProjectsService } from '../services/searchProjects.service';
import {OpenaireProperties} from '../utils/properties/openaireProperties'; import {OpenaireProperties, ErrorCodes} from '../utils/properties/openaireProperties';
import {StringUtils} from '../utils/string-utils.class'; import {StringUtils} from '../utils/string-utils.class';
import {RouterHelper} from '../utils/routerHelper.class'; import {RouterHelper} from '../utils/routerHelper.class';
@Component({ @Component({
selector: 'searchingProjectsTab', selector: 'searchingProjectsTab',
template: ` template: `
<div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert"> <!--div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert">
There are no projects There are no projects
</div> </div-->
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no projects</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div>
<div *ngIf="fetchProjects.searchUtils.totalResults > 0"> <div *ngIf="fetchProjects.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchProjects.totalResults > 10"> <div class = "uk-text-right" *ngIf = "fetchProjects.totalResults > 10">
@ -59,6 +63,7 @@ export class SearchingProjectsTabComponent {
private sub: any; private sub: any;
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
public errorCodes:ErrorCodes = new ErrorCodes();
constructor (private route: ActivatedRoute, constructor (private route: ActivatedRoute,
private _searchProjectsService: SearchProjectsService) { private _searchProjectsService: SearchProjectsService) {

View File

@ -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="custom-external"><span class=" custom-icon {{title['accessMode']}}" class="custom-external"><span class=" custom-icon {{title['accessMode']}}"
data-uk-tooltip="pos:bottom-right" 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="pos:bottom-right" 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="pos:bottom-right" uk-tooltip="pos:bottom-right"
[title]="title['accessMode']"> [title]="title['accessMode']">
[no title available] [no title available]
</span> </span>

View File

@ -76,6 +76,7 @@ export class SearchCompatibleDataprovidersComponent {
this.searchUtils.page = (params['page']=== undefined)?1:+params['page']; this.searchUtils.page = (params['page']=== undefined)?1:+params['page'];
this.filters = this.createFilters(); this.filters = this.createFilters();
var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params); var queryParameters = this.searchPage.getIndexQueryParametersFromUrl(params);
console.info("|"+queryParameters+"|");
this._getResults(queryParameters, false, this.searchUtils.page, this.searchUtils.size); this._getResults(queryParameters, false, this.searchUtils.page, this.searchUtils.size);
}); });
} }
@ -151,7 +152,7 @@ export class SearchCompatibleDataprovidersComponent {
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]]; ["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];
var value_original_ids=[ var value_original_ids=[
["pubsrepository::institutional","pubsrepository::thematic", "pubsrepository::unknown", "aggregator::pubsrepository::thematic","aggregator::pubsrepository::institutional","aggregator::pubsrepository::unknown", ["pubsrepository::institutional","pubsrepository::thematic", "pubsrepository::unknown", "aggregator::pubsrepository::institutional","aggregator::pubsrepository::thematic","aggregator::pubsrepository::unknown",
"datarepository::unknown", "aggregator::datarepository", "pubsrepository::journal", "aggregator::pubsrepository::journals", "cris", "pubscatalogue::unknown"], "datarepository::unknown", "aggregator::datarepository", "pubsrepository::journal", "aggregator::pubsrepository::journals", "cris", "pubscatalogue::unknown"],
//["driver","openaire2.0", "driver-openaire2.0", "openaire3.0","openaire2.0_data"] //["driver","openaire2.0", "driver-openaire2.0", "openaire3.0","openaire2.0_data"]
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]]; ["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];

View File

@ -143,7 +143,7 @@ export class SearchEntityRegistriesComponent {
var searchFields = new SearchFields(); var searchFields = new SearchFields();
var filter_original_ids = searchFields.ENTITY_REGISTRIES_FIELDS; var filter_original_ids = searchFields.ENTITY_REGISTRIES_FIELDS;
var value_names=[ var value_names=[
["Funder database","Registry of repositories","Scholarly Comm. Infrastructure","Registry","Information Space","Web Source"], ["Funder","Registry of repositories","Scholarly Comm. Infrastructure","Registry","Information Space","Web Source"],
["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]]; ["OpenAIRE Basic (DRIVER OA)","OpenAIRE 2.0 (EC funding)", "OpenAIRE 2.0+ (DRIVER OA, EC funding)", "OpenAIRE 3.0 (OA, funding)","OpenAIRE Data (funded, referenced datasets)"]];

View File

@ -54,7 +54,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<ul *ngIf="filter.values.length > 0" class="uk-list uk-list-line browseFilters"> <ul *ngIf="filter.values.length > 0" class="uk-list uk-list-line browseFilters">
<li *ngFor= "let value of filter.values"><!--a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a--> <li *ngFor= "let value of filter.values"><!--a [href]="baseUrl+'?'+filter.filterId+'='+value.id">{{_formatName(value)}} ({{value.number}})</a-->
<a class = "uk-modal-close filterItem" [queryParams]="routerHelper.createQueryParam(filter.filterId,quote(value.id))" routerLinkActive="router-link-active" [routerLink]=baseUrl> <a class = "uk-modal-close filterItem" [queryParams]="routerHelper.createQueryParam(filter.filterId,quote(value.id))" routerLinkActive="router-link-active" [routerLink]=baseUrl>
<span class="filterName"><div title = "{{value.name}}">{{_formatName(value)}} </div></span><span class="filterNumber" > ({{value.number}})</span></a> <span class="filterName"><div title = "{{value.name}}">{{_formatName(value)}} </div></span> <span class="filterNumber" > ({{value.number}})</span></a>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -29,11 +29,42 @@ import {Open} from '../../utils/modal/open.component';
<span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number}})</span> <span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number}})</span>
</div> </div>
<a *ngIf="(getSelectedValues(filter).length + getNotSelectedValues(filter).length) > 5" (click)="toggle()" [class]="(isDisabled)?'uk-disabled uk-link-muted':''">Show More</a> <!--a *ngIf="(getSelectedValues(filter).length + getNotSelectedValues(filter).length) > 5" (click)="toggle()" [class]="(isDisabled)?'uk-disabled uk-link-muted':''">Show More</a-->
<!--button *ngIf="(getSelectedValues(filter).length + getNotSelectedValues(filter).length) > 5" <!--button *ngIf="(getSelectedValues(filter).length + getNotSelectedValues(filter).length) > 5"
class="uk-button uk-button-link" (click)="toggle()" [disabled]="isDisabled"> class="uk-button uk-button-link" (click)="toggle()" [disabled]="isDisabled">
Show More Show More
</button--> </button-->
<a *ngIf="(getSelectedValues(filter).length + getNotSelectedValues(filter).length) > 5" (click)="open()" [class]="(isDisabled)?'uk-disabled uk-link-muted':''">Show More</a>
<div [class]="(!isOpen)?'uk-modal ':'uk-modal uk-open uk-animation-fade'" uk-modal [open]="!isOpen" id="modal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" bg-close="true">
<div class="uk-modal-dialog uk-width-1-4 uk-padding-small uk-padding-remove-top uk-padding-remove-horizontal">
<button type="button" class="uk-modal-close-default" uk-close (click)="close()"></button>
<h3 class="uk-margin-remove uk-padding uk-padding-remove-bottom">
{{filter.title}}
</h3>
<div class="uk-modal-body uk-overflow-auto uk-height-medium uk-padding-remove
uk-margin-medium-left uk-margin-medium-right uk-margin-medium-top uk-margin-bottom">
<div *ngFor = "let value of getSelectedValues(filter)" class = "uk-animation-fade filterItem">
<span class="filterName"><div title = "{{value.name}}">
<input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="close(); filterChange(value.selected)" />
{{_formatName(value)}} </div></span>
<span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number}})</span>
</div>
<hr *ngIf="getSelectedValues(filter).length > 0 && getNotSelectedValues(filter).length > 0" class="uk-grid-divider uk-margin-remove">
<div *ngFor = "let value of getNotSelectedValues(filter)" class = "uk-animation-fade filterItem">
<span class="filterName"><div title = "{{value.name}}"> <input [disabled]="isDisabled" [(ngModel)]="value.selected" type="checkbox" (ngModelChange)="close(); filterChange(value.selected)" />
{{_formatName(value)}} </div></span>
<span class="filterNumber" *ngIf = "showResultCount === true" > ({{value.number}})</span>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</li> </li>
@ -53,6 +84,10 @@ export class SearchFilterComponent {
@Output() toggleModal = new EventEmitter(); @Output() toggleModal = new EventEmitter();
@Output() modalChange = new EventEmitter(); @Output() modalChange = new EventEmitter();
public isOpen:boolean=false;
filterModalChange() { filterModalChange() {
console.info("Modal Changed"); console.info("Modal Changed");
this.modalChange.emit({ this.modalChange.emit({
@ -81,6 +116,7 @@ export class SearchFilterComponent {
} }
filterChange(selected:boolean){ filterChange(selected:boolean){
console.info("filter change: "+selected);
if(selected){ if(selected){
this.filter.countSelectedValues++; this.filter.countSelectedValues++;
// this.reorderFilterValues(); // this.reorderFilterValues();
@ -145,4 +181,26 @@ export class SearchFilterComponent {
}); });
} }
open() {
this.isOpen = true;
}
close() {
this.isOpen = false;
}
filterChange2(selected:boolean){
console.info("filter change2");
if(selected){
this.filter.countSelectedValues++;
// this.reorderFilterValues();
}else{
this.filter.countSelectedValues--;
// this.reorderFilterValues();
}
this.close();
}
} }

View File

@ -103,7 +103,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<!--modal-loading [message]= "'Loading results...'"></modal-loading--> <!--modal-loading [message]= "'Loading results...'"></modal-loading-->
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter> <!--modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter-->
` `
}) })
@ -138,7 +138,7 @@ export class SearchPageComponent {
public parameterNames:string[] =[]; public parameterNames:string[] =[];
public parameterValues:string[] =[]; public parameterValues:string[] =[];
@ViewChild (SearchFilterModalComponent) searchFilterModal : SearchFilterModalComponent ; //@ViewChild (SearchFilterModalComponent) searchFilterModal : SearchFilterModalComponent ;
public currentFilter: Filter; public currentFilter: Filter;
constructor (private location: Location , private _meta: Meta,private element: ElementRef) { constructor (private location: Location , private _meta: Meta,private element: ElementRef) {
@ -152,7 +152,7 @@ export class SearchPageComponent {
this.defineUrlParam(); this.defineUrlParam();
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);
this.updateDescription("Openaire, search, repositories, open access, type, data provider, funder, project, " + this.type + "," +this.pageTitle); this.updateDescription("Openaire, search, repositories, open access, type, data provider, funder, project, " + this.type + "," +this.pageTitle);
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname); //this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
// console.info(this.entityType + " " + this.urlParam + this.type); // console.info(this.entityType + " " + this.urlParam + this.type);
} }
ngAfterViewChecked(){ ngAfterViewChecked(){
@ -161,7 +161,7 @@ export class SearchPageComponent {
toggleModal($event) { toggleModal($event) {
this.currentFilter = $event.value; this.currentFilter = $event.value;
this.searchFilterModal.open(); //this.searchFilterModal.open();
} }
updateDescription(description:string){ updateDescription(description:string){

View File

@ -7,10 +7,10 @@ import {RouterHelper} from '../../utils/routerHelper.class';
selector: 'tab-result', selector: 'tab-result',
template: ` template: `
<ul class="uk-list uk-list-divider uk-margin"> <ul class="uk-list uk-list-divider uk-margin">
<div *ngIf="status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div> <!--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.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</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.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> <div *ngIf="status == errorCodes.LOADING && showLoading" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">Loading...</div-->
<li *ngFor="let result of results" class="uk-animation-fade"> <li *ngFor="let result of results" class="uk-animation-fade">
<div class = "uk-text-large {{result.title.accessMode}} {{result.title.sc39}}" [title] = result.title.accessMode > <div class = "uk-text-large {{result.title.accessMode}} {{result.title.sc39}}" [title] = result.title.accessMode >

View File

@ -83,7 +83,7 @@ export class MetricsService {
this.metrics.infos.set(id, info); this.metrics.infos.set(id, info);
} }
} }
console.info(this.metrics.infos.size); console.info("Metrics : "+this.metrics.infos.size);
return this.metrics; return this.metrics;
} }

View File

@ -18,7 +18,7 @@ export class OrganizationService {
getOrganizationInfo (id: string):any { getOrganizationInfo (id: string):any {
console.info("getOrganizationInfo in service"); console.info("getOrganizationInfo in service");
//let url = OpenaireProperties. getSearchAPIURLLast()+'organizations/'+id+"?format=json"; //let url = OpenaireProperties. getSearchAPIURLLast()+'organizations/'+id+"?format=json";
let url = OpenaireProperties.getSearchAPIURLLast()+'resources?format=json&query=( (oaftype exact organization) 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 ( objIdentifier ='+id+')'; let url = /*OpenaireProperties.getSearchAPIURLLast()+*/'https://beta.services.openaire.eu/search/v2/api/'+'resources?format=json&query=( (oaftype exact organization) 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 ( objIdentifier ='+id+')';
//let url = "http://beta.services.openaire.eu:8480/search/rest/v2/api/resources?format=json&query=(%20(oaftype%20exact%20organization)%20and%20(reldatasourcecompatibilityid=driver%20or%20reldatasourcecompatibilityid=driver-openaire2.0%20or%20reldatasourcecompatibilityid=openaire2.0%20or%20reldatasourcecompatibilityid=openaire3.0%20or%20reldatasourcecompatibilityid=openaire2.0_data%20or%20reldatasourcecompatibilityid=hostedBy%20or%20relprojectid=*))%20and%20(%20objIdentifier%20=dedup_wf_001%3A%3Af1e63493def7cedfa5b497cdbea26faa)"; //let url = "http://beta.services.openaire.eu:8480/search/rest/v2/api/resources?format=json&query=(%20(oaftype%20exact%20organization)%20and%20(reldatasourcecompatibilityid=driver%20or%20reldatasourcecompatibilityid=driver-openaire2.0%20or%20reldatasourcecompatibilityid=openaire2.0%20or%20reldatasourcecompatibilityid=openaire3.0%20or%20reldatasourcecompatibilityid=openaire2.0_data%20or%20reldatasourcecompatibilityid=hostedBy%20or%20relprojectid=*))%20and%20(%20objIdentifier%20=dedup_wf_001%3A%3Af1e63493def7cedfa5b497cdbea26faa)";
let key = url; let key = url;
if (this._cache.has(key)) { if (this._cache.has(key)) {

View File

@ -151,7 +151,7 @@ export class SearchDatasetsService {
searchDatasetsForDataproviders(params: string, page: number, size: number):any { searchDatasetsForDataproviders(params: string, page: number, size: number):any {
let link = OpenaireProperties.getSearchAPIURLLast(); let link = OpenaireProperties.getSearchAPIURLLast();
let url = link+params+"&format=json"; let url = link+params+ "&page="+(page-1)+"&size="+size + "&format=json";
let key = url; let key = url;
if (this._cache.has(key)) { if (this._cache.has(key)) {
return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])]); return Observable.of(this._cache.get(key)).map(res => [res['meta'].total, this.parseResults(res['results'])]);
@ -303,11 +303,11 @@ export class SearchDatasetsService {
return results; return results;
} }
numOfEntityDatasets(id: string, entity: string):any { numOfEntityDatasets(parameters: string):any {
//OpenaireProperties.getSearchAPIURLLast() //OpenaireProperties.getSearchAPIURLLast()
//"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/" //"http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"
let url = OpenaireProperties.getSearchAPIURLLast()+entity+id+"/datasets/count"+"?format=json"; let url = OpenaireProperties.getSearchAPIURLLast()+parameters+"/datasets/count"+"?format=json";
let key = url; let key = url;
if (this._cache.has(key)) { if (this._cache.has(key)) {
return Observable.of(this._cache.get(key)); return Observable.of(this._cache.get(key));

View File

@ -18,10 +18,26 @@ export class DataProviderInfo {
"pubsrepository::unknown", "pubsrepository::unknown",
"scholarcomminfra", "scholarcomminfra",
"pubsrepository::thematic", "pubsrepository::thematic",
"pubscatalogue::unknown" "pubscatalogue::unknown",
"aggregator::datarepository",
"crissystem",
"datarepository::unknown"
]), ]),
"datasetsTab": new Set<string>( "datasetsTab": new Set<string>(
[ "aggregator::datarepository", [ "aggregator::pubsrepository::institutional",
"aggregator::pubsrepository::unknown",
"aggregator::pubsrepository::journals",
"crissystem",
"infospace",
"pubsrepository::institutional",
"pubsrepository::journal",
"pubsrepository::unknown",
"scholarcomminfra",
"pubsrepository::thematic",
"pubscatalogue::unknown",
"aggregator::datarepository",
"crissystem", "crissystem",
"datarepository::unknown" "datarepository::unknown"
]), ]),

View File

@ -64,18 +64,26 @@ export class FetchDataproviders {
} }
public getNumForEntity(entity: string, id:string) { public getNumForEntity(entity: string, id:string) {
console.info("getNumForEntity : Dataproviders Component");
var parameters=""; var parameters="";
if(entity == "organization") { if(entity == "organization") {
parameters = "organizations/"+id+"/datasources/count"; parameters = "organizations/"+id+"/datasources/count";
} }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.LOADING;
if(parameters != "") { if(parameters != "") {
this._searchDataprovidersService.numOfDataproviders(parameters).subscribe( this._searchDataprovidersService.numOfDataproviders(parameters).subscribe(
data => { data => {
this.searchUtils.totalResults = data; this.searchUtils.totalResults = data;
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = errorCodes.NONE;
}
}, },
err => { err => {
console.log(err); console.log(err);

View File

@ -74,6 +74,42 @@ export class FetchDatasets{
); );
} }
public getNumResultsForEntity(entity:string, id:string){
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.LOADING;
var parameters = "";
if(entity == "project") {
parameters = "projects/"+id;
} else if(entity == "person") {
parameters = "people/"+id;
}
if(parameters != "") {
this._searchDatasetsService.numOfEntityDatasets(parameters).subscribe(
data => {
this.searchUtils.totalResults = data;
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = errorCodes.NONE;
}
},
err => {
console.log(err);
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = ErrorCodes.ERROR;
// }
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.ERROR;
}
);
}
}
public getResultsForEntity(entity:string, id:string, page: number, size: number){ public getResultsForEntity(entity:string, id:string, page: number, size: number){
var errorCodes:ErrorCodes = new ErrorCodes(); var errorCodes:ErrorCodes = new ErrorCodes();

View File

@ -171,6 +171,7 @@ public getAggregatorResults(id:string, page: number, size: number){
this.subResults = this._searchPublicationsService.searchAggregators(id, '&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe( this.subResults = this._searchPublicationsService.searchAggregators(id, '&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
data => { data => {
this.results = data; this.results = data;
this.searchUtils.totalResults = this.results.length;
var errorCodes:ErrorCodes = new ErrorCodes(); var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE; this.searchUtils.status = errorCodes.DONE;

View File

@ -94,7 +94,7 @@ export class SearchFields {
["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[] = ["datasourcetypeuiid","datasourcecompatibilityname"];
public ENTITY_REGISTRIES_FIELDS:string[] = ["datasourcetypename","datasourcecompatibilityname"]; public ENTITY_REGISTRIES_FIELDS:string[] = ["datasourcetypename","datasourcecompatibilityname"];
//ORGANIZATION //ORGANIZATION

View File

@ -93,10 +93,10 @@
} }
.tooltip { /*.tooltip {
max-width: none; max-width: none;
background: rgba(100, 100, 100, 1); background: rgba(100, 100, 100, 1);
} }*/
.custom-select-mini{ .custom-select-mini{
max-width:170px !important; max-width:170px !important;
} }