Enable bulk claiming, insert/delete of claims | improve layout in linking

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@45975 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-02-21 15:52:31 +00:00
parent 731003e050
commit 91c6b0ed47
19 changed files with 172 additions and 110 deletions

View File

@ -119,6 +119,10 @@ export function getLinkingModule() {
return System.import('./claims/linking/linking.module' + (process.env.AOT ? '.ngfactory' : '')) return System.import('./claims/linking/linking.module' + (process.env.AOT ? '.ngfactory' : ''))
.then(mod => mod[(process.env.AOT ? 'LinkingModuleNgFactory' : 'LinkingModule')]); .then(mod => mod[(process.env.AOT ? 'LinkingModuleNgFactory' : 'LinkingModule')]);
} }
export function getBulkLinkingModule() {
return System.import('./claims/linking/bulkLinking.module' + (process.env.AOT ? '.ngfactory' : ''))
.then(mod => mod[(process.env.AOT ? 'BulkLinkingModuleNgFactory' : 'BulkLinkingModule')]);
}
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
@ -151,7 +155,10 @@ export function getLinkingModule() {
{ path: 'project-report', loadChildren: gethtmlProjectReportModule }, { path: 'project-report', loadChildren: gethtmlProjectReportModule },
{ path: 'myclaims', loadChildren: getMyClaimsModule }, { path: 'myclaims', loadChildren: getMyClaimsModule },
{ path: 'claims', loadChildren: getClaimsAdminModule }, { path: 'claims', loadChildren: getClaimsAdminModule },
{ path: 'linking', loadChildren: getLinkingModule } { path: 'bulk-linking', loadChildren: getBulkLinkingModule },
{ path: 'linking', loadChildren: getLinkingModule },

View File

@ -423,12 +423,12 @@ export class DisplayClaimsComponent {
deleteById(id:string){ deleteById(id:string){
console.warn("Deleting claim with id:"+id); console.log("Deleting claim with id:"+id);
// this._claimService.deleteClaimById(id); // this._claimService.deleteClaimById(id);
this._claimService.deleteClaimById(id).subscribe( this._claimService.deleteClaimById(id).subscribe(
res => { res => {
console.info('Delete response'+res.code ); console.log('Delete response'+res.code );
console.warn("Deleted claim with id:"+ id); console.log("Deleted claim with id:"+ id);
//remove this claim from the //remove this claim from the
let newClaims=this.claims; let newClaims=this.claims;
for (var _i = 0; _i < this.claims.length; _i++) { for (var _i = 0; _i < this.claims.length; _i++) {

View File

@ -1,14 +1,15 @@
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 {ProjectTitleFormatter} from './projectTitleFormatter.component'; import {ProjectTitleFormatter} from './projectTitleFormatter.component';
import {PublicationTitleFormatter} from './publicationTitleFormatter.component'; import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
import {ClaimEntityFormatter} from './claimEntityFormatter.component'; import {ClaimEntityFormatter} from './claimEntityFormatter.component';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule CommonModule, RouterModule
], ],
declarations: [ declarations: [
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter

View File

@ -1,5 +1,6 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {OpenaireProperties} from '../../../utils/properties/openaireProperties'; import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
import {RouterHelper} from '../../../utils/routerHelper.class';
//Usage Example "<project-title [project]="X" > </project-title>" //Usage Example "<project-title [project]="X" > </project-title>"
@ -7,7 +8,7 @@ import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
selector: 'project-title', selector: 'project-title',
template: ` template: `
<div class="project-title"> <div class="project-title">
<h5 ><a target="_blank" [href]="url" >{{project['name']}} ({{project['funderName']}})</a></h5> <h5 ><a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" routerLinkActive="router-link-active" routerLink="/search/project" >{{project['name']}} ({{project['funderName']}})</a></h5>
</div> </div>
` `
}) })
@ -15,6 +16,7 @@ import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
export class ProjectTitleFormatter { export class ProjectTitleFormatter {
@Input() project: string[]; @Input() project: string[];
public url:string; public url:string;
public routerHelper:RouterHelper = new RouterHelper();
constructor () {} constructor () {}
ngOnInit() { ngOnInit() {

View File

@ -6,7 +6,7 @@ import {Component, Input} from '@angular/core';
selector: 'publication-title', selector: 'publication-title',
template: ` template: `
<div class="publication-title"> <div class="publication-title">
<h5 *ngIf="url" ><a target="_blank" href="{{url}}" >{{title}}</a></h5> <h5 *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="uk-icon-external-link" ></span> {{title}}</a></h5>
<h5 *ngIf="!url" >{{title}}</h5> <h5 *ngIf="!url" >{{title}}</h5>
</div> </div>
` `

View File

@ -8,37 +8,38 @@ import {Dates, DOI} from '../../../utils/string-utils.class';
@Component({ @Component({
selector: 'bulk-claim', selector: 'bulk-claim',
template: ` template: `
<form class="form-inline"> <form class="uk-form">
<div class="form-group"> <label for="exampleInputFile">Select a file</label>
<label for="exampleInputFile">File input</label>
<input id="exampleInputFile" type="file" (change)="fileChangeEvent($event)" placeholder="Upload file..." /> <input id="exampleInputFile" type="file" (change)="fileChangeEvent($event)" placeholder="Upload file..." />
</div> <button class="uk-button uk-button-success" [class.disabled]="!enableUpload" type="button" (click)="upload()">Upload</button>
<div class="form-group"> </form>
<button class="btn btn-success" [class.disabled]="!enableUpload" type="button" (click)="upload()">Upload</button> <div class="uk-panel uk-panel-box uk-margin-top uk-margin-bottom">
</div> <div class="uk-panel-badge uk-badge"><i class="uk-icon-info"></i></div>
</form> <div class="uk-text-bold">Upload information:</div>
<div class="help-block">Upload a csv file containing DOIs. For each DOI found in file, metadata will be fetched from CrossRef. Upload a csv file containing a list of DOIs. For each DOI found in the file, metadata will be fetched from CrossRef.
Available results can be linked with the selected Projects and Contexts. Available results will be linked with the selected Projects and Contexts.
<a (click)="showInfo = !showInfo"> More information</a>
<div *ngIf = "showInfo"> <div class="uk-article-meta">
CSV format: CSV format:
<ul> <ul class="uk-list">
<li>The format of CSV file should be "DOI","ACCESS_MODE","DATE".</li> <li>The format of CSV file should be "DOI","ACCESS_MODE","DATE".</li>
<li>Access mode column should have values: "OPEN","CLOSED" or "EMBARGO".</li> <li>The value "DOI" is required </li>
<li>Date column valid format is YYYY-MM-DD and is required when access mode has value EMBARGO.</li> <li>Access mode column should have values: "OPEN","CLOSED" or "EMBARGO".</li>
<li>In case access mode is not available default value is "OPEN".</li> <li>Date column valid format is YYYY-MM-DD and is required when access mode has value EMBARGO.</li>
</ul> <li>In case access mode is not available default value is "OPEN".</li>
</div> </ul>
</div> </div>
<div *ngIf="showReport" class="alert alert-info" role="alert" > </div>
<div *ngIf="showReport" class="uk-alert uk-alert-info" role="alert" >
<span>{{all}} rows found in file.</span> <span>{{all}} rows found in file.</span>
<span>{{found}} results fetched from CrossRef.</span> <span>{{found}} results fetched from CrossRef.</span>
<span *ngIf ="duplicate > 0" [title] = "'Duplicate DOIs: '+ duplicateIds.join()">{{duplicate}} DOIs were duplicates.</span> <span *ngIf ="duplicate > 0" [title] = "'Duplicate DOIs: '+ duplicateIds.join()">{{duplicate}} DOIs were duplicates.</span>
<span *ngIf = "notFound > 0" [title] = "'Not found DOIs: '+ notFoundIds.join()" >{{notFound}} DOIs not found in crossref. ({{notFoundIds.join()}}) </span> <span *ngIf = "notFound > 0" [title] = "'Not found DOIs: '+ notFoundIds.join()" >{{notFound}} DOIs not found in crossref. ({{notFoundIds.join()}}) </span>
<span *ngIf = "all == 0 || found == 0" > Please make sure you are using the right format for he csv file... </span> <span *ngIf = "all == 0 || found == 0" > Please make sure you are using the right format for the csv file... </span>
</div> </div>
<div *ngIf="errorMessage.length > 0 " class="alert alert-danger" role="alert">{{errorMessage}}</div> <div *ngIf="errorMessage.length > 0 " class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<modal-loading [message]= "'Please wait...'"></modal-loading> <modal-loading [message]= "'Please wait...'"></modal-loading>
` `

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { BulkLinkingComponent } from './bulkLinking.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: BulkLinkingComponent},
])
]
})
export class BulkLinkingRoutingModule { }

View File

@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { BulkLinkingComponent } from './bulkLinking.component';
import { BulkLinkingRoutingModule } from './bulkLinking-routing.module';
import {LinkingGenericModule} from './linkingGeneric.module';
import {BulkClaimModule} from './bulkClaim/bulkClaim.module';
@NgModule({
imports: [
SharedModule,
BulkLinkingRoutingModule,
LinkingGenericModule,
BulkClaimModule
],
declarations: [
BulkLinkingComponent
], exports:[BulkLinkingComponent]
})
export class BulkLinkingModule { }

View File

@ -206,7 +206,7 @@ private validateDates(){
} }
private afterclaimsInsertion(insertedIds, errorInClaims){ private afterclaimsInsertion(insertedIds, errorInClaims){
this.loading.close(); this.loading.close();
if(errorInClaims.length == 0){ if(errorInClaims.length == 0 && insertedIds.length > 0 ){
if(this.inline){ if(this.inline){
this.show = "end"; this.show = "end";
}else{ }else{

View File

@ -6,9 +6,11 @@ import { Router } from '@angular/router';
selector: 'linking-generic', selector: 'linking-generic',
//providers: [MdRadioDispatcher], //providers: [MdRadioDispatcher],
template: ` template: `
<div class="container"> <div class="container uk-margin-top">
<div class="page-header"> <div class="page-header">
<div *ngIf=" bulkMode " class="pull-right"><span class="badge"><h5>Bulk mode</h5></span></div> <div *ngIf=" bulkMode " class="uk-float-right uk-badge uk-badge-notification">
<span class="uk-text-center uk-margin-top">Bulk mode</span>
</div>
<h1>Link research resutls</h1> <h1>Link research resutls</h1>
</div> </div>
<linking-home *ngIf=" show == 'home' " [bulkMode]="bulkMode" (linkTypeChange)="linkTypeChange($event)" ></linking-home> <linking-home *ngIf=" show == 'home' " [bulkMode]="bulkMode" (linkTypeChange)="linkTypeChange($event)" ></linking-home>
@ -24,47 +26,39 @@ import { Router } from '@angular/router';
</ul> </ul>
<div *ngIf=" show != 'claim' && show != 'myclaims' " class="uk-grid" > <div *ngIf=" show != 'claim' && show != 'myclaims' " class="uk-grid" >
<div *ngIf=" show=='result' && !bulkMode " class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2">
<div *ngIf=" show=='result' && !bulkMode " class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2">
<claim-result [selectedDatasets]="datasets" [selectedPublications]="publications" (datasetsChange)="datasetsChange($event)" (publicationsChange)="publicationsChange($event)" > </claim-result> <claim-result [selectedDatasets]="datasets" [selectedPublications]="publications" (datasetsChange)="datasetsChange($event)" (publicationsChange)="publicationsChange($event)" > </claim-result>
</div>
</div>
<div *ngIf=" show=='project' " class="uk-width-1-1" > <div *ngIf=" show=='project' " class="uk-width-1-1" >
<claim-projects [selectedProjects]="projects" > </claim-projects> <claim-projects [selectedProjects]="projects" > </claim-projects>
</div> </div>
<div *ngIf=" show=='software' " class="uk-width-1-1"> <div *ngIf=" show=='software' " class="uk-width-1-1">
<p>TODO software</p> <p>TODO software</p>
</div> </div>
<div *ngIf=" show == 'context'" class="uk-width-1-1" > <div *ngIf=" show == 'context'" class="uk-width-1-1" >
<claim-contexts [selectedList]="contexts" > </claim-contexts> <claim-contexts [selectedList]="contexts" > </claim-contexts>
</div> </div>
<!-- <div *ngIf=" show == 'claim'" > <!-- <div *ngIf=" show == 'claim'" >
<claim-insert [contexts]="contexts" [publications]="publications" [datasets]="datasets" [projects]="projects" ></claim-insert> <claim-insert [contexts]="contexts" [publications]="publications" [datasets]="datasets" [projects]="projects" ></claim-insert>
</div>--> </div>-->
<div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 ':'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 uk-margin-top uk-grid'"> <div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 ':'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 uk-margin-top uk-grid'">
<div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '"> <div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '">
<claim-selected-contexts [contexts]="contexts" [show]="show" <claim-selected-contexts [contexts]="contexts" [show]="show"
(showChange)="showChange($event)" > </claim-selected-contexts> (showChange)="showChange($event)" > </claim-selected-contexts>
</div> </div>
<div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '"> <div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '">
<claim-selected-projects [projects]="projects" [show]="show" <claim-selected-projects [projects]="projects" [show]="show"
(showChange)="showChange($event)" > </claim-selected-projects> (showChange)="showChange($event)" > </claim-selected-projects>
</div> </div>
<!---claim-selected-results [datasets]="datasets" [publications]="publications" [show]="show" <!---claim-selected-results [datasets]="datasets" [publications]="publications" [show]="show"
(showChange)="showChange($event)" [linkToResults]="(bulkMode)?false:true" > </claim-selected-results--> (showChange)="showChange($event)" [linkToResults]="(bulkMode)?false:true" > </claim-selected-results-->
<div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2'"> <div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2'">
<claim-selected-publications [publications]="publications" [showAccessRights]="showAccessRights" <claim-selected-publications [publications]="publications" [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
</claim-selected-publications> </claim-selected-publications>
</div> </div>
<div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '"> <div [class]="( show=='result' && !bulkMode)?'uk-width-small-1-1 uk-width-medium-1-1 uk-width-large-1-1 ':'uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2 '">
<claim-selected-datasets [datasets]="datasets" [showAccessRights]="showAccessRights" <claim-selected-datasets [datasets]="datasets" [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode"> </claim-selected-datasets>
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode"> </div>
</claim-selected-datasets>
</div>
</div> </div>
</div> </div>
@ -83,12 +77,12 @@ import { Router } from '@angular/router';
<bulk-claim *ngIf=" bulkMode " [publications]="publications" > </bulk-claim> <bulk-claim *ngIf=" bulkMode " [publications]="publications" > </bulk-claim>
<div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2"> <div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2">
<claim-selected-publications [publications]="publications" [showAccessRights]="showAccessRights" <claim-selected-publications [publications]="publications" [showAccessRights]=true
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode"> [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
</claim-selected-publications> </claim-selected-publications>
</div> </div>
<div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2"> <div class="uk-width-small-1-1 uk-width-medium-1-2 uk-width-large-1-2 uk-width-xlarge-1-2">
<claim-selected-datasets [datasets]="datasets" [showAccessRights]="showAccessRights" <claim-selected-datasets [datasets]="datasets" [showAccessRights]=true
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode"> [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
</claim-selected-datasets> </claim-selected-datasets>
</div> </div>

View File

@ -5,33 +5,36 @@ import {Observable} from 'rxjs/Observable';
selector: 'linking-home', selector: 'linking-home',
template: ` template: `
<div class="uk-grid">
<!--<img class="card-img-top" data-src="images/funders.png" alt="Card image cap"> -->
<div class="uk-block uk-block-muted uk-margin uk-text-center uk-width-1-2">
<h4 class="card-title">Link with project</h4>
<p class="card-text">Link your research result with funded projects.</p>
<a (click)="select('project')" class="btn btn-primary">Link with project</a>
</div> <div class="uk-grid">
<div class="uk-width-1-2"> <div class="uk-panel uk-panel-box uk-text-center uk-margin-top ">
<a (click)="select('project')">
<h4 class="card-title">Link with project</h4>
<p class="card-text">Link your research result with funded projects.</p>
</a>
<div class="uk-block uk-block-muted uk-margin uk-text-center uk-width-1-2"> </div></div>
<h4 class="card-title">Link with Community</h4>
<p class="card-text">Link your research result with research communities.</p>
<a (click)="select('context')" class="btn btn-primary">Link with community</a>
</div>
<!--div class="uk-block uk-block-muted uk-margin uk-width-1-2">
<h4 class="card-title">Link with Software</h4>
<p class="card-text">....</p>
<a (click)="select('software')" class="btn btn-primary">Link with software</a>
</div--> <div class="uk-width-1-2"> <div class="uk-panel uk-panel-box uk-text-center uk-margin-top ">
<div *ngIf=" !bulkMode " class="uk-block uk-block-muted uk-margin uk-text-center uk-width-1-2"> <a (click)="select('context')" >
<h4 class="card-title">Bulk mode linking</h4> <h4 class="card-title">Link with Community</h4>
<p class="card-text">Link your research result with research communities.</p>
</a>
</div> </div>
<!--div class="uk-width-1-2"> <div class="uk-panel uk-panel-box uk-text-center uk-margin-top ">
<a (click)="select('software')" >
<h4 class="card-title">Link with Software</h4>
<p class="card-text">Link your research result with software.</p>
</a>
</div> </div-->
<div class="uk-width-1-2" *ngIf=" !bulkMode "> <div class="uk-panel uk-panel-box uk-text-center uk-margin-top ">
<a href="/bulk-linking" > <h4 class="card-title">Bulk mode linking</h4>
<p class="card-text">Link Research Results to projects,contects, etc, providing a CSV file with research results' DOIs</p> <p class="card-text">Link Research Results to projects,contects, etc, providing a CSV file with research results' DOIs</p>
<a href="/bulk-linking" class="btn btn-primary">Bulk mode linking</a> </a>
</div> </div> </div>
</div>
</div>
` `

View File

@ -7,7 +7,7 @@ import {ClaimContext} from '../../claim-utils/claimEntities.class';
<!-- Contexts --> <!-- Contexts -->
<!--div *ngIf=" !(inline && hideType == 'context') && contexts" class="concepts" --> <!--div *ngIf=" !(inline && hideType == 'context') && contexts" class="concepts" -->
<div *ngIf=" !(inline && hideType == 'context') " class="uk-accordion" data-uk-accordion="{showfirst:false}"> <div *ngIf=" !(inline && hideType == 'context') " class="uk-accordion" data-uk-accordion="{showfirst:false}">
<h3 class="uk-accordion-title">Concepts ({{(contexts.length)}}) <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> Concepts ({{(contexts.length)}})
<!--span *ngIf=" !inline" title="Add More Concepts" (click)="showType('context')" aria-hidden="true" style="float:right;cursor: pointer;"><i class="uk-icon-plus"></i></span--> <!--span *ngIf=" !inline" title="Add More Concepts" (click)="showType('context')" aria-hidden="true" style="float:right;cursor: pointer;"><i class="uk-icon-plus"></i></span-->
</h3> </h3>
<div class="uk-accordion-content" > <div class="uk-accordion-content" >

View File

@ -6,7 +6,7 @@ import {ClaimResult} from '../../claim-utils/claimEntities.class';
template: ` template: `
<div *ngIf=" !(inline && ( hideType == 'dataset' ))" class="uk-accordion " data-uk-accordion="{showfirst:false}" > <div *ngIf=" !(inline && ( hideType == 'dataset' ))" class="uk-accordion " data-uk-accordion="{showfirst:false}" >
<h3 class="uk-accordion-title" > Research Data ({{(datasets.length)}}) </h3> <h3 class="uk-accordion-title" > <i class="uk-icon-caret-square-o-right"></i> Research Data ({{(datasets.length)}}) </h3>
<div class="uk-accordion-content" > <div class="uk-accordion-content" >
<!--li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning "> {{datasets.length}} Selected Research Data: <!--li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning "> {{datasets.length}} Selected Research Data:

View File

@ -6,7 +6,7 @@ import {ClaimProject} from '../../claim-utils/claimEntities.class';
template: ` template: `
<div *ngIf=" !(inline && hideType == 'project') " class="uk-accordion" data-uk-accordion="{showfirst:false}"> <div *ngIf=" !(inline && hideType == 'project') " class="uk-accordion" data-uk-accordion="{showfirst:false}">
<h3 class="uk-accordion-title"> Projects ({{(projects.length)}}) <h3 class="uk-accordion-title"><i class="uk-icon-caret-square-o-right"></i> Projects ({{(projects.length)}})
</h3> </h3>
<!--div *ngIf=" !(inline && hideType == 'project') && projects.length > 0 " class="projects" > <!--div *ngIf=" !(inline && hideType == 'project') && projects.length > 0 " class="projects" >

View File

@ -7,37 +7,45 @@ import {ClaimResult} from '../../claim-utils/claimEntities.class';
template: ` template: `
<div class =" "> <div class =" ">
<div *ngIf=" !(inline && hideType == 'publication' ) " class="uk-accordion " data-uk-accordion="{showfirst:false}" > <div *ngIf=" !(inline && hideType == 'publication' ) " class="uk-accordion " data-uk-accordion="{showfirst:false}" >
<h3 class="uk-accordion-title" > Publications ({{(publications.length)}}) </h3> <h3 class="uk-accordion-title" ><i class="uk-icon-caret-square-o-right"></i> Publications ({{(publications.length)}}) </h3>
<div class="uk-accordion-content" > <div class="uk-accordion-content" >
<span *ngIf="publications.length == 0 " class="uk-alert uk-alert-primary">There are no selected publications</span> <span *ngIf="publications.length == 0 " class="uk-alert uk-alert-primary">There are no selected publications</span>
<ul *ngIf="publications.length > 0 " class="uk-list"> <ul *ngIf="publications.length > 0 " class="uk-list uk-list-line">
<li *ngFor="let pub of publications" class="list-group-item"> <li *ngFor="let pub of publications" >
<div class="row"> <div class="uk-grid">
<div [ngClass]="showAccessRights?'col-md-8':'col-md-12'" > <div [ngClass]="showAccessRights?'uk-width-7-10':'uk-width-1-1'" >
<span *ngIf="showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="btn"><i class="uk-icon-remove"></i></span> <div>
<a *ngIf="pub.url" target="_blank" href="{{pub.url}}" >{{pub.title}}</a> <span *ngIf="showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="uk-button"><i class="uk-icon-remove"></i></span>
<span *ngIf="!pub.url" >{{pub.title}}</span><span *ngIf="pub.date" >({{pub.date.substring(0,4)}})</span> <a *ngIf="pub.url" target="_blank" href="{{pub.url}}" >{{pub.title}}</a>
<span *ngIf="!showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="btn "><i class="uk-icon-remove"></i></span> <span *ngIf="!pub.url" >{{pub.title}}</span><span *ngIf="pub.date" class="uk-article-meta" >({{pub.date.substring(0,4)}})</span>
<span *ngIf="!showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="uk-button "><i class="uk-icon-remove"></i></span>
</div>
<!-- Crossref -->
<span *ngIf="pub.result.publisher" class="uk-article-meta">Publisher: {{pub.result.publisher}}</span>
<div *ngIf="pub.result.author && pub.result.author.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.author let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.author.length-1))?"; ":""}}</span></div>
<div *ngIf="pub.result.editor && pub.result.editor.length" class="uk-article-meta">Editors: <span *ngFor="let author of pub.result.editor let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.editor.length-1))?"; ":""}}</span></div>
<!-- Openaire -->
<div *ngIf="pub.result.authors && pub.result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.authors let i = index">{{author.name}}{{(i < (pub.result.authors.length-1))?"; ":""}}</span></div>
<!-- Orcid -->
<span *ngIf="pub.result['journal-title'] && pub.result['journal-title'].value " class="uk-article-meta">Journal: {{pub.result['journal-title'].value}}</span>
<div *ngIf="pub.result.contributors && pub.result.contributors.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.contributors let i = index">{{author}}{{(i < (pub.result.contributors.length-1))?"; ":""}}</span></div>
</div> </div>
<div *ngIf="showAccessRights && pub.source != 'openaire' " class = "col-md-4"> <div *ngIf="showAccessRights && pub.source != 'openaire' " class = "uk-width-3-10">
<span *ngIf="showAccessRights && pub.source != 'openaire' " class="dropdown"> <span *ngIf="showAccessRights && pub.source != 'openaire' " class="dropdown">
<select [(ngModel)]="pub.accessRights" name="{{'select_rights_'+pub.id}}" > <select [(ngModel)]="pub.accessRights" name="{{'select_rights_'+pub.id}}" >
<option *ngFor="let type of accessTypes" [value]="type" (click)="accessRightsTypeChanged(type,pub)">{{type}}</option> <option *ngFor="let type of accessTypes" [value]="type" (click)="accessRightsTypeChanged(type,pub)">{{type}}</option>
</select> </select>
<input *ngIf="pub.accessRights== 'EMBARGO'" id="{{'date'+pub.id}}" type="text" data-uk-datepicker="{format:'YYYY-MM-DD'}"> <input *ngIf="pub.accessRights== 'EMBARGO'" class="uk-form-width-small" id="{{'date'+pub.id}}" type="text" data-uk-datepicker="{format:'YYYY-MM-DD'}">
<!--button class="uk-button dropdown-toggle" type="button" id="{{'dropdown'+pub.id}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
{{pub.accessRights}}
</button>
<ul class="dropdown-menu" [attr.aria-labelledby]="'dropdown'+pub.id">
<li *ngFor="let type of accessTypes" ><a (click)="accessRightsTypeChanged(type,pub) " >{{type}} </a></li>
</ul>
<input *ngIf="pub.accessRights== 'EMBARGO'" type="date" id="{{'date'+pub.id}}" name="" [min]="todayDate" (keyup)="dateChanged($event, pub)" [value]="pub.embargoEndDate"-->
</span> </span>
</div> </div>
<div *ngIf="showAccessRights && pub.source == 'openaire' " class = "col-md-4"> <div *ngIf="showAccessRights && pub.source == 'openaire' " class = "uk-width-3-10">
<span > <span >
<button class="uk-button disabled " type="button" > <button class="uk-button disabled " type="button" >
{{pub.accessRights}} {{pub.accessRights}}

View File

@ -234,7 +234,7 @@ private _getResults(parameters:string,refine:boolean, page: number, size: number
} }
public getAggregatorResults(id:string, page: number, size: number){ public getAggregatorResults(id:string, page: number, size: number){
this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasourceid" , page, size).subscribe( this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
data => { data => {
this.results = data; this.results = data;

View File

@ -380,15 +380,15 @@ export class SearchPublicationsService {
parseRefineResults(data: any): any { parseRefineResults(data: any): any {
var results:any = []; var results:any = [];
if(data.hasOwnProperty("resulthostingdatasourceid")) { if(data.hasOwnProperty("resulthostingdatasource")) {
let length = Array.isArray(data['resulthostingdatasourceid']) ? data['resulthostingdatasourceid'].length : 1; let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
for(let i=0; i<length; i++) { for(let i=0; i<length; i++) {
let datasource = Array.isArray(data['resulthostingdatasourceid']) ? data['resulthostingdatasourceid'][i] : data['resulthostingdatasourceid']; let datasource = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'][i] : data['resulthostingdatasource'];
let result: {"name": string, "id": string, "url":string, "count": number} = {"name": "", "id": "", "url": "", "count": 0}; let result: {"name": string, "id": string, "url":string, "count": number} = {"name": "", "id": "", "url": "", "count": 0};
result['name'] = datasource.name; result['name'] = datasource.name;
result['id'] = datasource.id; result['id'] = datasource.id.split("||")[0];
result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id']; result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
result['count'] = datasource.count; result['count'] = datasource.count;

View File

@ -74,6 +74,18 @@ import 'rxjs/Rx';
</div> </div>
</li> </li>
<li class="uk-parent" data-uk-dropdown="" aria-haspopup="true" aria-expanded="false">
<a routerLinkActive="router-link-active" routerLink="linking" >Linking</a>
<div class="uk-dropdown uk-dropdown-navbar uk-dropdown-bottom" aria-hidden="true" style="top: 40px; left: 0px;" tabindex="">
<ul class="uk-nav uk-nav-navbar">
<li><a routerLinkActive="router-link-active" routerLink="linking">Linking</a></li>
<li><a routerLinkActive="router-link-active" routerLink="bulk-linking">Bulk Linking</a></li>
<li><a routerLinkActive="router-link-active" routerLink="claims">Claims Admin</a></li>
</ul>
</div>
</li>
</ul> </ul>

View File

@ -180,7 +180,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
} }
public getAggregatorResults(id:string, page: number, size: number){ public getAggregatorResults(id:string, page: number, size: number){
this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasourceid" , page, size).subscribe( this.subResults = this._searchPublicationsService.searchAggregators('&fq=collectedfromdatasourceid exact "'+id+'"',"&refine=true&fields=resulthostingdatasource" , page, size).subscribe(
data => { data => {
this.results = data; this.results = data;