From bd37e593ddc33c6e0ddae9d9f931dc1d0172550a Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Tue, 27 Jun 2017 11:15:45 +0000 Subject: [PATCH] fix css for entityIcons, fix issue with dateofacceptance in landing pages, try new search message when there are no refine git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47769 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../claimEntityFormatter.component.ts | 12 ++++++------ .../projectTitleFormatter.component.ts | 6 +++--- .../publicationTitleFormatter.component.ts | 8 ++++---- .../src/app/landingPages/dataset/dataset.service.ts | 3 ++- .../landingPages/publication/publication.service.ts | 3 ++- .../searchPages/searchUtils/searchForm.component.ts | 2 +- .../searchPages/searchUtils/searchPage.component.ts | 12 +++++++++++- .../src/app/utils/properties/openaireProperties.ts | 6 +++--- portal-2/src/assets/custom.css | 6 ++---- 9 files changed, 34 insertions(+), 24 deletions(-) diff --git a/portal-2/src/app/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts b/portal-2/src/app/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts index c2d2daa8..6dfa7d15 100644 --- a/portal-2/src/app/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts +++ b/portal-2/src/app/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts @@ -6,21 +6,21 @@ import {Component, Input} from '@angular/core'; @Component({ selector: 'claim-entity', template: ` -
+
(Publication)
-
+
(Dataset)
-
+
(Project)
-
- (Context) -
{{entity.title}}
+
+ (Community) + {{entity.title}}
` }) diff --git a/portal-2/src/app/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts b/portal-2/src/app/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts index a6c56ba6..b1b95aa1 100644 --- a/portal-2/src/app/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts +++ b/portal-2/src/app/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts @@ -7,9 +7,9 @@ import {RouterHelper} from '../../../utils/routerHelper.class'; @Component({ selector: 'project-title', template: ` - + + {{project['name']}} ({{project['funderName']}}) + ` }) diff --git a/portal-2/src/app/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts b/portal-2/src/app/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts index 253e359b..321e440d 100644 --- a/portal-2/src/app/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts +++ b/portal-2/src/app/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts @@ -5,10 +5,10 @@ import {Component, Input} from '@angular/core'; @Component({ selector: 'publication-title', template: ` -
-
{{title}}
-
{{title}}
-
+ + {{title}} + {{title}} + ` }) diff --git a/portal-2/src/app/landingPages/dataset/dataset.service.ts b/portal-2/src/app/landingPages/dataset/dataset.service.ts index 0f075b9d..bb475e1f 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.service.ts +++ b/portal-2/src/app/landingPages/dataset/dataset.service.ts @@ -56,7 +56,8 @@ export class DatasetService { this.datasetInfo = new DatasetInfo(); if(data[0] != null) { - this.datasetInfo.date = data[0].dateofacceptance.substring(0,4); + var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer + this.datasetInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; this.datasetInfo.dateofacceptance = data[0].dateofacceptance; this.datasetInfo.publisher = data[0].publisher; if(!Array.isArray(data[0].description)) { diff --git a/portal-2/src/app/landingPages/publication/publication.service.ts b/portal-2/src/app/landingPages/publication/publication.service.ts index 14a17a55..2b9043fd 100644 --- a/portal-2/src/app/landingPages/publication/publication.service.ts +++ b/portal-2/src/app/landingPages/publication/publication.service.ts @@ -55,7 +55,8 @@ export class PublicationService { this.publicationInfo = new PublicationInfo(); if(data[0] != null) { - this.publicationInfo.date = data[0].dateofacceptance.substring(0,4); + var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer + this.publicationInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; this.publicationInfo.dateofacceptance = data[0].dateofacceptance; this.publicationInfo.publisher = data[0].publisher; if(!Array.isArray(data[0].description)) { diff --git a/portal-2/src/app/searchPages/searchUtils/searchForm.component.ts b/portal-2/src/app/searchPages/searchUtils/searchForm.component.ts index 4d73cae9..88dbbdce 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchForm.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchForm.component.ts @@ -6,7 +6,7 @@ import {Observable} from 'rxjs/Observable'; template: `
- +
` }) diff --git a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts index 0682fb9b..953e1104 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts @@ -11,6 +11,7 @@ import { Meta} from '../../../angular2-meta'; import{SearchFilterComponent} from './searchFilter.component'; import {SearchFilterModalComponent} from './searchFilterModal.component'; import {OpenaireProperties} from '../../utils/properties/openaireProperties'; +import { ErrorCodes} from '../../utils/properties/openaireProperties'; @Component({ @@ -35,6 +36,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; + @@ -42,6 +44,9 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties'; Clear All
+ More search options
@@ -140,7 +145,7 @@ export class SearchPageComponent { public urlParam: string; public parameterNames:string[] =[]; public parameterValues:string[] =[]; - + public showUnknownFilters:boolean = false; // when a filter exists in query but has no results, so no filters returned from the query //@ViewChild (SearchFilterModalComponent) searchFilterModal : SearchFilterModalComponent ; public currentFilter: Filter; @@ -448,6 +453,7 @@ export class SearchPageComponent { } private isFiltered(){ var filtered=false; + this.showUnknownFilters = false; for (let filter of this.filters){ if(filter.countSelectedValues > 0){ filtered = true; @@ -457,6 +463,10 @@ export class SearchPageComponent { if(this.searchUtils.keyword.length > 0 ){ filtered = true; } + var errorCodes:ErrorCodes = new ErrorCodes(); + if(this.queryParameters.keys() && this.searchUtils.totalResults == 0 && this.searchUtils.status !=errorCodes.LOADING ){ + this.showUnknownFilters = true; + } return filtered; } private clearKeywords(){ diff --git a/portal-2/src/app/utils/properties/openaireProperties.ts b/portal-2/src/app/utils/properties/openaireProperties.ts index e5b98da0..6f2d428b 100644 --- a/portal-2/src/app/utils/properties/openaireProperties.ts +++ b/portal-2/src/app/utils/properties/openaireProperties.ts @@ -44,16 +44,16 @@ export class OpenaireProperties { private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/"; private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/"; - private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/v2/api/"; + private static searchAPIURLLAst = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; // private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; private static searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources"; - private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/v2/api/resources"; + private static searchResourcesAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; // private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; private static csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv - private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv + private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv // private static csvAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv diff --git a/portal-2/src/assets/custom.css b/portal-2/src/assets/custom.css index 97528fc9..8ca880ab 100644 --- a/portal-2/src/assets/custom.css +++ b/portal-2/src/assets/custom.css @@ -182,9 +182,7 @@ max-height:265px; vertical-align: middle; } .entityIcon{ - background-repeat: :no-repeat; - content: ''; - height: 36px; - width: 42px; + height: 15px; + width: 20px; }