Loading Message when building CSV files (project & organization landing page) | confirmation message before building publications CSV in organization landing page | Organization landing page: Publications CSV: no query for publications of a specific project when size of its publications = 0 | Lazy routing in 'View all' links | Remove href from tabs in landing pages & add class uk-animation-fade in tabs' content | fix how commas are displayed (no spaces between comma and previous word) in organizations and projects lists

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46357 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2017-03-20 11:45:45 +00:00
parent 88c3173d54
commit e458388b66
27 changed files with 667 additions and 249 deletions

View File

@ -3,6 +3,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { DepositComponent } from './deposit.component'; import { DepositComponent } from './deposit.component';
import { DepositResultComponent } from './depositResult.component'; import { DepositResultComponent } from './depositResult.component';
@ -15,6 +16,7 @@ import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.mod
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,
RouterModule,
EntitiesAutocompleteModule, EntitiesAutocompleteModule,
DataProvidersServiceModule, DataProvidersServiceModule,
OrganizationServiceModule, OrganizationServiceModule,

View File

@ -8,6 +8,8 @@ import { SearchDataprovidersService } from '../services/searchDataproviders.serv
import {OrganizationService} from '../services/organization.service'; import {OrganizationService} from '../services/organization.service';
import {RouterHelper} from '../utils/routerHelper.class';
@Component({ @Component({
selector: 'deposit-result', selector: 'deposit-result',
template: ` template: `
@ -38,7 +40,16 @@ import {OrganizationService} from '../services/organization.service';
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0"> <div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<p>Please use the information/contacts shown below to deposit your {{requestFor}}.</p> <p>Please use the information/contacts shown below to deposit your {{requestFor}}.</p>
<!--showDataProviders [dataProviders]=dataProviders></showDataProviders--> <!--showDataProviders [dataProviders]=dataProviders></showDataProviders-->
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a-->
<a [queryParams]="routerHelper.createQueryParams(['organizationId', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchDataproviders.results" <search-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.searchUtils.status" [(status)]= "fetchDataproviders.searchUtils.status"
type="dataprovider" urlParam="datasourceId"> type="dataprovider" urlParam="datasourceId">
@ -91,6 +102,7 @@ export class DepositResultComponent {
sub: any; sub: any;
subDataproviders: any; subDataproviders: any;
public routerHelper:RouterHelper = new RouterHelper();
public fetchDataproviders : FetchDataproviders; public fetchDataproviders : FetchDataproviders;
public linkToSearchDataproviders = ""; public linkToSearchDataproviders = "";
public zenodo: string; public zenodo: string;

View File

@ -16,7 +16,12 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" >
<a [queryParams]="paramsForSearchLink"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets">
View all {{fetchDatasets.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchDatasets.results" <search-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status" [(status)]= "fetchDatasets.searchUtils.status"
type="dataset" urlParam="datasetId"> type="dataset" urlParam="datasetId">
@ -26,14 +31,14 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
}) })
export class DatasetsTabComponent { export class DatasetsTabComponent {
@Input() paramsForSearchLink: string = ""; @Input() paramsForSearchLink = {};
@Input() fetchDatasets : FetchDatasets; @Input() fetchDatasets : FetchDatasets;
public linkToSearchDatasets = ""; public linkToSearchDatasets = "";
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets()+this.paramsForSearchLink; this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets();
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -16,7 +16,12 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<a [queryParams]="paramsForSearchLink"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchDataproviders.results" <search-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.status" [(status)]= "fetchDataproviders.status"
type="dataprovider" urlParam="datasourceId" type="dataprovider" urlParam="datasourceId"
@ -28,7 +33,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
export class DatasourcesTabComponent { export class DatasourcesTabComponent {
@Input() paramsForSearchLink: string = ""; @Input() paramsForSearchLink = {};
@Input() fetchDataproviders : FetchDataproviders; @Input() fetchDataproviders : FetchDataproviders;
public linkToSearchDataproviders = ""; public linkToSearchDataproviders = "";
@ -36,7 +41,7 @@ export class DatasourcesTabComponent {
ngOnInit() { ngOnInit() {
console.info("datasources tab: init"); console.info("datasources tab: init");
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders()+this.paramsForSearchLink; this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders();
// console.info(this.linkToSearchDataproviders); // console.info(this.linkToSearchDataproviders);
} }

View File

@ -17,7 +17,12 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10">
<a [queryParams]="paramsForSearchLink"
routerLinkActive="router-link-active" [routerLink]="linkToSearchProjects">
View all {{fetchProjects.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchProjects.results" <search-result [(results)]="fetchProjects.results"
[(status)]= "fetchProjects.status" [(status)]= "fetchProjects.status"
type="project" urlParam="projectId"> type="project" urlParam="projectId">
@ -28,14 +33,14 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
export class ProjectsTabComponent { export class ProjectsTabComponent {
@Input() paramsForSearchLink: string = ""; @Input() paramsForSearchLink = {};
@Input() fetchProjects : FetchProjects; @Input() fetchProjects : FetchProjects;
public linkToSearchProjects = ""; public linkToSearchProjects = "";
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
this.linkToSearchProjects = OpenaireProperties.getLinkToAdvancedSearchProjects()+this.paramsForSearchLink; this.linkToSearchProjects = OpenaireProperties.getLinkToAdvancedSearchProjects();
} }
ngOnDestroy() {} ngOnDestroy() {}

View File

@ -16,7 +16,15 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results
</a-->
<a [queryParams]="paramsForSearchLink"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchPublications.results" <search-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.status" [(status)]= "fetchPublications.status"
type="publication" urlParam="articleId"> type="publication" urlParam="articleId">
@ -26,14 +34,14 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
}) })
export class PublicationsTabComponent { export class PublicationsTabComponent {
@Input() paramsForSearchLink: string = ""; @Input() paramsForSearchLink = {};//: string = "";
@Input() fetchPublications : FetchPublications; @Input() fetchPublications : FetchPublications;
public linkToSearchPublications = ""; public linkToSearchPublications = "";
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications()+this.paramsForSearchLink; this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();//+this.paramsForSearchLink;
console.info("publications tab: init"); console.info("publications tab: init");
} }

View File

@ -12,13 +12,14 @@ import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDatapr
import { SearchDataprovidersService } from '../../services/searchDataproviders.service'; import { SearchDataprovidersService } from '../../services/searchDataproviders.service';
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class';
@Component({ @Component({
selector: 'tabs', selector: 'tabs',
template: ` template: `
<ul *ngIf="tabs != undefined" class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul *ngIf="tabs != undefined" class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li *ngIf="tabs.length>0" class="uk-active" id="{{tabs[0].content}}"> <li *ngIf="tabs.length>0" class="uk-active" id="{{tabs[0].content}}">
<a href="{{tabs[0].content}}"> <a>
{{tabs[0].name}} {{tabs[0].name}}
<i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-chart"></i> <i *ngIf="tabs[0].content == 'metricsTab'" class="uk-icon-line-chart"></i>
<i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i> <i *ngIf="tabs[0].content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
@ -43,7 +44,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
<li *ngFor="let tab of tabs; let i=index"> <li *ngFor="let tab of tabs; let i=index">
<a *ngIf="i>0" <a *ngIf="i>0"
(click)="search(tab.content, 1, 10)" href="#{{tab.content}}"> (click)="search(tab.content, 1, 10)">
{{tab.name}} {{tab.name}}
<i *ngIf="tab.content == 'metricsTab'" class="uk-icon-line-chart"></i> <i *ngIf="tab.content == 'metricsTab'" class="uk-icon-line-chart"></i>
<i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i> <i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
@ -68,7 +69,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</ul> </ul>
<ul *ngIf="tabs != undefined" id="tab-content" class="uk-switcher uk-margin"> <ul *ngIf="tabs != undefined" id="tab-content" class="uk-switcher uk-margin">
<li id="firstTab-content" *ngIf="tabs.length>0"> <li class="uk-animation-fade" id="firstTab-content" *ngIf="tabs.length>0">
<publicationsTab *ngIf="tabs[0].content=='publicationsTab'" <publicationsTab *ngIf="tabs[0].content=='publicationsTab'"
[paramsForSearchLink]="paramsForSearchLink" [paramsForSearchLink]="paramsForSearchLink"
[fetchPublications]="fetchPublications"> [fetchPublications]="fetchPublications">
@ -161,7 +162,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
</i-frame> </i-frame>
</li> </li>
<li *ngFor="let tab of tabs; let i=index"> <li class="uk-animation-fade" *ngFor="let tab of tabs; let i=index">
<publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'" <publicationsTab *ngIf="i>0 && tab.content=='publicationsTab'"
[paramsForSearchLink]="paramsForSearchLink" [paramsForSearchLink]="paramsForSearchLink"
[fetchPublications] = "fetchPublications"> [fetchPublications] = "fetchPublications">
@ -257,7 +258,7 @@ export class TabsComponent {
@Input() _dataproviderService; @Input() _dataproviderService;
public paramsForSearchLink: string = ""; public paramsForSearchLink = {};//: string = "";
public reloadPublications: boolean = true; public reloadPublications: boolean = true;
public reloadDatasets: boolean = true; public reloadDatasets: boolean = true;
@ -282,7 +283,11 @@ export class TabsComponent {
public fetchProjects: FetchProjects; public fetchProjects: FetchProjects;
public fetchDataproviders: FetchDataproviders; public fetchDataproviders: FetchDataproviders;
public fetchPublicationsAggregators: FetchPublications; public fetchPublicationsAggregators: FetchPublications;
private nativeElement : Node; private nativeElement : Node;
public routerHelper:RouterHelper = new RouterHelper();
constructor (private renderer : Renderer, private element : ElementRef,private route: ActivatedRoute, constructor (private renderer : Renderer, private element : ElementRef,private route: ActivatedRoute,
private _searchPublicationsService: SearchPublicationsService, private _searchPublicationsService: SearchPublicationsService,
private _searchDatasetsService: SearchDatasetsService, private _searchDatasetsService: SearchDatasetsService,
@ -321,9 +326,11 @@ private nativeElement : Node;
} }
if(this.resultsBy == "collectedFrom") { if(this.resultsBy == "collectedFrom") {
this.paramsForSearchLink = "?collectedFrom="+this.id+"&co=and"; //this.paramsForSearchLink = "?collectedFrom="+this.id+"&co=and";
this.paramsForSearchLink = this.routerHelper.createQueryParams(['collectedFrom', 'co'], [this.id, 'and']);
} else if (this.resultsBy == "hostedBy") { } else if (this.resultsBy == "hostedBy") {
this.paramsForSearchLink = "?hostedBy="+this.id+"&ho=and"; //this.paramsForSearchLink = "?hostedBy="+this.id+"&ho=and";
this.paramsForSearchLink = this.routerHelper.createQueryParams(['hostedBy', 'ho'], [this.id, 'and']);
} }
} }

View File

@ -40,7 +40,7 @@
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li class="uk-active"> <li class="uk-active">
<a href="#relatedTab"> <a>
Related Research Results Related Research Results
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum}} {{relatedResearchResultsNum}}
@ -49,7 +49,7 @@
</li> </li>
<li> <li>
<a href="#similarTab"> <a>
Similar Research Results Similar Research Results
<span *ngIf="datasetInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="datasetInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="datasetInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification">
@ -59,14 +59,14 @@
</li> </li>
<li (click)="metricsClicked=true"> <li (click)="metricsClicked=true">
<a href="#metricsTab"> <a>
Metrics Metrics
</a> </a>
</li> </li>
</ul> </ul>
<ul id="tab-content" class="uk-switcher uk-margin"> <ul id="tab-content" class="uk-switcher uk-margin">
<li id="relatedTab"> <li class="uk-animation-fade">
<div *ngIf="datasetInfo.relatedResearchResults == undefined" class = "uk-alert" > <div *ngIf="datasetInfo.relatedResearchResults == undefined" class = "uk-alert" >
There are no related research results There are no related research results
</div> </div>
@ -84,7 +84,7 @@
</div> </div>
</li> </li>
<li id="similarTab"> <li class="uk-animation-fade">
<div *ngIf="datasetInfo.similarResearchResults == undefined" class = "uk-alert" > <div *ngIf="datasetInfo.similarResearchResults == undefined" class = "uk-alert" >
There are no similar research results There are no similar research results
</div> </div>
@ -97,7 +97,7 @@
<tabTable from="dataset" [info]="datasetInfo.similarResearchResults"></tabTable> <tabTable from="dataset" [info]="datasetInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
<li id="metricsTab"> <li class="uk-animation-fade">
<metrics *ngIf="metricsClicked" <metrics *ngIf="metricsClicked"
[id]="datasetId" [type]="'results'" (metricsResults)="metricsResults($event)"> [id]="datasetId" [type]="'results'" (metricsResults)="metricsResults($event)">
</metrics> </metrics>
@ -111,8 +111,8 @@
</ul> </ul>
</div> </div>
<div class="uk-width-3-10" *ngIf="datasetInfo != null"> <div class="uk-width-3-10">
<ul class="uk-list uk-list-striped mainFunctionsBlock"> <ul class="uk-list uk-list-striped">
<li> <li>
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt >Share - Bookmark <dt >Share - Bookmark
@ -126,34 +126,65 @@
</altmetrics > </altmetrics >
</li> </li>
<li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0"> <li *ngIf="datasetInfo.downloadFrom != undefined && datasetInfo.downloadFrom.size > 0">
<dl class="uk-description-list-line functionsSection"> <dl class="uk-description-list-line">
<dt class="title">Download from</dt> <dt class="title">Download from</dt>
<dd class="line" *ngFor="let key of datasetInfo.downloadFrom.keys()"> <dd class="line"
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index"
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
<div *ngIf="i<5 || showAllDownloadFrom"
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
<span class="uk-icon-external-link">
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1"> <div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
{{key}} {{key}}
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;"> <span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}"> <a href="{{url}}" target="_blank">
[{{i+1}}] [{{i+1}}]
</a> </a>
</span> </span>
</div> </div>
<a *ngIf="datasetInfo.downloadFrom.get(key)['url'].length == 1" href="{{datasetInfo.downloadFrom.get(key)['url']}}"> <a *ngIf="datasetInfo.downloadFrom.get(key)['url'].length == 1"
href="{{datasetInfo.downloadFrom.get(key)['url']}}"
target="_blank">
{{key}} {{key}}
</a> </a>
</span>
</div>
</dd>
<dd *ngIf="showAllDownloadFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View less
</a>
</dd>
<dd *ngIf="!showAllDownloadFrom && datasetInfo.downloadFrom.size > 5">...</dd>
<dd *ngIf="!showAllDownloadFrom && datasetInfo.downloadFrom.size > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View more
</a>
</dd> </dd>
</dl> </dl>
</li> </li>
<!--li *ngIf="datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 0"-->
<li> <li>
<dl class="uk-description-list-line functionsSection" > <dl class="uk-description-list-line" >
<dt class="title">Funded By</dt> <dt class="title">Funded By</dt>
<dd <dd class="line"
data-uk-tooltip="{pos:'right'}" title="{{item['title']}} *ngFor="let item of datasetInfo.fundedByProjects let i=index">
| Project Code: {{item['acronym']}} <div *ngIf="i<5 || showAllFundedBy">
| Funder: {{item['funderName']}} ({{item['funderShortname']}}) <span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
| Funding: {{item['funding']}}" title="
class="line" *ngFor="let item of datasetInfo.fundedByProjects"> <div>
<h4>{{item['title']}}</h4>
Project Code: {{item['code']}}
<div>
Funder: {{item['funderName']}} ({{item['funderShortname']}})
</div>
<div>
Funding: {{item['funding']}}
</div>
</div>
">
<!--a *ngIf="!item['inline']" href="{{item['url']}}"--> <!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
<a *ngIf="!item['inline']" <a *ngIf="!item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project"> [queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
@ -169,14 +200,28 @@
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
</mark> </mark>
</a> </a>
<i class="uk-icon-info-circle"></i>
</span>
</div>
</dd> </dd>
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd--> <!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'dataset','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd-->
<dd *ngIf="showAllFundedBy" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View less
</a>
</dd>
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 5">...</dd>
<dd *ngIf="!showAllFundedBy && datasetInfo.fundedByProjects != undefined && datasetInfo.fundedByProjects.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllFundedBy = !showAllFundedBy;">
View more
</a>
</dd>
</dl> </dl>
</li> </li>
<li> <li>
<dl class="uk-description-list-line functionsSection" > <dl class="uk-description-list-line" >
<dt class="title">Related to </dt> <dt class="title">Related to </dt>
<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']" >
@ -194,16 +239,29 @@
</dl> </dl>
</li> </li>
<li><citeThis [result]="datasetInfo" [id]="datasetId"></citeThis></li> <li><citeThis [result]="datasetInfo" [id]="datasetId"></citeThis></li>
<li *ngIf="datasetInfo.collectedFrom != undefined"> <li *ngIf="datasetInfo.collectedFrom != undefined && datasetInfo.collectedFrom.length > 0">
<dl class="uk-description-list-line functionsSection"> <dl class="uk-description-list-line">
<dt>Collected from</dt> <dt>Collected from</dt>
<dd *ngFor="let item of datasetInfo.collectedFrom"> <dd *ngFor="let item of datasetInfo.collectedFrom let i=index">
<!--a href="{{item['url']}}"--> <!--a href="{{item['url']}}"-->
<a [queryParams]="{datasourceId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider"> <a *ngIf="i<5 || showAllCollectedFrom"
[queryParams]="{datasourceId: item.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
{{item['name']}} {{item['name']}}
</a> </a>
</dd> </dd>
<dd *ngIf="showAllCollectedFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View less
</a>
</dd>
<dd *ngIf="!showAllCollectedFrom && datasetInfo.collectedFrom.length > 5">...</dd>
<dd *ngIf="!showAllCollectedFrom && datasetInfo.collectedFrom.length > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllCollectedFrom = !showAllCollectedFrom;">
View more
</a>
</dd>
</dl> </dl>
</li> </li>
</ul> </ul>

View File

@ -13,6 +13,11 @@ import {RouterHelper} from '../../utils/routerHelper.class';
export class DatasetComponent { export class DatasetComponent {
public datasetInfo: DatasetInfo; public datasetInfo: DatasetInfo;
public showAllCollectedFrom: boolean = false;
public showAllDownloadFrom: boolean = false;
public showAllFundedBy: boolean = false;
private showStyle: boolean = false; private showStyle: boolean = false;
private showAllReferences: boolean = false; private showAllReferences: boolean = false;
private showAllRelResData: boolean = false; private showAllRelResData: boolean = false;

View File

@ -234,8 +234,8 @@ export class DatasetService {
if(data[3] != null) { if(data[3] != null) {
if(data[3].hasOwnProperty("instance")) { if(data[3].hasOwnProperty("instance")) {
this.datasetInfo.downloadFrom = new Map<string, {"url": string[], "accessMode": string[]}>(); this.datasetInfo.downloadFrom = new Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>();
this.datasetInfo.publishedIn = new Map<string, {"url": string[], "accessMode": string[]}>() this.datasetInfo.publishedIn = new Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>()
let length = data[3]['instance'].length!=undefined ? data[3]['instance'].length : 1; let length = data[3]['instance'].length!=undefined ? data[3]['instance'].length : 1;
@ -266,25 +266,53 @@ export class DatasetService {
if(!this.datasetInfo.downloadFrom.has(url) && mydata.hasOwnProperty("hostedby")) { if(!this.datasetInfo.downloadFrom.has(url) && mydata.hasOwnProperty("hostedby")) {
if(mydata['hostedby'].name != "other resources" && mydata['hostedby'].name != "Unknown Repository") { if(mydata['hostedby'].name != "other resources" && mydata['hostedby'].name != "Unknown Repository") {
if(!this.datasetInfo.downloadFrom.has(mydata['hostedby'].name)) { let key: string = mydata['hostedby'].name;
this.datasetInfo.downloadFrom.set(mydata['hostedby'].name, {"url": null, "accessMode": null});
if(!this.datasetInfo.downloadFrom.has(key)) {
this.datasetInfo.downloadFrom.set(key, {"url": null, "accessMode": null, "bestAccessMode": null});
} }
if(this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['url'] == null) { if(this.datasetInfo.downloadFrom.get(key)['url'] == null) {
this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['url'] = new Array<string>(); this.datasetInfo.downloadFrom.get(key)['url'] = new Array<string>();
} }
counter2 = this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['url'].length; counter2 = this.datasetInfo.downloadFrom.get(key)['url'].length;
this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['url'][counter2] = url; this.datasetInfo.downloadFrom.get(key)['url'][counter2] = url;
if(this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'] == null) { if(this.datasetInfo.downloadFrom.get(key)['accessMode'] == null) {
this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'] = new Array<string>(); this.datasetInfo.downloadFrom.get(key)['accessMode'] = new Array<string>();
} }
if(mydata.hasOwnProperty("licence")) { if(mydata.hasOwnProperty("licence")) {
this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = mydata['licence'].classid; this.datasetInfo.downloadFrom.get(key)['accessMode'].push(mydata['licence'].classid);
//this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = mydata['licence'].classid;
switch (this.datasetInfo.downloadFrom.get(key)['bestAccessMode']) {
case null:
this.datasetInfo.downloadFrom.get(key)['bestAccessMode'] = mydata['licence'].classid;
break;
case "CLOSED":
if(mydata['licence'].classid == "OPEN" ||
mydata['licence'].classid == "EMBARGO" ||
mydata['licence'].classid == "RESTRICTED") {
this.datasetInfo.downloadFrom.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
case "RESTRICTED":
if(mydata['licence'].classid == "OPEN" ||
mydata['licence'].classid == "EMBARGO") {
this.datasetInfo.downloadFrom.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
case "EMBARGO":
if(mydata['licence'].classid == "OPEN") {
this.datasetInfo.downloadFrom.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
}
} else { } else {
this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = ""; //this.datasetInfo.downloadFrom.get(mydata['hostedby'].name)['accessMode'][counter2] = "";
this.datasetInfo.downloadFrom.get(key)['accessMode'].push("");
} }
} else { } else {
if(data[0] != null && data[0].hasOwnProperty("source")) { if(data[0] != null && data[0].hasOwnProperty("source")) {
@ -299,7 +327,7 @@ export class DatasetService {
} }
} }
this.datasetInfo.publishedIn.set(key, {"url": null, "accessMode": null}); this.datasetInfo.publishedIn.set(key, {"url": null, "accessMode": null, "bestAccessMode": null});
if(this.datasetInfo.publishedIn.get(key)['url'] == null) { if(this.datasetInfo.publishedIn.get(key)['url'] == null) {
this.datasetInfo.publishedIn.get(key)['url'] = new Array<string>(); this.datasetInfo.publishedIn.get(key)['url'] = new Array<string>();
@ -313,9 +341,34 @@ export class DatasetService {
} }
if(mydata.hasOwnProperty("licence")) { if(mydata.hasOwnProperty("licence")) {
this.datasetInfo.publishedIn.get(key)['accessMode'][counter2] = mydata['licence'].classid; //this.datasetInfo.publishedIn.get(key)['accessMode'][counter2] = mydata['licence'].classid;
this.datasetInfo.publishedIn.get(key)['accessMode'].push(mydata['licence'].classid);
switch (this.datasetInfo.publishedIn.get(key)['bestAccessMode']) {
case null:
this.datasetInfo.publishedIn.get(key)['bestAccessMode'] = mydata['licence'].classid;
break;
case "CLOSED":
if(mydata['licence'].classid == "OPEN" ||
mydata['licence'].classid == "EMBARGO" ||
mydata['licence'].classid == "RESTRICTED") {
this.datasetInfo.publishedIn.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
case "RESTRICTED":
if(mydata['licence'].classid == "OPEN" ||
mydata['licence'].classid == "EMBARGO") {
this.datasetInfo.publishedIn.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
case "EMBARGO":
if(mydata['licence'].classid == "OPEN") {
this.datasetInfo.publishedIn.get(key)['bestAccessMode'] = mydata['licence'].classid;
}
break;
}
} else { } else {
this.datasetInfo.publishedIn.get(key)['accessMode'][counter2] = ""; //this.datasetInfo.publishedIn.get(key)['accessMode'][counter2] = "";
this.datasetInfo.publishedIn.get(key)['accessMode'].push("");
} }
counter1++; counter1++;
} }
@ -447,10 +500,10 @@ export class DatasetService {
&& this.datasetInfo.identifiers.has("doi")) { && this.datasetInfo.identifiers.has("doi")) {
if( this.datasetInfo.downloadFrom == null) { if( this.datasetInfo.downloadFrom == null) {
this.datasetInfo.downloadFrom = new Map<string,{"url": string[], "accessMode": string[]}>(); this.datasetInfo.downloadFrom = new Map<string,{"url": string[], "accessMode": string[], "bestAccessMode": string}>();
} }
this.datasetInfo.downloadFrom.set(this.datasetInfo.publisher, {"url": null, "accessMode": null}); this.datasetInfo.downloadFrom.set(this.datasetInfo.publisher, {"url": null, "accessMode": null, "bestAccessMode": null});
let url = OpenaireProperties.getDoiURL()+this.datasetInfo.identifiers.get("doi"); let url = OpenaireProperties.getDoiURL()+this.datasetInfo.identifiers.get("doi");
this.datasetInfo.downloadFrom.get(this.datasetInfo.publisher)['url'] = new Array<string>(); this.datasetInfo.downloadFrom.get(this.datasetInfo.publisher)['url'] = new Array<string>();

View File

@ -32,13 +32,13 @@
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li class="uk-active"> <li class="uk-active">
<a href="#projectsTab"> <a>
Projects Projects
<span class="uk-badge uk-badge-notification">{{(searchingProjectsTabComponent)?searchingProjectsTabComponent.fetchProjects.totalResults:0}}</span> <span class="uk-badge uk-badge-notification">{{(searchingProjectsTabComponent)?searchingProjectsTabComponent.fetchProjects.totalResults:0}}</span>
</a> </a>
</li> </li>
<li (click)="searchDataprovidersInit()"> <li (click)="searchDataprovidersInit()">
<a href="#dataProvidersTab"> <a>
Data Providers Data Providers
<!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span> <!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
<span *ngIf="organizationInfo.dataProviders != undefined" class="badge"> <span *ngIf="organizationInfo.dataProviders != undefined" class="badge">
@ -57,7 +57,7 @@
</ul> </ul>
<ul id="tab-content" class="uk-switcher uk-margin"> <ul id="tab-content" class="uk-switcher uk-margin">
<li id="projectsTab"> <li class="uk-animation-fade">
<searchingProjectsTab [organizationId]=organizationId ></searchingProjectsTab> <searchingProjectsTab [organizationId]=organizationId ></searchingProjectsTab>
<!--div *ngIf="organizationInfo.projects == undefined" class = "uk-alert"> <!--div *ngIf="organizationInfo.projects == undefined" class = "uk-alert">
There are no projects There are no projects
@ -115,7 +115,7 @@
</div--> </div-->
</li> </li>
<li id="dataProvidersTab"> <li class="uk-animation-fade">
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders--> <!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
<div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert">
There are no dataproviders There are no dataproviders
@ -127,7 +127,15 @@
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results
</a-->
<a [queryParams]="routerHelper.createQueryParams(['organizationId', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchDataproviders.results" <search-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.status" [(status)]= "fetchDataproviders.status"
type="dataprovider" urlParam="datasourceId"> type="dataprovider" urlParam="datasourceId">
@ -169,7 +177,7 @@
</li> </li>
<li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders"> <li *ngFor="let funder of searchingProjectsTabComponent.fetchProjects.funders">
<span class="clickable" (click)="downloadPublicationsFile(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"> Publications report(CSV) for {{funder.name}}</span>
</span> </span>
@ -178,4 +186,6 @@
</ul> </ul>
</div> </div>
</div> </div>
<modal-loading></modal-loading>
<modal-alert (alertOutput)="confirmClose($event)"></modal-alert>
</div> </div>

View File

@ -1,17 +1,22 @@
import {Component, ViewChild} from '@angular/core'; import {Component, ViewChild} from '@angular/core';
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {OrganizationService} from '../../services/organization.service'; import {OrganizationService} from '../../services/organization.service';
import {OrganizationInfo} from '../../utils/entities/organizationInfo'; import {OrganizationInfo} from '../../utils/entities/organizationInfo';
import {ReportsService} from '../../services/reports.service'; import {ReportsService} from '../../services/reports.service';
import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import {FetchDataproviders} from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import {SearchPublicationsService} from '../../services/searchPublications.service'; import {SearchPublicationsService} from '../../services/searchPublications.service';
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 {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties} from '../../utils/properties/openaireProperties';
import {SearchingProjectsTabComponent} from '../searchingProjectsInTab.component'; import {SearchingProjectsTabComponent} from '../searchingProjectsInTab.component';
import {RouterHelper} from '../../utils/routerHelper.class';
import {ModalLoading} from '../../utils/modal/loading.component';
import {AlertModal} from '../../utils/modal/alert';
@Component({ @Component({
selector: 'organization', selector: 'organization',
templateUrl: 'organization.component.html', templateUrl: 'organization.component.html',
@ -38,10 +43,19 @@ export class OrganizationComponent {
subDataprovidersCount: any; subDataprovidersCount: any;
private fetchDataproviders : FetchDataproviders; private fetchDataproviders : FetchDataproviders;
private linkToSearchDataproviders = ""; private linkToSearchDataproviders:string = "";
@ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ; @ViewChild (SearchingProjectsTabComponent) searchingProjectsTabComponent : SearchingProjectsTabComponent ;
private projectFunders:string[] = []; private projectFunders:string[] = [];
public routerHelper:RouterHelper = new RouterHelper();
@ViewChild (ModalLoading) loading : ModalLoading ;
@ViewChild(AlertModal) alertApplyAll;
private funder: string;
private funderId: string;
private count: number;
constructor (private _organizationService: OrganizationService, constructor (private _organizationService: OrganizationService,
private route: ActivatedRoute, private route: ActivatedRoute,
private _searchDataprovidersService: SearchDataprovidersService, private _searchDataprovidersService: SearchDataprovidersService,
@ -165,7 +179,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();// + "?organization=" + this.organizationId + "&or=and";;
} }
private searchDataprovidersInit() { private searchDataprovidersInit() {
@ -178,18 +192,30 @@ export class OrganizationComponent {
downloadfile(url:string){ downloadfile(url:string){
console.log("Downloading file: "+ url); console.log("Downloading file: "+ url);
this._reportsService.downloadCSVFile(url)
.subscribe(data => window.open(window.URL.createObjectURL(data)), this.openLoading();
this.setMessageLoading("Downloading CSV file");
this._reportsService.downloadCSVFile(url).subscribe(
data => {
this.closeLoading();
window.open(window.URL.createObjectURL(data));
},
error => console.log("Error downloading the file."), error => console.log("Error downloading the file."),
() => console.log('Completed file download.')); () => console.log('Completed file download.'));
} }
downloadPublicationsFile(funder: string, funderId:string, count:number){ downloadPublicationsFile(funder: string, funderId:string, count:number){
console.log("Downloading publications file"); console.log("Downloading publications file");
this.openLoading();
this.setMessageLoading("Downloading CSV file");
let response: string[] = []; let response: string[] = [];
let totalResponse: string = ""; let totalResponse: string = "";
let projects = []; let projects = [];
let counter: number = count; let counter: number = count;
let title: boolean = false;
this._searchProjectsService.getProjectsForOrganizations(this.organizationId,' and (funderid exact '+ funderId + ' ) ',1,count,[]).subscribe( this._searchProjectsService.getProjectsForOrganizations(this.organizationId,' and (funderid exact '+ funderId + ' ) ',1,count,[]).subscribe(
data => data =>
{ {
@ -201,12 +227,28 @@ export class OrganizationComponent {
// let index: number = this.organizationInfo.projects.get(funder).indexOf(project); // let index: number = this.organizationInfo.projects.get(funder).indexOf(project);
let url: string; let url: string;
if(index == 0) { if(index == 0 || !title) {
url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special&size="+data; url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special&size="+data;
} else { } else {
url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special-notitle&size="+data; url = this.downloadURLAPI+"projects/"+projects[index].id+"/publications?format=csv-special-notitle&size="+data;
} }
if(data == 0) {
counter--;
response[index] = "";
if(counter == 0) {
for(let i=0; i<count; i++) {
if(response[i] != "") {
totalResponse += response[i];
}
console.info("1response "+i+": "+response[i]);
}
this.closeLoading();
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
}
} else if(counter == 1 && !title) {
title = true;
this._reportsService.getCSVResponse(url).subscribe( this._reportsService.getCSVResponse(url).subscribe(
data => data =>
{ {
@ -216,13 +258,21 @@ export class OrganizationComponent {
if(counter == 0) { if(counter == 0) {
for(let i=0; i<count; i++) { for(let i=0; i<count; i++) {
totalResponse += response[i]+"\n"; if(response[i] != "") {
totalResponse += response[i];
} }
console.info("2response "+i+": "+response[i]);
}
console.info(totalResponse);
this.closeLoading();
window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' }))); window.open(window.URL.createObjectURL(new Blob([totalResponse], { type: 'text/csv' })));
} }
}, },
error => console.log("Error downloading the file."), error => console.log("Error downloading the file."),
() => console.log('Completed file download.')); () => console.log('Completed file download.')
);
}
}, },
error => console.log("Error getting number of publications for project.")); error => console.log("Error getting number of publications for project."));
}//); }//);
@ -265,4 +315,37 @@ export class OrganizationComponent {
// error => console.log("Error getting number of publications for project.")); // error => console.log("Error getting number of publications for project."));
// }//); // }//);
} }
public openLoading(){
if(this.loading){
this.loading.open();
}
}
public closeLoading(){
if(this.loading){
this.loading.close();
}
}
public setMessageLoading(message: string){
if(this.loading){
this.loading.message = message;
}
}
confirmOpen(funder: string, funderId:string, count:number){
this.alertApplyAll.cancelButton = true;
this.alertApplyAll.okButton = true;
this.alertApplyAll.alertTitle = "CSV FILE";
this.alertApplyAll.message = "Do you wish to download a CSV file?\nNote that this process may take a while.";
this.alertApplyAll.okButtonText = "Yes";
this.alertApplyAll.cancelButtonText = "No";
this.alertApplyAll.open();
this.funder = funder;
this.funderId = funderId;
this.count = count;
}
confirmClose(data){
this.downloadPublicationsFile(this.funder, this.funderId, this.count);
}
} }

View File

@ -3,6 +3,9 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
import {AlertModalModule} from '../../utils/modal/alertModal.module';
import { OrganizationServiceModule} from '../../services/organizationService.module'; import { OrganizationServiceModule} from '../../services/organizationService.module';
// import { ProjectsServiceModule} from '../../services/projectsService.module'; // import { ProjectsServiceModule} from '../../services/projectsService.module';
import { OrganizationComponent } from './organization.component'; import { OrganizationComponent } from './organization.component';
@ -20,6 +23,7 @@ import { SearchingProjectsTabModule} from '../searchingProjectsInTab.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,
LoadingModalModule, AlertModalModule,
LandingModule, LandingModule,
OrganizationRoutingModule, OrganizationRoutingModule,
SearchResultsModule, SearchResultsModule,

View File

@ -17,7 +17,7 @@
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li class="uk-active"> <li class="uk-active">
<a href="#publicationsTab"> <a>
Publications Publications
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults}} {{fetchPublications.searchUtils.totalResults}}
@ -25,7 +25,7 @@
</a> </a>
</li> </li>
<li (click)="searchDatasetsInit()"> <li (click)="searchDatasetsInit()">
<a href="#researchDataTab"> <a>
Research Data Research Data
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{fetchDatasets.searchUtils.totalResults}} {{fetchDatasets.searchUtils.totalResults}}
@ -35,7 +35,7 @@
</ul> </ul>
<ul id="tab-content" class="uk-switcher uk-margin"> <ul id="tab-content" class="uk-switcher uk-margin">
<li id="publicationsTab"> <li class="uk-animation-fade">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
There are no publications There are no publications
@ -60,7 +60,7 @@
</div> </div>
</li> </li>
<li id="researchDataTab"> <li class="uk-animation-fade">
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
There are no research data There are no research data
</div> </div>

View File

@ -31,17 +31,18 @@
<dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt> <dt *ngIf="projectInfo.organizations != undefined">Organizations: </dt>
<dd *ngIf="projectInfo.organizations != undefined"> <dd *ngIf="projectInfo.organizations != undefined">
<span *ngFor="let organization of projectInfo.organizations let i=index"> <span *ngFor="let organization of projectInfo.organizations let i=index">
<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 != null && 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}} {{organization.name}}</a></span><span
</a>
<span *ngIf="organization.id == null || organization.id == ''"> *ngIf="organization.id == null || organization.id == ''">
{{organization.name}} {{organization.name}}</span><span
</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 != undefined && projectInfo.urlInfo != ''">More information:</dt>
@ -57,7 +58,7 @@
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
<li class="uk-active"> <li class="uk-active">
<a href="#publicationsTab"> <a>
Publications Publications
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults}} {{fetchPublications.searchUtils.totalResults}}
@ -65,7 +66,7 @@
</a> </a>
</li> </li>
<li (click)="searchDatasetsInit()"> <li (click)="searchDatasetsInit()">
<a href="#researchDataTab"> <a>
Research Data Research Data
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{fetchDatasets.searchUtils.totalResults}} {{fetchDatasets.searchUtils.totalResults}}
@ -73,13 +74,13 @@
</a> </a>
</li> </li>
<li (click)="statsClicked=true;"> <li (click)="statsClicked=true;">
<a href="#statisticsTab"> <a>
Statistics Statistics
<i class="uk-icon-pie-chart"></i> <i class="uk-icon-pie-chart"></i>
</a> </a>
</li> </li>
<li (click)="metricsClicked=true;"> <li (click)="metricsClicked=true;">
<a href="#metricsTab"> <a>
Metrics Metrics
<i class="uk-icon-line-chart"></i> <i class="uk-icon-line-chart"></i>
</a> </a>
@ -87,8 +88,7 @@
</ul> </ul>
<ul id="tab-content" class="uk-switcher uk-margin"> <ul id="tab-content" class="uk-switcher uk-margin">
<li id="publicationsTab"> <li class="uk-animation-fade">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert" > <div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert" >
There are no publications There are no publications
</div> </div>
@ -99,7 +99,15 @@
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results</a></div> <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'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchPublications.results" <search-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.searchUtils.status" [(status)]= "fetchPublications.searchUtils.status"
type="publication" urlParam="articleId"> type="publication" urlParam="articleId">
@ -107,7 +115,7 @@
</div> </div>
</li> </li>
<li id="researchDataTab"> <li class="uk-animation-fade">
<div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
There are no research data There are no research data
</div> </div>
@ -118,14 +126,19 @@
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets">
View all {{fetchDatasets.searchUtils.totalResults}} results
</a>
</div>
<search-result [(results)]="fetchDatasets.results" <search-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status" [(status)]= "fetchDatasets.searchUtils.status"
type="dataset" urlParam="datasetId"> type="dataset" urlParam="datasetId">
</search-result> </search-result>
</div> </div>
</li> </li>
<li id="statisticsTab"> <li class="uk-animation-fade">
<div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert"> <div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
There are no statistics There are no statistics
</div> </div>
@ -146,7 +159,7 @@
</div> </div>
</div> </div>
</li> </li>
<li id="metricsTab"> <li class="uk-animation-fade">
<metrics *ngIf="metricsClicked" <metrics *ngIf="metricsClicked"
[id]="projectId" [type]="'projects'" [name]="projectName" (metricsResults)="metricsResults($event)"> [id]="projectId" [type]="'projects'" [name]="projectName" (metricsResults)="metricsResults($event)">
</metrics> </metrics>
@ -173,7 +186,8 @@
</dl> </dl>
</li> </li>
<li *ngIf="fetchPublications.searchUtils.totalResults > 10"> <li *ngIf="fetchPublications.searchUtils.totalResults > 10">
<a href="{{linkToSearchPublications}}"> <a [queryParams]="routerHelper.createQueryParams(['projectId', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all Project Publications View all Project Publications
</a> </a>
</li> </li>
@ -232,4 +246,5 @@
</ul> </ul>
</div> </div>
</div> </div>
<modal-loading></modal-loading>
</div> </div>

View File

@ -5,12 +5,13 @@ import {ProjectService} from './project.service';
import {ProjectInfo} from '../../utils/entities/projectInfo'; import {ProjectInfo} from '../../utils/entities/projectInfo';
import {RouterHelper} from '../../utils/routerHelper.class'; import {RouterHelper} from '../../utils/routerHelper.class';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import { SearchPublicationsService } from '../../services/searchPublications.service'; import { SearchPublicationsService } from '../../services/searchPublications.service';
import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class'; import { FetchDatasets } from '../../utils/fetchEntitiesClasses/fetchDatasets.class';
import { SearchDatasetsService } from '../../services/searchDatasets.service'; import { SearchDatasetsService } from '../../services/searchDatasets.service';
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} from '../../utils/properties/openaireProperties';
@ -55,6 +56,8 @@ export class ProjectComponent{
public linkToSearchDatasets = ""; public linkToSearchDatasets = "";
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
@ViewChild (ModalLoading) loading : ModalLoading ;
constructor (private _projectService: ProjectService, constructor (private _projectService: ProjectService,
private route: ActivatedRoute, private route: ActivatedRoute,
private _searchPublicationsService: SearchPublicationsService, private _searchPublicationsService: SearchPublicationsService,
@ -67,10 +70,11 @@ export class ProjectComponent{
} }
ngOnInit() { ngOnInit() {
this.sub = this.route.queryParams.subscribe(params => {
this.metricsClicked = false; this.metricsClicked = false;
this.statsClicked = false; this.statsClicked = false;
this.sub = this.route.queryParams.subscribe(params => {
this.projectId = params['projectId']; this.projectId = params['projectId'];
console.info("Id is :"+this.projectId); console.info("Id is :"+this.projectId);
if(this.projectId){ if(this.projectId){
@ -111,17 +115,11 @@ export class ProjectComponent{
} }
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL(); this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
});
if(typeof window !== undefined) {
let publ_clipboard, datasets_clipboard;
let Clipboard;
Clipboard = require('clipboard');
publ_clipboard = new Clipboard('.publ_clipboard_btn');
datasets_clipboard = new Clipboard('.datasets_clipboard_btn');
}
this.createClipboard();
this.csvParams = "format=csv-special&page=0&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))&size="; this.csvParams = "format=csv-special&page=0&type=publications&query=(((oaftype exact result) and (resulttypeid exact publication)) and (relprojectid exact "+this.projectId+"))&size=";
});
} }
@ -130,14 +128,25 @@ export class ProjectComponent{
this.subDatasetsCount.unsubscribe(); this.subDatasetsCount.unsubscribe();
} }
createClipboard() {
if(typeof window !== 'undefined') {
let publ_clipboard, datasets_clipboard;
let Clipboard;
Clipboard = require('clipboard');
publ_clipboard = new Clipboard('.publ_clipboard_btn');
datasets_clipboard = new Clipboard('.datasets_clipboard_btn');
}
}
private searchPublications() { private searchPublications() {
this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10); this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10);
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications() + "?project=" + this.projectId+"&pr=and"; this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();// + "?project=" + this.projectId+"&pr=and";
} }
private searchDatasets() { private searchDatasets() {
this.fetchDatasets.getResultsForEntity("project", this.projectId, 1, 10); this.fetchDatasets.getResultsForEntity("project", this.projectId, 1, 10);
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets() + "?project=" + this.projectId+"&pr=and"; this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets();// + "?project=" + this.projectId+"&pr=and";
} }
private searchDatasetsInit() { private searchDatasetsInit() {
@ -173,12 +182,19 @@ export class ProjectComponent{
); );
} }
downloadfile(url:string){ downloadfile(url:string){
console.log("Downloading file: "+ url); console.log("Downloading file: "+ url);
this._reportsService.downloadCSVFile(url)
.subscribe(data => window.open(window.URL.createObjectURL(data)), this.openLoading();
this.setMessageLoading("Downloading CSV file");
this._reportsService.downloadCSVFile(url).subscribe(
data => {
this.closeLoading();
window.open(window.URL.createObjectURL(data));
},
error => console.log("Error downloading the file."), error => console.log("Error downloading the file."),
() => console.log('Completed file download.')); () => console.log('Completed file download.')
);
} }
showHTML(){ showHTML(){
@ -220,4 +236,21 @@ export class ProjectComponent{
this.totalViews = $event.totalViews; this.totalViews = $event.totalViews;
this.totalDownloads = $event.totalDownloads; this.totalDownloads = $event.totalDownloads;
} }
public openLoading(){
if(this.loading){
this.loading.open();
}
}
public closeLoading(){
if(this.loading){
this.loading.close();
}
}
public setMessageLoading(message: string){
if(this.loading){
this.loading.message = message;
}
}
} }

View File

@ -6,6 +6,7 @@ import { RouterModule } from '@angular/router';
import { ProjectServiceModule} from './projectService.module'; import { ProjectServiceModule} from './projectService.module';
// import {HtmlProgressReportService} from './htmlProgressReport.service'; // import {HtmlProgressReportService} from './htmlProgressReport.service';
import{LoadingModalModule} from '../../utils/modal/loadingModal.module';
import { ProjectComponent } from './project.component'; import { ProjectComponent } from './project.component';
import { ProjectRoutingModule } from './project-routing.module'; import { ProjectRoutingModule } from './project-routing.module';
@ -20,7 +21,7 @@ import { LandingModule } from '../landing.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, LandingModule, CommonModule, FormsModule, RouterModule, LandingModule,
ProjectRoutingModule, ProjectRoutingModule, LoadingModalModule,
SearchResultsModule, IFrameModule, MetricsModule, ReportsServiceModule, PublicationsServiceModule, DatasetsServiceModule, ProjectServiceModule SearchResultsModule, IFrameModule, MetricsModule, ReportsServiceModule, PublicationsServiceModule, DatasetsServiceModule, ProjectServiceModule
], ],
declarations: [ declarations: [

View File

@ -61,8 +61,8 @@
</div--> </div-->
<ul class="uk-tab" data-uk-switcher="{connect: '#tab-content'}"> <ul class="uk-tab" data-uk-switcher="{connect: '#tab-content'}">
<li id="citationsTab" class="uk-active"> <li class="uk-active">
<a href="#citationsTab"> <a>
References References
<span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="publicationInfo.references == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.references != undefined" class="uk-badge uk-badge-notification">
@ -71,7 +71,7 @@
</a> </a>
</li> </li>
<li> <li>
<a href="#relatedTab"> <a>
Related Research Results Related Research Results
<span class="uk-badge uk-badge-notification"> <span class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum}} {{relatedResearchResultsNum}}
@ -79,7 +79,7 @@
</a> </a>
</li> </li>
<li> <li>
<a href="#similarTab"> <a>
Similar Research Results Similar Research Results
<span *ngIf="publicationInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span> <span *ngIf="publicationInfo.similarResearchResults == undefined" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification"> <span *ngIf="publicationInfo.similarResearchResults != undefined" class="uk-badge uk-badge-notification">
@ -88,19 +88,19 @@
</a> </a>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined"> <li *ngIf="publicationInfo.bioentities != undefined">
<a href="#bioentitiesTab"> <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"> <li *ngIf="publicationInfo.software != undefined">
<a href="#softwareTab"> <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>
</a> </a>
</li> </li>
<li> <li>
<a href="#metricsTab" (click)="metricsClicked=true;"> <a (click)="metricsClicked=true;">
Metrics Metrics
<i class="uk-icon-line-chart"></i> <i class="uk-icon-line-chart"></i>
</a> </a>
@ -108,8 +108,7 @@
</ul> </ul>
<ul id="tab-content" class="uk-switcher uk-margin"> <ul id="tab-content" class="uk-switcher uk-margin">
<li id="citationsTab-content"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.references == undefined" class = "uk-alert" > <div *ngIf="publicationInfo.references == undefined" class = "uk-alert" >
There are no references There are no references
</div> </div>
@ -151,7 +150,7 @@
</div> </div>
</li> </li>
<li id="relatedTab"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.relatedResearchResults == undefined" class = "uk-alert"> <div *ngIf="publicationInfo.relatedResearchResults == undefined" class = "uk-alert">
There are no related research results There are no related research results
</div> </div>
@ -170,7 +169,7 @@
</li> </li>
<li id="similarTab"> <li class="uk-animation-fade">
<div *ngIf="publicationInfo.similarResearchResults == undefined" class = "uk-alert"> <div *ngIf="publicationInfo.similarResearchResults == undefined" class = "uk-alert">
There are no similar research results There are no similar research results
</div> </div>
@ -183,7 +182,7 @@
<tabTable from="publication" [info]="publicationInfo.similarResearchResults"></tabTable> <tabTable from="publication" [info]="publicationInfo.similarResearchResults"></tabTable>
</div> </div>
</li> </li>
<li *ngIf="publicationInfo.bioentities != undefined" id="bioentitiesTab"> <li *ngIf="publicationInfo.bioentities != undefined" class="uk-animation-fade">
<p> <p>
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
@ -212,7 +211,7 @@
</tbody> </tbody>
</table> </table>
</li> </li>
<li *ngIf="publicationInfo.software != undefined" id="softwareTab"> <li *ngIf="publicationInfo.software != undefined" class="uk-animation-fade">
<p> <p>
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
@ -236,7 +235,7 @@
</tbody> </tbody>
</table> </table>
</li> </li>
<li id="metricsTab"> <li class="uk-animation-fade">
<metrics *ngIf="metricsClicked" <metrics *ngIf="metricsClicked"
[id]="articleId" [type]="'results'" (metricsResults)="metricsResults($event)"> [id]="articleId" [type]="'results'" (metricsResults)="metricsResults($event)">
</metrics> </metrics>
@ -261,7 +260,9 @@
<addThis></addThis> <addThis></addThis>
</dd> </dd>
</dl> </dl>
<altmetrics *ngIf="publicationInfo.identifiers != undefined && publicationInfo.identifiers.get('doi') != undefined" id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi"> </altmetrics> <altmetrics *ngIf="publicationInfo.identifiers != undefined && publicationInfo.identifiers.get('doi') != undefined"
id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi">
</altmetrics>
</li> </li>
@ -270,6 +271,7 @@
<dt class="title">Download from</dt> <dt class="title">Download from</dt>
<dd class="line" <dd class="line"
*ngFor="let key of publicationInfo.downloadFrom.keys() let i=index" *ngFor="let key of publicationInfo.downloadFrom.keys() let i=index"
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
[title]="publicationInfo.downloadFrom.get(key)['accessMode']"> [title]="publicationInfo.downloadFrom.get(key)['accessMode']">
<div *ngIf="i<5 || showAllDownloadFrom" <div *ngIf="i<5 || showAllDownloadFrom"
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}"> class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
@ -277,15 +279,13 @@
<div *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1"> <div *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
{{key}} {{key}}
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;"> <span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}" target="_blank" <a href="{{url}}" target="_blank">
[title]="publicationInfo.downloadFrom.get(key)['accessMode']">
[{{i+1}}] [{{i+1}}]
</a> </a>
</span> </span>
</div> </div>
<a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1" <a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1"
href="{{publicationInfo.downloadFrom.get(key)['url']}}" href="{{publicationInfo.downloadFrom.get(key)['url']}}"
[title]="publicationInfo.downloadFrom.get(key)['accessMode']"
target="_blank"> target="_blank">
{{key}} {{key}}
</a> </a>
@ -308,21 +308,21 @@
<li *ngIf="publicationInfo.publishedIn != undefined && publicationInfo.publishedIn.size > 0"> <li *ngIf="publicationInfo.publishedIn != undefined && 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"
data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
<div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}"> <div *ngIf="i<5 || showAllPublishedIn" class="{{publicationInfo.publishedIn.get(key)['bestAccessMode']}}">
<span class="uk-icon-external-link"> <span class="uk-icon-external-link">
<div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1"> <div *ngIf="publicationInfo.publishedIn.get(key)['url'].length > 1">
{{key}} {{key}}
<span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index"> <span *ngFor="let url of publicationInfo.publishedIn.get(key)['url']; let i=index">
<a href="{{url}}" target="_blank" <a href="{{url}}" target="_blank">
[title]="publicationInfo.publishedIn.get(key)['accessMode']">
[{{i+1}}] [{{i+1}}]
</a> </a>
</span> </span>
</div> </div>
<a *ngIf="publicationInfo.publishedIn.get(key)['url'].length == 1" <a *ngIf="publicationInfo.publishedIn.get(key)['url'].length == 1"
href="{{publicationInfo.publishedIn.get(key)['url']}}" href="{{publicationInfo.publishedIn.get(key)['url']}}"
[title]="publicationInfo.publishedIn.get(key)['accessMode']"
target="_blank"> target="_blank">
{{key}} {{key}}
</a> </a>
@ -343,16 +343,26 @@
</dl> </dl>
</li> </li>
<li *ngIf="publicationInfo.fundedByProjects != undefined"> <!--li *ngIf="publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 0"-->
<li>
<dl class="uk-description-list-line"> <dl class="uk-description-list-line">
<dt class="title">Funded By</dt> <dt class="title">Funded By</dt>
<dd <dd class="line"
data-uk-tooltip="{pos:'right'}" title="{{item['title']}} *ngFor="let item of publicationInfo.fundedByProjects let i=index">
| Project Code: {{item['code']}}
| Funder: {{item['funderName']}} ({{item['funderShortname']}})
| Funding: {{item['funding']}}"
class="line" *ngFor="let item of publicationInfo.fundedByProjects let i=index">
<div *ngIf="i<5 || showAllFundedBy"> <div *ngIf="i<5 || showAllFundedBy">
<span data-uk-tooltip="{pos:'right', cls:'tooltip uk-text-center uk-contrast'}"
title="
<div>
<h4>{{item['title']}}</h4>
Project Code: {{item['code']}}
<div>
Funder: {{item['funderName']}} ({{item['funderShortname']}})
</div>
<div>
Funding: {{item['funding']}}
</div>
</div>
">
<!--a *ngIf="!item['inline']" href="{{item['url']}}"--> <!--a *ngIf="!item['inline']" href="{{item['url']}}"-->
<a *ngIf="!item['inline']" <a *ngIf="!item['inline']"
[queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project"> [queryParams]="{projectId: item.id}" routerLinkActive="router-link-active" routerLink="/search/project">
@ -368,6 +378,27 @@
| {{ item['acronym']?item['acronym']:item['title']}} | {{ item['acronym']?item['acronym']:item['title']}}
</mark> </mark>
</a> </a>
<!--i class="uk-icon-info-circle"
data-uk-modal="{target:'#my-id'}"-->
<i class="uk-icon-info-circle">
</i>
<!--div id="my-id" class="uk-modal">
<div class="uk-modal-dialog uk-modal-dialog-lightbox uk-text-center">
<a href="" class="uk-modal-close uk-close uk-close-alt"></a>
<div>
<h4>{{item['title']}}</h4>
Project Code: {{item['code']}}
<div>
Funder: {{item['funderName']}} ({{item['funderShortname']}})
</div>
<div>
Funding: {{item['funding']}}
</div>
</div>
</div>
</div-->
</span>
</div> </div>
</dd> </dd>
<dd *ngIf="showAllFundedBy" class="uk-text-right"> <dd *ngIf="showAllFundedBy" class="uk-text-right">
@ -375,16 +406,16 @@
View less View less
</a> </a>
</dd> </dd>
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects.length > 5">...</dd> <dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects != undefined && publicationInfo.fundedByProjects.length > 5">...</dd>
<dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects.length > 5" class="uk-text-right"> <dd *ngIf="!showAllFundedBy && publicationInfo.fundedByProjects != undefined && 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>
</dd> </dd>
<!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd--> <!--dd><a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/linking" > <i class="uk-icon-link"></i> Add links to projects</a></dd-->
</dl> </dl>
</li> </li>
<li> <li>
<dl class="uk-description-list-line" > <dl class="uk-description-list-line" >
<dt class="title">Related to</dt> <dt class="title">Related to</dt>
@ -405,7 +436,7 @@
</li> </li>
<li><citeThis [result]="publicationInfo" [id]="articleId"></citeThis></li> <li><citeThis [result]="publicationInfo" [id]="articleId"></citeThis></li>
<li *ngIf="publicationInfo.collectedFrom != undefined"> <li *ngIf="publicationInfo.collectedFrom != undefined && 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">

View File

@ -5,6 +5,7 @@ import { SearchProjectsService } from '../services/searchProjects.service';
import {OpenaireProperties} from '../utils/properties/openaireProperties'; import {OpenaireProperties} from '../utils/properties/openaireProperties';
import {StringUtils} from '../utils/string-utils.class'; import {StringUtils} from '../utils/string-utils.class';
import {RouterHelper} from '../utils/routerHelper.class';
@Component({ @Component({
selector: 'searchingProjectsTab', selector: 'searchingProjectsTab',
@ -18,7 +19,15 @@ import {StringUtils} from '../utils/string-utils.class';
The results below are discovered through our pilot algorithms. The results below are discovered through our pilot algorithms.
<a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a> <a href="mailto:feedback@openaire.eu">Let us know how we are doing!</a>
</p> </p>
<div class = "uk-text-right" *ngIf = "fetchProjects.totalResults > 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.totalResults}} results</a></div> <div class = "uk-text-right" *ngIf = "fetchProjects.totalResults > 10">
<!--a [href] = "linkToSearchProjects">
View all {{fetchProjects.totalResults}} results
</a-->
<a [queryParams]="routerHelper.createQueryParams(['organizationId', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchProjects">
View all {{fetchProjects.totalResults}} results
</a>
</div>
<div class= "searchPaging uk-panel uk-margin-top"> <div class= "searchPaging uk-panel uk-margin-top">
<div class="uk-float-right" *ngIf="fetchProjects.results && fetchProjects.searchUtils.totalResults > fetchProjects.searchUtils.size"> <div class="uk-float-right" *ngIf="fetchProjects.results && fetchProjects.searchUtils.totalResults > fetchProjects.searchUtils.size">
<paging-no-load [currentPage]="page" [totalResults]="fetchProjects.searchUtils.totalResults" [navigateTo]="navigateTo" [term]="keyword" [size]="size" (pageChange)="pageChange($event)"> </paging-no-load> <paging-no-load [currentPage]="page" [totalResults]="fetchProjects.searchUtils.totalResults" [navigateTo]="navigateTo" [term]="keyword" [size]="size" (pageChange)="pageChange($event)"> </paging-no-load>
@ -50,6 +59,9 @@ export class SearchingProjectsTabComponent {
public size :number = 10; public size :number = 10;
public linkToSearchProjects; public linkToSearchProjects;
private filterQuery:string = ""; private filterQuery:string = "";
public routerHelper:RouterHelper = new RouterHelper();
constructor (private _searchProjectsService: SearchProjectsService) { constructor (private _searchProjectsService: SearchProjectsService) {
this.fetchProjects = new FetchProjects(this._searchProjectsService); this.fetchProjects = new FetchProjects(this._searchProjectsService);
@ -57,7 +69,7 @@ export class SearchingProjectsTabComponent {
ngOnInit() { ngOnInit() {
this.linkToSearchProjects = OpenaireProperties.getLinkToAdvancedSearchProjects()+"?organization="+this.organizationId+"or=and";; this.linkToSearchProjects = OpenaireProperties.getLinkToAdvancedSearchProjects();//+"?organization="+this.organizationId+"or=and";;
this.search(true,""); this.search(true,"");
} }

View File

@ -3,6 +3,7 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { ProjectsServiceModule} from '../services/projectsService.module'; import { ProjectsServiceModule} from '../services/projectsService.module';
import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.module'; import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.module';
@ -13,8 +14,8 @@ import {PagingModule } from '../utils/paging.module';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule, CommonModule, FormsModule,
CommonModule, FormsModule, ProjectsServiceModule, SearchResultsModule, PagingModule ProjectsServiceModule, SearchResultsModule, PagingModule
], ],
declarations: [ declarations: [
SearchingProjectsTabComponent SearchingProjectsTabComponent

View File

@ -4,15 +4,34 @@ import {Component, Input} from '@angular/core';
@Component({ @Component({
selector: 'showTitle', selector: 'showTitle',
template: ` template: `
<h2 *ngIf="title != undefined" [class] = "title['accessMode']" data-uk-tooltip [title]="title['accessMode']" > <h2 *ngIf="title != undefined">
<span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''" class="uk-icon-external-link"> <span *ngIf="title['url'] != undefined && title['url'] != null && title['url'] != ''"
<a href="{{title['url']}}" target="_blank" class="uk-icon-external-link {{title['accessMode']}}"
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
[title]="title['accessMode']">
<a *ngIf="title['name'] != undefined && title['name'] != ''"
href="{{title['url']}}" target="_blank"
[innerHTML]="title['name']"> [innerHTML]="title['name']">
</a> </a>
<a *ngIf="title['name'] == undefined || title['name'] == ''"
href="{{title['url']}}" target="_blank">
[no title available]
</a>
</span> </span>
<span *ngIf="title['url'] == undefined || title['url'] == null || title['url'] == ''" <span *ngIf="(title['name'] != undefined && title['name'] != '') &&
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
[class]="title['accessMode']"
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
[title]="title['accessMode']"
[innerHTML]="title['name']"> [innerHTML]="title['name']">
</span> </span>
<span *ngIf="(title['name'] == undefined || title['name'] == '') &&
(title['url'] == undefined || title['url'] == null || title['url'] == '')"
[class]="title['accessMode']"
data-uk-tooltip="{cls:'tooltip uk-text-center uk-contrast'}"
[title]="title['accessMode']">
[no title available]
</span>
</h2> </h2>
` `

View File

@ -1,6 +1,7 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import{MainSearchRoutingModule} from './mainSearch-routing.module'; import{MainSearchRoutingModule} from './mainSearch-routing.module';
import{SearchComponent} from './search.component'; import{SearchComponent} from './search.component';
@ -18,7 +19,7 @@ import {SearchFormModule} from '../searchUtils/searchForm.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule, RouterModule,
DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule,
PublicationsServiceModule, OrganizationsServiceModule, PeopleServiceModule, PublicationsServiceModule, OrganizationsServiceModule, PeopleServiceModule,
BrowseEntitiesModule, SearchFormModule, SearchResultsModule, MainSearchRoutingModule BrowseEntitiesModule, SearchFormModule, SearchResultsModule, MainSearchRoutingModule

View File

@ -3,7 +3,6 @@ import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class'; import { FetchPublications } from '../../utils/fetchEntitiesClasses/fetchPublications.class';
import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class'; import { FetchDataproviders } from '../../utils/fetchEntitiesClasses/fetchDataproviders.class';
import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class'; import { FetchProjects } from '../../utils/fetchEntitiesClasses/fetchProjects.class';
@ -21,6 +20,7 @@ import {SearchOrganizationsService} from '../../services/searchOrganizations.ser
import {OpenaireProperties} from '../../utils/properties/openaireProperties'; import {OpenaireProperties} from '../../utils/properties/openaireProperties';
import {SearchFields} from '../../utils/properties/searchFields'; import {SearchFields} from '../../utils/properties/searchFields';
import {ErrorCodes} from '../../utils/properties/openaireProperties'; import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class';
@Component({ @Component({
changeDetection: ChangeDetectionStrategy.Default, changeDetection: ChangeDetectionStrategy.Default,
@ -89,7 +89,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
<ul id="searchtabs" class="uk-switcher uk-margin-left uk-width-large-3-4 uk-width-small-1-1"> <ul id="searchtabs" class="uk-switcher uk-margin-left uk-width-large-3-4 uk-width-small-1-1">
<li id="pubsTab" class="uk-active"> <li id="pubsTab" class="uk-active">
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPublications" >View all {{fetchPublications.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchPublications"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchPublications.results" <search-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.searchUtils.status" showLoading = true [(status)]= "fetchPublications.searchUtils.status" showLoading = true
type="publication" urlParam="articleId"> type="publication" urlParam="articleId">
@ -101,7 +107,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
</li> </li>
<li id="dataTab"> <li id="dataTab">
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDatasets" >View all {{fetchDatasets.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchDatasets"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets">
View all {{fetchDatasets.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchDatasets.results" <search-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status" showLoading = true [(status)]= "fetchDatasets.searchUtils.status" showLoading = true
type="dataset" urlParam="datasetId"> type="dataset" urlParam="datasetId">
@ -113,7 +125,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
</li> </li>
<li id="projectsTab" > <li id="projectsTab" >
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10" ><a [href] = "linkToSearchProjects" >View all {{fetchProjects.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchProjects"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchProjects">
View all {{fetchProjects.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchProjects.results" <search-result [(results)]="fetchProjects.results"
[(status)]= "fetchProjects.searchUtils.status" showLoading = true [(status)]= "fetchProjects.searchUtils.status" showLoading = true
type="project" urlParam="projectId"> type="project" urlParam="projectId">
@ -125,7 +143,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
</li> </li>
<li id="dataProviderTab"> <li id="dataProviderTab">
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10" ><a [href] = "linkToSearchDataproviders" >View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchDataproviders"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchDataproviders.results" <search-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.searchUtils.status" showLoading = true [(status)]= "fetchDataproviders.searchUtils.status" showLoading = true
type="dataprovider" urlParam="datasourceId"> type="dataprovider" urlParam="datasourceId">
@ -137,7 +161,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
</li> </li>
<li id="organizationsTab" > <li id="organizationsTab" >
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10" ><a [href] = "linkToSearchOrganizations" >View all {{fetchOrganizations.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchOrganizations.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchOrganizations"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchOrganizations">
View all {{fetchOrganizations.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchOrganizations.results" <search-result [(results)]="fetchOrganizations.results"
[(status)]= "fetchOrganizations.searchUtils.status" showLoading = true [(status)]= "fetchOrganizations.searchUtils.status" showLoading = true
type="organization" urlParam="organizationId"> type="organization" urlParam="organizationId">
@ -149,7 +179,13 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
</li> </li>
<li id="peopleTab"> <li id="peopleTab">
<div *ngIf = "keyword.length > 0" class ="uk-animation-fade"> <div *ngIf = "keyword.length > 0" class ="uk-animation-fade">
<div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10" ><a [href] = "linkToSearchPeople" >View all {{fetchPeople.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i></a></div> <div class = "uk-text-right" *ngIf = "fetchPeople.searchUtils.totalResults> 10">
<!--a [href] = "linkToSearchPeople"-->
<a [queryParams]="routerHelper.createQueryParam('keyword', keyword)"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPeople">
View all {{fetchPeople.searchUtils.totalResults}} results <i class="uk-icon-angle-double-right"></i>
</a>
</div>
<search-result [(results)]="fetchPeople.results" <search-result [(results)]="fetchPeople.results"
[(status)]= "fetchPeople.searchUtils.status" showLoading = true [(status)]= "fetchPeople.searchUtils.status" showLoading = true
type="person" urlParam="personId"> type="person" urlParam="personId">
@ -201,8 +237,10 @@ export class SearchComponent {
public fetchDatasets: FetchDatasets; public fetchDatasets: FetchDatasets;
public fetchOrganizations: FetchOrganizations; public fetchOrganizations: FetchOrganizations;
public fetchPeople: FetchPeople; public fetchPeople: FetchPeople;
public searchFields:SearchFields = new SearchFields(); public searchFields:SearchFields = new SearchFields();
public errorCodes:ErrorCodes = new ErrorCodes(); public errorCodes:ErrorCodes = new ErrorCodes();
public routerHelper:RouterHelper = new RouterHelper();
public subPub;public subData;public subProjects;public subOrg;public subPeople; public subDataPr; public subPub;public subData;public subProjects;public subOrg;public subPeople; public subDataPr;
constructor ( private route: ActivatedRoute, constructor ( private route: ActivatedRoute,
@ -260,7 +298,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadPublications) { if(this.reloadPublications) {
this.reloadPublications = false; this.reloadPublications = false;
this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10); this.fetchPublications.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications() + "?keyword=" + this.keyword; this.linkToSearchPublications = OpenaireProperties.getLinkToSearchPublications();// + "?keyword=" + this.keyword;
} }
} }
public searchDatasets() { public searchDatasets() {
@ -268,7 +306,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadDatasets) { if(this.reloadDatasets) {
this.reloadDatasets = false; this.reloadDatasets = false;
this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10); this.fetchDatasets.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets() + "?keyword=" + this.keyword; this.linkToSearchDatasets = OpenaireProperties.getLinkToSearchDatasets();// + "?keyword=" + this.keyword;
} }
} }
public searchProjects() { public searchProjects() {
@ -276,7 +314,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadProjects) { if(this.reloadProjects) {
this.reloadProjects = false; this.reloadProjects = false;
this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10); this.fetchProjects.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchProjects = OpenaireProperties.getLinkToSearchProjects() + "?keyword=" + this.keyword; this.linkToSearchProjects = OpenaireProperties.getLinkToSearchProjects();// + "?keyword=" + this.keyword;
} }
} }
public searchDataProviders() { public searchDataProviders() {
@ -284,7 +322,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadDataproviders) { if(this.reloadDataproviders) {
this.reloadDataproviders = false; this.reloadDataproviders = false;
this.fetchDataproviders.getResultsByKeyword(this.keyword, 1, 10); this.fetchDataproviders.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders() + "?keyword=" + this.keyword; this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();// + "?keyword=" + this.keyword;
} }
} }
public searchOrganizations() { public searchOrganizations() {
@ -292,7 +330,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadOrganizations) { if(this.reloadOrganizations) {
this.reloadOrganizations = false; this.reloadOrganizations = false;
this.fetchOrganizations.getResultsByKeyword(this.keyword, 1, 10); this.fetchOrganizations.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchOrganizations = OpenaireProperties.getLinkToSearchOrganizations() + "?keyword=" + this.keyword; this.linkToSearchOrganizations = OpenaireProperties.getLinkToSearchOrganizations();// + "?keyword=" + this.keyword;
} }
} }
public searchPeople() { public searchPeople() {
@ -300,7 +338,7 @@ public subPub;public subData;public subProjects;public subOrg;public subPeople;
if(this.reloadPeople) { if(this.reloadPeople) {
this.reloadPeople = false; this.reloadPeople = false;
this.fetchPeople.getResultsByKeyword(this.keyword, 1, 10); this.fetchPeople.getResultsByKeyword(this.keyword, 1, 10);
this.linkToSearchPeople = OpenaireProperties.getLinkToSearchPeople() + "?keyword=" + this.keyword; this.linkToSearchPeople = OpenaireProperties.getLinkToSearchPeople();// + "?keyword=" + this.keyword;
} }
} }

View File

@ -21,8 +21,11 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<p *ngIf="result['title'].name != undefined && result['title'].name != ''" <p *ngIf="result['title'].name != undefined && result['title'].name != ''"
[innerHTML]="result['title'].name"> [innerHTML]="result['title'].name">
</p> </p>
<p *ngIf="result['title'].name == undefined || result['title'].name == ''"> <!--p *ngIf="result['title'].name == undefined || result['title'].name == ''">
{{result['title'].url}} {{result['title'].url}}
</p-->
<p *ngIf="result['title'].name == undefined || result['title'].name == ''">
[no title available]
</p> </p>
</a> </a>
@ -31,7 +34,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
[innerHTML]="result['title'].name"> [innerHTML]="result['title'].name">
</p> </p>
<p *ngIf="result['title'].name == undefined || result['title'].name == ''"> <p *ngIf="result['title'].name == undefined || result['title'].name == ''">
{{result['title'].url}} [no title available]
</p> </p>
</a> </a>
</h4> </h4>
@ -59,15 +62,16 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<span> Projects: </span> <span> Projects: </span>
<span *ngFor="let project of result['projects'].slice(0,15) let i=index"> <span *ngFor="let project of result['projects'].slice(0,15) let i=index">
<!--a *ngIf="project.url != undefined" href="{{project.url}}"--> <!--a *ngIf="project.url != undefined" href="{{project.url}}"-->
<span>
<a *ngIf="project.id != undefined" [queryParams]="{projectId: project.id}" routerLinkActive="router-link-active" routerLink="/search/project"> <a *ngIf="project.id != undefined" [queryParams]="{projectId: project.id}" routerLinkActive="router-link-active" routerLink="/search/project">
{{project['funderShortname']?project['funderShortname']:project['funderName']}} {{project['funderShortname']?project['funderShortname']:project['funderName']}}
| {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}}) | {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}})</a><p
</a>
<p *ngIf="project.id == undefined"> *ngIf="project.id == undefined">
{{project['funderShortname']?project['funderShortname']:project['funderName']}} {{project['funderShortname']?project['funderShortname']:project['funderName']}}
| {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}}) | {{ project['acronym']?project['acronym']:project['title']}} ({{project.code}})</p></span><span
</p>
<span *ngIf="i < result['projects'].length-1"> ,</span> *ngIf="i < result['projects'].length-1">,</span>
</span> </span>
<span *ngIf="result['projects'].length > 15">...</span> <span *ngIf="result['projects'].length > 15">...</span>
</div> </div>
@ -86,9 +90,9 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<span *ngFor="let funder of result['funders'] let i=index"> <span *ngFor="let funder of result['funders'] let i=index">
<span *ngIf="funder.funderShortname"> <span *ngIf="funder.funderShortname">
{{funder.funderShortname}} {{funder.funderShortname}}</span><span
</span>
<span *ngIf="i < result['funders'].length-1"> ,</span> *ngIf="i < result['funders'].length-1">,</span>
</span> </span>
</div> </div>
<span *ngIf="result.startYear && result.endYear"> ({{result.startYear}} - {{result.endYear}})</span> <span *ngIf="result.startYear && result.endYear"> ({{result.startYear}} - {{result.endYear}})</span>
@ -97,12 +101,12 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<span *ngFor="let organization of result['organizations'] let i=index"> <span *ngFor="let organization of result['organizations'] let i=index">
<!--a *ngIf="organization.url != undefined" href="{{organization.url}}"--> <!--a *ngIf="organization.url != undefined" href="{{organization.url}}"-->
<a *ngIf="organization.id != undefined" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization"> <a *ngIf="organization.id != undefined" [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization.name}} {{organization.name}}</a><span
</a>
<span *ngIf="organization.id == undefined"> *ngIf="organization.id == undefined">
{{organization.name}} {{organization.name}}</span><span
</span>
<span *ngIf="i < result['organizations'].length-1"> ,</span> *ngIf="i < result['organizations'].length-1">,</span>
</span> </span>
</div> </div>

View File

@ -5,8 +5,8 @@ export class DatasetInfo {
dateofacceptance: string; dateofacceptance: string;
embargoEndDate: string; embargoEndDate: string;
type: string; type: string;
downloadFrom: Map<string, {"url": string[], "accessMode": string[]}>; //key is name downloadFrom: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name
publishedIn: Map<string, {"url": string[], "accessMode": string[]}>; //key is name publishedIn: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name
identifiers: Map<string, string[]>; identifiers: Map<string, string[]>;
publisher: string; publisher: string;
subjects: string[]; subjects: string[];

View File

@ -7,8 +7,6 @@ export class PublicationInfo {
types: string[]; types: string[];
downloadFrom: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name downloadFrom: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name
publishedIn: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name publishedIn: Map<string, {"url": string[], "accessMode": string[], "bestAccessMode": string}>; //key is name
bioentities: Map<string, Map<string, string>>; //<site name, <>>
software: { "name": string, "url": string}[]; //<site name, <>>
identifiers: Map<string, string[]>; //key is the classname identifiers: Map<string, string[]>; //key is the classname
publisher: string; publisher: string;
journal: {"journal": string, "issn": string, "lissn": string}; journal: {"journal": string, "issn": string, "lissn": string};
@ -22,6 +20,8 @@ export class PublicationInfo {
fundedByProjects: { "id": string, "acronym": string, "title": string, fundedByProjects: { "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}[];
bioentities: Map<string, Map<string, string>>; //<site name, <>>
software: { "name": string, "url": string}[]; //<site name, <>>
//relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[]; //relatedPublications: { "name": string, "url": string, "date": string, "trust": string}[];
//relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[]; //relatedResearchData: { "name": string, "url": string, "date": string, "trust": string}[];
//similarPublications: {"name": string, "url": string, "date": string, "trust": string}[]; //similarPublications: {"name": string, "url": string, "date": string, "trust": string}[];

View File

@ -127,6 +127,12 @@
margin-top:5px; margin-top:5px;
} }
.tooltip {
max-width: none;
background: rgba(100, 100, 100, 1);
}
.filterItem span { .filterItem span {
display: inline-flex; display: inline-flex;
} }