From 8fbb704aa3c431c1d1fdd80eec37c7f04803bd1e Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Wed, 26 Sep 2018 13:56:21 +0000 Subject: [PATCH] Claims: change the remove button to bin icon Browse: add search and sort in view more Download results link: make it a link git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53278 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../displayClaims.component.html | 26 ++++++++++----- .../claimEntityFormatter.component.ts | 8 ++--- .../publicationTitleFormatter.component.ts | 18 +++++++---- .../browseStatistic.component.html | 13 +++++++- .../searchUtils/browseStatistic.component.ts | 32 +++++++++++++++++++ .../searchUtils/searchDownload.component.ts | 4 +-- 6 files changed, 80 insertions(+), 21 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 8a5c1599..927a9056 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -5,6 +5,11 @@
+
+ + Newly added links for OpenAIRE research results will be available on the next run of our algorithms. +
Links to external results (Crossref, Datacite, Orcid) are automatically added in OpenAIRE information space.
+
@@ -66,11 +71,7 @@
User session is not valid. Please login again.
-
- - Newly added links for OpenAIRE research results will be available on the next run of our algorithms. -
Links to external results (Crossref, Datacite, Orcid) are automatically added in OpenAIRE information space.
-
+
@@ -82,7 +83,9 @@
- + + +

@@ -95,7 +98,14 @@ - + + @@ -109,7 +119,7 @@ - + diff --git a/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts b/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts index d97ee83b..f5ebe58a 100644 --- a/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts +++ b/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts @@ -9,23 +9,23 @@ import{EnvProperties} from '../../../utils/properties/env-properties'; template: `
- +
- +
- +
- +
diff --git a/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts b/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts index 321e440d..8991097b 100644 --- a/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts +++ b/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts @@ -1,4 +1,5 @@ import {Component, Input} from '@angular/core'; +import {RouterHelper} from '../../../utils/routerHelper.class'; //Usage Example " " @@ -6,16 +7,21 @@ import {Component, Input} from '@angular/core'; selector: 'publication-title', template: ` - {{title}} - {{title}} - + + {{title}} + + ` }) export class PublicationTitleFormatter { - @Input() title: string[]; - @Input() url: string[]; - + @Input() title: string; + @Input() url: string; + @Input() id: string; + @Input() param: string; + @Input() path: string; + public routerHelper:RouterHelper = new RouterHelper(); constructor () {} ngOnInit() { diff --git a/searchPages/searchUtils/browseStatistic.component.html b/searchPages/searchUtils/browseStatistic.component.html index f97f1177..ba8b952c 100644 --- a/searchPages/searchUtils/browseStatistic.component.html +++ b/searchPages/searchUtils/browseStatistic.component.html @@ -42,11 +42,22 @@

{{filter.title}}

+
+ + +
+
diff --git a/searchPages/searchUtils/browseStatistic.component.ts b/searchPages/searchUtils/browseStatistic.component.ts index 1505e67b..6d9f0b35 100644 --- a/searchPages/searchUtils/browseStatistic.component.ts +++ b/searchPages/searchUtils/browseStatistic.component.ts @@ -24,6 +24,8 @@ export class BrowseStatisticComponent { private _maxCharacters = 30; public viewAll = false; public routerHelper:RouterHelper = new RouterHelper(); + keyword = ""; + sortBy = "num"; constructor () { } @@ -40,5 +42,35 @@ export class BrowseStatisticComponent { private _formatName(value){ return value.name+" ";//(((value.name+" ("+value.number+")").length >this._maxCharacters)?(value.name.substring(0,(this._maxCharacters - (" ("+value.number+")").length - ('...').length))+"..."):value.name) } + filterKeywords(value){ + if(this.keyword.length > 0){ + if(value.toLowerCase().indexOf(this.keyword.toLowerCase()) ==-1){ + return false; + } + } + return true; + } + getValues(filter, sortBy:string = "num"):any{ + + if(sortBy == "name"){ + var array = filter.values.slice(); + array.sort((n1,n2)=> { + if (n1.name > n2.name) { + return 1; + } + + if (n1.name < n2.name) { + return -1; + } + + return 0; + }); + return array; + }else{ + return filter.values; + } + + + } } diff --git a/searchPages/searchUtils/searchDownload.component.ts b/searchPages/searchUtils/searchDownload.component.ts index 5fda861a..e73e093e 100644 --- a/searchPages/searchUtils/searchDownload.component.ts +++ b/searchPages/searchUtils/searchDownload.component.ts @@ -10,12 +10,12 @@ import{EnvProperties} from '../../utils/properties/env-properties'; @Component({ selector: 'search-download', template: ` - + (CSV) - +
+ + + + + + Research Result
{{claim.userMail}}