diff --git a/src/app/linking/claimDataset/claimDataset.component.ts b/src/app/linking/claimDataset/claimDataset.component.ts index 9ef7add5..552f0e8c 100644 --- a/src/app/linking/claimDataset/claimDataset.component.ts +++ b/src/app/linking/claimDataset/claimDataset.component.ts @@ -11,37 +11,53 @@ import {SearchDataciteService} from '../../services/searchDatacite.service'; selector: 'claim-dataset', directives: [...ROUTER_DIRECTIVES,pagingFormatterNoLoad, PublicationTitleFormatter], template: ` + +
+
+
+
+ Dataset + + + +
-
-
-

Menu 1

-

Some content in menu 1.

-
- +
+ + +
+
+ + +
+
+
+
+

{{resultsNum }} Total Results

+ +
+
+

+
+
+
+
+

Menu 1

+

Some content in menu 1.

+
+
+
+
+ `, providers:[JSONP_PROVIDERS, SearchDataciteService] }) diff --git a/src/app/linking/claimProject/claimProject.component.ts b/src/app/linking/claimProject/claimProject.component.ts index e383e0bb..1d3413d0 100644 --- a/src/app/linking/claimProject/claimProject.component.ts +++ b/src/app/linking/claimProject/claimProject.component.ts @@ -8,60 +8,43 @@ import {OpenaireProjectsService} from '../../services/openaireProjects.service'; @Component({ selector: 'claim-projects', template: ` -
+
-

Select Funder:

- - `, providers:[ OpenaireProjectsService ] diff --git a/src/app/linking/claimPublication/claimPublication.component.html b/src/app/linking/claimPublication/claimPublication.component.html index 90f9f340..30ebfa23 100644 --- a/src/app/linking/claimPublication/claimPublication.component.html +++ b/src/app/linking/claimPublication/claimPublication.component.html @@ -1,68 +1,77 @@ -

Selected Results:

+ -
- - -
- -
-
-
-
-

{{crossrefResultsNum }} Total Results

- -
-
-

-
+
+
+
+ Publication + + + +
-
-
- -

TODO put openaire results here...

-
-
- -

No authors found for keyword: {{keyword}}

- -
-

Not the right author? Choose one of these:

- - -
- -
-

{{orcidResultsNum }} Total Results for author - {{authorGivenName}} {{authorFamilyName}} : {{authorId}} -

-
- -
- - + +
+
+ +
+
+
+
+

{{crossrefResultsNum }} Total Results

+
+
+

+
+
+
+
-
-

{{item['work-title']['title'].value}} ({{item['publication-date']['year'].value}})

+

TODO put openaire results here...

+
+
+ +

No authors found for keyword: {{keyword}}

+ +
+

Not the right author? Choose one of these:

+ + +
+ +
+

{{orcidResultsNum }} Total Results for author + {{authorGivenName}} {{authorFamilyName}} : {{authorId}} +

+
+ +
+ + +
+ +
+

{{item['work-title']['title'].value}} ({{item['publication-date']['year'].value}})

+
-
+
diff --git a/src/app/linking/claimPublication/claimPublication.component.ts b/src/app/linking/claimPublication/claimPublication.component.ts index dd407131..6456c14e 100644 --- a/src/app/linking/claimPublication/claimPublication.component.ts +++ b/src/app/linking/claimPublication/claimPublication.component.ts @@ -174,10 +174,11 @@ search(term: string, size : number, page : number){ var result ={id: item.DOI, type :itemType, source : itemSource, title: itemTitle,url: itemUrl, result: item, accessRights: 'OPEN', embargoEndDate:''}; console.info("Add result:"+result.id+" "+result.source+" "+item); this.selectedPublications.push(result); - var index:number =this.crossrefResults.indexOf(item); - if (index > -1) { - this.crossrefResults.splice(index, 1); - } + //do not remove it from the list + // var index:number =this.crossrefResults.indexOf(item); + // if (index > -1) { + // this.crossrefResults.splice(index, 1); + // } this.publicationsChange.emit({ value: this.selectedPublications }); @@ -202,4 +203,13 @@ search(term: string, size : number, page : number){ this.orcidResultsToShow=[]; this.orcidResultsToShow = this.orcidResults.slice(($event.value-1)*this.size, $event.value*this.size); } + + isSelected(item){ + var index:number =this.selectedPublications.indexOf(item); + if (index > -1) { + return true; + }else{ + return false; + } + } } diff --git a/src/app/linking/linking.component.ts b/src/app/linking/linking.component.ts index 65823dc8..acca5542 100644 --- a/src/app/linking/linking.component.ts +++ b/src/app/linking/linking.component.ts @@ -8,32 +8,58 @@ import {ClaimDatasetComponent} from './claimDataset/claimDataset.component'; import {ClaimSelectedComponent} from './selected/selected.component'; import {ClaimInsertComponent} from './insertClaim/insertClaim.component'; import {ClaimProjectsComponent} from './claimProject/claimProject.component'; +// import { MD_RADIO_DIRECTIVES, MdRadioDispatcher } from '@angular2-material/radio'; +// import { MD_INPUT_DIRECTIVES } from '@angular2-material/input'; + + @Component({ selector: 'linking', + //providers: [MdRadioDispatcher], directives: [ROUTER_DIRECTIVES, ClaimContextComponent, ClaimPublicationComponent, ClaimSelectedComponent, ClaimInsertComponent,ClaimDatasetComponent, ClaimProjectsComponent], template: ` -

Linking...

+

Linking Research Results

- - -
- Publication - Dataset + + +
+
+ + +
+ + + + + +
- +
- +
- +
@@ -128,15 +154,18 @@ export class LinkingComponent { } contextsChange($event) { this.contexts=$event.value; - console.log($event.value); -} -publicationsChange($event) { - this.publications=$event.value; -} -datasetsChange($event) { - this.datasets=$event.value; -} -projectsChange($event) { - this.projects=$event.value; -} + console.log($event.value); + } + publicationsChange($event) { + this.publications=$event.value; + } + datasetsChange($event) { + this.datasets=$event.value; + } + projectsChange($event) { + this.projects=$event.value; + } + typeChanged(type:string) { + this.searchType = type; + } }