From 4b515378a468047b9b536d0081b094e68f130762 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Mon, 22 May 2017 09:00:27 +0000 Subject: [PATCH] Fixing footer and menu issues using 'uk-height-viewport'| use new datacite API| correct stats3 URL git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47308 d315682c-612b-4755-9ff5-7f18f6832af3 --- portal-2/src/app/app.component.ts | 4 ++-- .../claimResultSearchForm.component.html | 13 +++++++------ .../claimResultSearchForm.component.ts | 14 +++++++++----- .../service/searchDatacite.service.ts | 7 ++++--- .../selected/selectedResults.component.ts | 18 +++++++++++++----- .../app/utils/properties/openaireProperties.ts | 6 ++++-- portal-2/src/assets/custom.css | 9 +++++---- portal-2/src/index.html | 2 +- 8 files changed, 45 insertions(+), 28 deletions(-) diff --git a/portal-2/src/app/app.component.ts b/portal-2/src/app/app.component.ts index e1381583..a6f495ea 100644 --- a/portal-2/src/app/app.component.ts +++ b/portal-2/src/app/app.component.ts @@ -29,7 +29,7 @@ export class XLargeDirective { -
+
@@ -56,7 +56,7 @@ export class XLargeDirective { Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible. By using the OpenAIRE portal you accept our use of cookies. Read more - + ` diff --git a/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.html b/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.html index e27c7560..816b62e4 100644 --- a/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.html +++ b/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.html @@ -129,15 +129,16 @@
    -
  • +
  • - {{item.title}} - {{item.title}} - + {{item.attributes.title}} + {{item.attributes.title}} +
    - - + +
diff --git a/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.ts b/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.ts index bf317b8d..70b17c89 100644 --- a/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.ts +++ b/portal-2/src/app/claims/claim-utils/claimResultSearchForm.component.ts @@ -491,9 +491,9 @@ openaireDataPageChange($event) { private getDataciteResults (term: string, size : number, page : number) { this._searchDataciteService.searchDataciteResults(term, size, page).subscribe( data => { - this.dataciteResults = data.docs; + this.dataciteResults = data.data; this.datacitePage=page; - this.dataciteResultsNum = data.numFound; + this.dataciteResultsNum = data.meta.total; this.dataciteStatus = this.errorCodes.DONE; @@ -524,10 +524,12 @@ openaireDataPageChange($event) { } if(itemSource == 'datacite'){ - if(item.creator){ + + result.publisher = item.attributes['container-title']; + if(item.attributes.author){ result.authors =[] - for(var i=0; i< item.creator.length; i++){ - result.authors.push(item.creator[i]); + for(var i=0; i< item.attributes.author.length; i++){ + result.authors.push((item.attributes.author[i].family)?item.attributes.author[i].family+', '+item.attributes.author[i].given:item.attributes.author[i].literal); } } @@ -562,6 +564,8 @@ openaireDataPageChange($event) { for(var i=0; i< item.contributors.length; i++){ result.authors.push(item.contributors[i]); } + }else{ + result.authors.push(this.authorGivenName + ', '+ this.authorFamilyName); } // result = {id:itemId, type :itemType, source : itemSource, title: itemTitle,url: itemUrl, result: item, accessRights: 'OPEN', embargoEndDate: this.nextDate, date: date}; } diff --git a/portal-2/src/app/claims/claim-utils/service/searchDatacite.service.ts b/portal-2/src/app/claims/claim-utils/service/searchDatacite.service.ts index 37a1a635..03d76067 100644 --- a/portal-2/src/app/claims/claim-utils/service/searchDatacite.service.ts +++ b/portal-2/src/app/claims/claim-utils/service/searchDatacite.service.ts @@ -12,14 +12,15 @@ export class SearchDataciteService { searchDataciteResults (term: string, size : number, page : number):any { console.info("In search datacite results "+term); - let url = OpenaireProperties.getSearchDataciteAPIURL()+'?q='+term+'&fl=doi,title,creator,publisher&wt=json&rows='+size+'&start='+(size*(page-1)); + let url = OpenaireProperties.getSearchDataciteAPIURL()+'?query='+term+'&rows='+size+'&start='+(size*(page-1)); let key = url; if (this._cache.has(key)) { return Observable.of(this._cache.get(key)); } return this.http.get( url) - .map(request => request.json().response) - .do(items => console.log("Datacite Results: total results = "+items['numFound']+" keyword = "+term)) + .map(request => request.json()) + .do(items => console.info(items)) + .do(items => console.log("Datacite Results: total results = "+items.meta.total+" keyword = "+term)) .do(res => { this._cache.set(key, res); }); diff --git a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts index 7b61d6f6..15b4cfa2 100644 --- a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts +++ b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts @@ -37,19 +37,27 @@ import {Dates} from '../../../utils/string-utils.class'; {{pub.title}}
+ + + + + + - - + - - + + - +
diff --git a/portal-2/src/app/utils/properties/openaireProperties.ts b/portal-2/src/app/utils/properties/openaireProperties.ts index dd46bc81..c260bcde 100644 --- a/portal-2/src/app/utils/properties/openaireProperties.ts +++ b/portal-2/src/app/utils/properties/openaireProperties.ts @@ -29,7 +29,7 @@ export class OpenaireProperties { // Services - APIs private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/"; - private static framesAPIURL = "http://vatopedi.di.uoa.gr/stats2/"; + private static framesAPIURL = "https://beta.openaire.eu/stats3/"; private static loginAPIURL = "http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates"; @@ -57,7 +57,9 @@ export class OpenaireProperties { private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv private static searchCrossrefAPIURL = "http://api.crossref.org/works"; - private static searchDataciteAPIURL = "https://search.datacite.org/api"; + // private static searchDataciteAPIURL = "https://search.datacite.org/api"; + private static searchDataciteAPIURL = "https://api.datacite.org/works"; + private static searchOrcidURL = "https://pub.orcid.org/"; // Identifiers diff --git a/portal-2/src/assets/custom.css b/portal-2/src/assets/custom.css index c889bb27..63db0b18 100644 --- a/portal-2/src/assets/custom.css +++ b/portal-2/src/assets/custom.css @@ -17,11 +17,11 @@ .custom-discover-toolbar{ border-top-color:#f25f30 !important; } -/*.custom-footer{ +.custom-footer{ position:relative; bottom:0; left:0; -}*/ +} .custom-external { background: rgba(0, 0, 0, 0) url("/assets/icon_external.png") no-repeat scroll left center; padding: 0 0 0 16px; @@ -104,9 +104,10 @@ .custom-icon { line-height: unset; } -.custom-tab-content-large{ - min-height: 600px; +/*.custom-tab-content-large{ + min-height: 800px; } + */ .custom-tab-content { min-height: 250px; } diff --git a/portal-2/src/index.html b/portal-2/src/index.html index 38a3d795..34579b25 100644 --- a/portal-2/src/index.html +++ b/portal-2/src/index.html @@ -61,7 +61,7 @@ -
+