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:
parent
731003e050
commit
91c6b0ed47
|
@ -119,6 +119,10 @@ export function getLinkingModule() {
|
|||
return System.import('./claims/linking/linking.module' + (process.env.AOT ? '.ngfactory' : ''))
|
||||
.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({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
|
@ -151,7 +155,10 @@ export function getLinkingModule() {
|
|||
{ path: 'project-report', loadChildren: gethtmlProjectReportModule },
|
||||
{ path: 'myclaims', loadChildren: getMyClaimsModule },
|
||||
{ path: 'claims', loadChildren: getClaimsAdminModule },
|
||||
{ path: 'linking', loadChildren: getLinkingModule }
|
||||
{ path: 'bulk-linking', loadChildren: getBulkLinkingModule },
|
||||
{ path: 'linking', loadChildren: getLinkingModule },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -423,12 +423,12 @@ export class DisplayClaimsComponent {
|
|||
|
||||
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).subscribe(
|
||||
res => {
|
||||
console.info('Delete response'+res.code );
|
||||
console.warn("Deleted claim with id:"+ id);
|
||||
console.log('Delete response'+res.code );
|
||||
console.log("Deleted claim with id:"+ id);
|
||||
//remove this claim from the
|
||||
let newClaims=this.claims;
|
||||
for (var _i = 0; _i < this.claims.length; _i++) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {ProjectTitleFormatter} from './projectTitleFormatter.component';
|
||||
import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
|
||||
|
@ -8,7 +9,7 @@ import {ClaimEntityFormatter} from './claimEntityFormatter.component';
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
CommonModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
|
||||
import {RouterHelper} from '../../../utils/routerHelper.class';
|
||||
|
||||
//Usage Example "<project-title [project]="X" > </project-title>"
|
||||
|
||||
|
@ -7,7 +8,7 @@ import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
|
|||
selector: 'project-title',
|
||||
template: `
|
||||
<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>
|
||||
`
|
||||
})
|
||||
|
@ -15,6 +16,7 @@ import {OpenaireProperties} from '../../../utils/properties/openaireProperties';
|
|||
export class ProjectTitleFormatter {
|
||||
@Input() project: string[];
|
||||
public url:string;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
constructor () {}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {Component, Input} from '@angular/core';
|
|||
selector: 'publication-title',
|
||||
template: `
|
||||
<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>
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -8,37 +8,38 @@ import {Dates, DOI} from '../../../utils/string-utils.class';
|
|||
@Component({
|
||||
selector: 'bulk-claim',
|
||||
template: `
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputFile">File input</label>
|
||||
<form class="uk-form">
|
||||
<label for="exampleInputFile">Select a file</label>
|
||||
<input id="exampleInputFile" type="file" (change)="fileChangeEvent($event)" placeholder="Upload file..." />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-success" [class.disabled]="!enableUpload" type="button" (click)="upload()">Upload</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="help-block">Upload a csv file containing DOIs. For each DOI found in file, metadata will be fetched from CrossRef.
|
||||
Available results can be linked with the selected Projects and Contexts.
|
||||
<a (click)="showInfo = !showInfo"> More information</a>
|
||||
<div *ngIf = "showInfo">
|
||||
CSV format:
|
||||
<ul>
|
||||
<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>Date column valid format is YYYY-MM-DD and is required when access mode has value EMBARGO.</li>
|
||||
<li>In case access mode is not available default value is "OPEN".</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="showReport" class="alert alert-info" role="alert" >
|
||||
<button class="uk-button uk-button-success" [class.disabled]="!enableUpload" type="button" (click)="upload()">Upload</button>
|
||||
</form>
|
||||
<div class="uk-panel uk-panel-box uk-margin-top uk-margin-bottom">
|
||||
<div class="uk-panel-badge uk-badge"><i class="uk-icon-info"></i></div>
|
||||
<div class="uk-text-bold">Upload information:</div>
|
||||
Upload a csv file containing a list of DOIs. For each DOI found in the file, metadata will be fetched from CrossRef.
|
||||
Available results will be linked with the selected Projects and Contexts.
|
||||
|
||||
<div class="uk-article-meta">
|
||||
CSV format:
|
||||
<ul class="uk-list">
|
||||
<li>The format of CSV file should be "DOI","ACCESS_MODE","DATE".</li>
|
||||
<li>The value "DOI" is required </li>
|
||||
<li>Access mode column should have values: "OPEN","CLOSED" or "EMBARGO".</li>
|
||||
<li>Date column valid format is YYYY-MM-DD and is required when access mode has value EMBARGO.</li>
|
||||
<li>In case access mode is not available default value is "OPEN".</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showReport" class="uk-alert uk-alert-info" role="alert" >
|
||||
<span>{{all}} rows found in file.</span>
|
||||
<span>{{found}} results fetched from CrossRef.</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 = "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 *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>
|
||||
`
|
||||
|
||||
|
|
|
@ -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 { }
|
|
@ -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 { }
|
|
@ -206,7 +206,7 @@ private validateDates(){
|
|||
}
|
||||
private afterclaimsInsertion(insertedIds, errorInClaims){
|
||||
this.loading.close();
|
||||
if(errorInClaims.length == 0){
|
||||
if(errorInClaims.length == 0 && insertedIds.length > 0 ){
|
||||
if(this.inline){
|
||||
this.show = "end";
|
||||
}else{
|
||||
|
|
|
@ -6,9 +6,11 @@ import { Router } from '@angular/router';
|
|||
selector: 'linking-generic',
|
||||
//providers: [MdRadioDispatcher],
|
||||
template: `
|
||||
<div class="container">
|
||||
<div class="container uk-margin-top">
|
||||
<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>
|
||||
</div>
|
||||
<linking-home *ngIf=" show == 'home' " [bulkMode]="bulkMode" (linkTypeChange)="linkTypeChange($event)" ></linking-home>
|
||||
|
@ -24,47 +26,39 @@ import { Router } from '@angular/router';
|
|||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf=" show=='project' " class="uk-width-1-1" >
|
||||
<claim-projects [selectedProjects]="projects" > </claim-projects>
|
||||
</div>
|
||||
<div *ngIf=" show=='software' " class="uk-width-1-1">
|
||||
<p>TODO software</p>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div *ngIf=" show == 'claim'" >
|
||||
<claim-insert [contexts]="contexts" [publications]="publications" [datasets]="datasets" [projects]="projects" ></claim-insert>
|
||||
</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>-->
|
||||
<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 '">
|
||||
<claim-selected-contexts [contexts]="contexts" [show]="show"
|
||||
<claim-selected-contexts [contexts]="contexts" [show]="show"
|
||||
(showChange)="showChange($event)" > </claim-selected-contexts>
|
||||
</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"
|
||||
(showChange)="showChange($event)" > </claim-selected-projects>
|
||||
</div>
|
||||
</div>
|
||||
<!---claim-selected-results [datasets]="datasets" [publications]="publications" [show]="show"
|
||||
(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'">
|
||||
<claim-selected-publications [publications]="publications" [showAccessRights]="showAccessRights"
|
||||
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
|
||||
<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" [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
|
||||
</claim-selected-publications>
|
||||
</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 '">
|
||||
<claim-selected-datasets [datasets]="datasets" [showAccessRights]="showAccessRights"
|
||||
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
|
||||
</claim-selected-datasets>
|
||||
</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 '">
|
||||
<claim-selected-datasets [datasets]="datasets" [linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode"> </claim-selected-datasets>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -83,12 +77,12 @@ import { Router } from '@angular/router';
|
|||
|
||||
<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">
|
||||
<claim-selected-publications [publications]="publications" [showAccessRights]="showAccessRights"
|
||||
<claim-selected-publications [publications]="publications" [showAccessRights]=true
|
||||
[linkToResults]="(bulkMode)?false:true" [bulkMode]="bulkMode">
|
||||
</claim-selected-publications>
|
||||
</div>
|
||||
<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">
|
||||
</claim-selected-datasets>
|
||||
</div>
|
||||
|
|
|
@ -5,33 +5,36 @@ import {Observable} from 'rxjs/Observable';
|
|||
selector: 'linking-home',
|
||||
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">
|
||||
<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>
|
||||
|
||||
</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 *ngIf=" !bulkMode " class="uk-block uk-block-muted uk-margin uk-text-center uk-width-1-2">
|
||||
<h4 class="card-title">Bulk mode linking</h4>
|
||||
<div class="uk-width-1-2"> <div class="uk-panel uk-panel-box uk-text-center uk-margin-top ">
|
||||
<a (click)="select('context')" >
|
||||
<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>
|
||||
<a href="/bulk-linking" class="btn btn-primary">Bulk mode linking</a>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div> </div>
|
||||
|
||||
</div>
|
||||
|
||||
`
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {ClaimContext} from '../../claim-utils/claimEntities.class';
|
|||
<!-- Contexts -->
|
||||
<!--div *ngIf=" !(inline && hideType == 'context') && contexts" class="concepts" -->
|
||||
<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-->
|
||||
</h3>
|
||||
<div class="uk-accordion-content" >
|
||||
|
|
|
@ -6,7 +6,7 @@ import {ClaimResult} from '../../claim-utils/claimEntities.class';
|
|||
template: `
|
||||
|
||||
<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" >
|
||||
|
||||
<!--li *ngIf="publications.length > 0 || datasets.length > 0" class="list-group-item list-group-item-warning "> {{datasets.length}} Selected Research Data:
|
||||
|
|
|
@ -6,7 +6,7 @@ import {ClaimProject} from '../../claim-utils/claimEntities.class';
|
|||
template: `
|
||||
|
||||
<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>
|
||||
<!--div *ngIf=" !(inline && hideType == 'project') && projects.length > 0 " class="projects" >
|
||||
|
|
|
@ -7,37 +7,45 @@ import {ClaimResult} from '../../claim-utils/claimEntities.class';
|
|||
template: `
|
||||
<div class =" ">
|
||||
<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" >
|
||||
<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">
|
||||
<li *ngFor="let pub of publications" class="list-group-item">
|
||||
<div class="row">
|
||||
<div [ngClass]="showAccessRights?'col-md-8':'col-md-12'" >
|
||||
<span *ngIf="showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="btn"><i class="uk-icon-remove"></i></span>
|
||||
<a *ngIf="pub.url" target="_blank" href="{{pub.url}}" >{{pub.title}}</a>
|
||||
<span *ngIf="!pub.url" >{{pub.title}}</span><span *ngIf="pub.date" >({{pub.date.substring(0,4)}})</span>
|
||||
<span *ngIf="!showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="btn "><i class="uk-icon-remove"></i></span>
|
||||
<ul *ngIf="publications.length > 0 " class="uk-list uk-list-line">
|
||||
<li *ngFor="let pub of publications" >
|
||||
<div class="uk-grid">
|
||||
<div [ngClass]="showAccessRights?'uk-width-7-10':'uk-width-1-1'" >
|
||||
<div>
|
||||
<span *ngIf="showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="uk-button"><i class="uk-icon-remove"></i></span>
|
||||
<a *ngIf="pub.url" target="_blank" href="{{pub.url}}" >{{pub.title}}</a>
|
||||
<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 *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">
|
||||
<select [(ngModel)]="pub.accessRights" name="{{'select_rights_'+pub.id}}" >
|
||||
<option *ngFor="let type of accessTypes" [value]="type" (click)="accessRightsTypeChanged(type,pub)">{{type}}</option>
|
||||
</select>
|
||||
<input *ngIf="pub.accessRights== 'EMBARGO'" 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'" class="uk-form-width-small" id="{{'date'+pub.id}}" type="text" data-uk-datepicker="{format:'YYYY-MM-DD'}">
|
||||
|
||||
<input *ngIf="pub.accessRights== 'EMBARGO'" type="date" id="{{'date'+pub.id}}" name="" [min]="todayDate" (keyup)="dateChanged($event, pub)" [value]="pub.embargoEndDate"-->
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div *ngIf="showAccessRights && pub.source == 'openaire' " class = "col-md-4">
|
||||
<div *ngIf="showAccessRights && pub.source == 'openaire' " class = "uk-width-3-10">
|
||||
<span >
|
||||
<button class="uk-button disabled " type="button" >
|
||||
{{pub.accessRights}}
|
||||
|
|
|
@ -234,7 +234,7 @@ private _getResults(parameters:string,refine:boolean, 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 => {
|
||||
this.results = data;
|
||||
|
||||
|
|
|
@ -380,15 +380,15 @@ export class SearchPublicationsService {
|
|||
|
||||
parseRefineResults(data: any): any {
|
||||
var results:any = [];
|
||||
if(data.hasOwnProperty("resulthostingdatasourceid")) {
|
||||
let length = Array.isArray(data['resulthostingdatasourceid']) ? data['resulthostingdatasourceid'].length : 1;
|
||||
if(data.hasOwnProperty("resulthostingdatasource")) {
|
||||
let length = Array.isArray(data['resulthostingdatasource']) ? data['resulthostingdatasource'].length : 1;
|
||||
|
||||
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};
|
||||
result['name'] = datasource.name;
|
||||
result['id'] = datasource.id;
|
||||
result['id'] = datasource.id.split("||")[0];
|
||||
result['url'] = OpenaireProperties.getsearchLinkToDataProvider()+result['id'];
|
||||
result['count'] = datasource.count;
|
||||
|
||||
|
|
|
@ -74,6 +74,18 @@ import 'rxjs/Rx';
|
|||
</div>
|
||||
|
||||
</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>
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ public getResultsForDataproviders(id:string, resultsFrom:string, page: number, s
|
|||
}
|
||||
|
||||
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 => {
|
||||
this.results = data;
|
||||
|
||||
|
|
Loading…
Reference in New Issue