+
+ - ProjectProject
+ - ContextContext
+ - SoftwareSoftware
+ - Research ResultResearch Result
+ - LinkLink
+
+
@@ -38,7 +46,7 @@ import {LinkingHomeComponent} from './linkingHome.component';
-->
-
+
-
+
-
+
@@ -107,10 +117,10 @@ export class LinkingComponent {
publications=[];
datasets=[];
show = "home";
- searchType="publication";
+ searchType="publication"; //publication or dataset
date='8-6-2016';
keyword: string = "";
- chosenType:string ="project";
+ linkType:string ="project"; // link type (selected in home page) : project, context, software, etc
ngOnInit() {
}
@@ -130,11 +140,11 @@ export class LinkingComponent {
}
prev(){
if(this.show == 'result'){
- if(this.chosenType == 'project'){
+ if(this.linkType == 'project'){
this.show='project';
- }else if(this.chosenType == 'context'){
+ }else if(this.linkType == 'context'){
this.show='context';
- }else if(this.chosenType == 'software'){
+ }else if(this.linkType == 'software'){
this.show='software';
}else{
this.show='home';
@@ -185,9 +195,23 @@ export class LinkingComponent {
typeChanged(type:string) {
this.searchType = type;
}
- chosenTypeChange($event) {
- this.chosenType = this.show;
+ linkTypeChange($event) {
+ this.linkType =$event.value;
this.show=$event.value;
+ }
+ showChange($event) {
+ this.show=$event.value;
+ this.showChangedType($event.value);
+
+
+ }
+ showChangedType(type:string) {
+ this.show=type;
+ if(this.show == 'project' || this.show == 'context' || this.show == 'software'){
+ this.linkType = this.show;
+ }
+
+
}
}
diff --git a/src/app/linking/linkingHome.component.ts b/src/app/linking/linkingHome.component.ts
index 6ffd41d7..2c874f12 100644
--- a/src/app/linking/linkingHome.component.ts
+++ b/src/app/linking/linkingHome.component.ts
@@ -1,4 +1,4 @@
-import {Component, Output, EventEmitter } from '@angular/core';
+import {Component, Output, EventEmitter} from '@angular/core';
import {RouteConfig, ROUTER_DIRECTIVES, Router} from '@angular/router-deprecated';
import {JSONP_PROVIDERS} from '@angular/http';
import {Observable} from 'rxjs/Observable';
@@ -42,13 +42,12 @@ import {Observable} from 'rxjs/Observable';
})
export class LinkingHomeComponent {
- @Output() chosenTypeChange = new EventEmitter();
- chosenType:string = "result";
+ @Output() linkTypeChange = new EventEmitter();
+ linkType:string = "project";
select(type:string){
- console.info('Changed!'+type);
- this.chosenType = type;
- this.chosenTypeChange.emit({
- value: this.chosenType
+ this.linkType = type;
+ this.linkTypeChange.emit({
+ value: this.linkType
});
}
diff --git a/src/app/linking/selected/selected.component.ts b/src/app/linking/selected/selected.component.ts
index c6c8935b..395f90c3 100644
--- a/src/app/linking/selected/selected.component.ts
+++ b/src/app/linking/selected/selected.component.ts
@@ -1,60 +1,130 @@
-import {Component, Input,Output} from '@angular/core';
+import {Component, Input,Output, EventEmitter} from '@angular/core';
import {PublicationTitleFormatter} from '../../common/publicationTitleFormatter.component';
@Component({
selector: 'claim-selected',
template: `
-
0 " class="publications" >
-
Selected Publications:
-
Source: {{pub.source}} - Title:
-
-
-
-
-
+
+
+
+
+
+
+ - Selected Concepts ({{(contexts.length)}})
+
+
+ -
+ {{context.community }} > {{context.category}} > {{context.concept.label}}
+
+
+
+ - There are no contexts
+
+
+
-
0 " class="concepts" >
-
- - Selected Concepts:
- - {{context.community}} - Category: {{context.category}}
-
-
-
0 " class="conprojectscepts" >
-
- - Selected Projects
- -
-
- {{project.projectAcronym}} - {{project.projectName}}
+
+
+
+
+ - Selected Projects ({{(projects.length)}})
+
-
+
-
+
+ {{project.funderName}} | {{project.projectName}} {{(project.projectAcronym)?'()'+project.projectAcronym+')':''}}
+
+
+
- There are no projects
+
+
+
- 0 " class="datasets" >
-
Selected datasets:
-
Datasets: Source: {{dataset.source}} - Title:
-
-
+
+
- `,
+
+
+
+ - Selected Research Results
+
+
+ - There are no Research Results
+
+
+-->
+
+
+
+ - Research Results ({{(datasets.length+publications.length)}})
+
+
+ - There are no Research Results
+ - {{publications. length }} Selected Publications:
+
+
+ -
+
+
+ {{pub.title}}
+ {{pub.title}}
+
+
+
+
+
+
+
+
+
+
+ - {{datasets.length}} Selected Research Data:
+
+
+ -
+
+
+ {{dataset.title}}
+ {{dataset.title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `,
directives: [ PublicationTitleFormatter]
@@ -70,16 +140,69 @@ export class ClaimSelectedComponent {
@Input() publications=[];
@Input() datasets=[];
@Input() showAccessRights=false;
+ @Input() show='home';
+ @Output() projectsChange = new EventEmitter();
+ @Output()publicationsChange = new EventEmitter();
+ @Output() datasetsChange = new EventEmitter();
+ @Output() contextsChange = new EventEmitter();
+ @Output() showChange = new EventEmitter();
+ removeContext(item:any){
+ var index:number =this.contexts.indexOf(item);
+ if (index > -1) {
+ this.contexts.splice(index, 1);
+ }
+ this.contextsChange.emit({
+ value: this.contexts
+ });
+ }
+ removePublication(item:any){
+ var index:number =this.publications.indexOf(item);
+ if (index > -1) {
+ this.publications.splice(index, 1);
+ }
+ this.publicationsChange.emit({
+ value: this.publications
+ });
+ }
+ removeDataset(item:any){
+ var index:number =this.datasets.indexOf(item);
+ if (index > -1) {
+ this.datasets.splice(index, 1);
+ }
+ this.datasetsChange.emit({
+ value: this.datasets
+ });
+ }
+ removeProject(item:any){
+ var index:number =this.projects.indexOf(item);
+ if (index > -1) {
+ this.projects.splice(index, 1);
+ }
+ this.projectsChange.emit({
+ value: this.projects
+ });
+ }
+ showType(type){
+ if(type != this.show){
+ this.show = type;
+ this.showChange.emit({
+ value: this.show
+ });
+ }
+ }
accessTypes = ["OPEN","CLOSED","EMBARGO","RESTRICTED"];
-
-
-
-
-
-
-
+}
+
+
+
+@Component({
+ selector: 'add-more',
+ template: ``
+})
+export class Addmore {
+ @Input() type = 'publication';
}
diff --git a/src/app/services/openaireProjects.service.ts b/src/app/services/openaireProjects.service.ts
index 5d9ddc9f..c0c8e69f 100644
--- a/src/app/services/openaireProjects.service.ts
+++ b/src/app/services/openaireProjects.service.ts
@@ -9,7 +9,8 @@ import {Observable} from 'rxjs/Observable';
export class OpenaireProjectsService {
constructor( private http: Http) {}
// searchUrl="http://services.openaire.eu:8380/search/";
- searchUrl="http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
+ // searchUrl="http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/";
+ searchUrl="http://scoobydoo.di.uoa.gr:8181/dnet-functionality-services-2.0.0-SNAPSHOT/";
getFunders():any {
let url = this.searchUrl+'search?action=refine&rTransformer=results_openaire_browse&fields=funderid&query=%28oaftype+exact+project%29&locale=en_GB&format=json';
////"&rows=".$size."&offset=".($page-1)*$size
@@ -26,7 +27,7 @@ export class OpenaireProjectsService {
////"&rows=".$size."&offset=".($page-1)*$size
return this.http.get( url)
- .map(request => request.json().response.results.result)
+ .map(request => (request.json().response.results)?request.json().response.results.result:request.json().response.results)
.do(funders => console.log("getFunders : "+funders))
.catch(this.handleError);