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
This commit is contained in:
argiro.kokogiannaki 2017-05-22 09:00:27 +00:00
parent 668dd39eb6
commit 4b515378a4
8 changed files with 45 additions and 28 deletions

View File

@ -29,7 +29,7 @@ export class XLargeDirective {
<div id="tm-main" class=" uk-section uk-margin-large-top tm-middle custom-main-content" uk-height-viewport="mode: expand" >
<div id="tm-main" class=" uk-section uk-margin-large-top tm-middle custom-main-content" >
<div class="uk-container ">
<div uk-grid uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">

View File

@ -129,15 +129,16 @@
</div>
<div >
<ul *ngIf="dataciteResults.length > 0 " class="uk-list uk-list-divider">
<li *ngFor=" let item of dataciteResults " [class]="(isSelected(item.doi))?'uk-block-muted':''" >
<li *ngFor=" let item of dataciteResults " [class]="(isSelected(item.attributes.doi))?'uk-block-muted':''" >
<div >
<a *ngIf="item.doi" target="_blank" href="{{'http://dx.doi.org/'+item.doi}}" > <span class="custom-external"></span> {{item.title}}</a>
<span *ngIf="!item.doi" >{{item.title}}</span>
<a class="uk-button-default uk-align-right" *ngIf="!isSelected(item.doi)" (click)="add(item, item.doi,'datacite','dataset', 'http://dx.doi.org/'+item.doi, item.title, null,'OPEN')" class="uk-icon-button" uk-icon="icon: plus"></a>
<a *ngIf="item.attributes.doi" target="_blank" href="{{'http://dx.doi.org/'+item.attributes.doi}}" > <span class="custom-external"></span> {{item.attributes.title}}</a>
<span *ngIf="!item.attributes.doi" >{{item.attributes.title}}</span>
<a class="uk-button-default uk-align-right" *ngIf="!isSelected(item.attributes.doi)" (click)="add(item, item.attributes.doi,'datacite','dataset', 'http://dx.doi.org/'+item.attributes.doi, item.attributes.title, item.attributes.published,'OPEN')" class="uk-icon-button" uk-icon="icon: plus"></a>
</div>
<span *ngIf="item.publisher" class="uk-article-meta">Publisher: {{item.publisher}}</span>
<div *ngIf="item.creator && item.creator.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of item.creator.slice(0,10) let i = index">{{author}}{{(i < (item.creator.slice(0,10).length-1))?"; ":""}}{{(i == item.creator.slice(0,10).length-1 && item.creator.length > 10)?"...":""}}</span></div>
<span *ngIf="item.attributes['container-title']" class="uk-article-meta">Publisher: {{item.attributes['container-title']}}</span><span *ngIf="(item.attributes.published)" class="uk-article-meta">({{item.attributes.published}})</span>
<div *ngIf="item.attributes.author && item.attributes.author.length > 0" class="uk-article-meta">Authors:
<span *ngFor="let author of item.attributes.author.slice(0,10) let i = index">{{(author.family)?author.family+', '+author.given:author.literal}}{{(i < (item.attributes.author.slice(0,10).length-1))?"; ":""}}{{(i == item.attributes.author.slice(0,10).length-1 && item.attributes.author.length > 10)?"...":""}}</span></div>
</li>
</ul>

View File

@ -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};
}

View File

@ -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 => <any> request.json().response)
.do(items => console.log("Datacite Results: total results = "+items['numFound']+" keyword = "+term))
.map(request => <any> 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);
});

View File

@ -37,19 +37,27 @@ import {Dates} from '../../../utils/string-utils.class';
<span *ngIf="!pub.url" >{{pub.title}}</span>
<span *ngIf="!showAccessRights" (click)="removePublication(pub)" aria-hidden="true" class="uk-icon-button"><span uk-icon="icon: close"></span></span>
</div>
<span *ngIf="pub.publisher" class="uk-article-meta">Publisher: {{pub.publisher}}</span>
<!--Orcid --><span *ngIf="pub.result['journal-title'] && pub.result['journal-title'].value " class="uk-article-meta">Journal: {{pub.result['journal-title'].value}}</span>
<span *ngIf="pub.date" class="uk-article-meta" >({{pub.date.substring(0,4)}})</span>
<div *ngIf="pub.authors && pub.authors.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.authors.slice(0,10) let i = index">{{author}}{{(i < (pub.authors.slice(0,10).length-1))?"; ":""}}{{(i == pub.authors.slice(0,10).length-1 && pub.authors.length > 10)?"...":""}}</span></div>
<!-- Crossref -->
<span *ngIf="pub.result.publisher" class="uk-article-meta">Publisher: {{pub.result.publisher}}</span><span *ngIf="pub.date" class="uk-article-meta" >({{pub.date.substring(0,4)}})</span>
<div *ngIf="pub.result.author && pub.result.author.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.author.slice(0,10) let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.author.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.author.slice(0,10).length-1 && pub.result.author.length > 10)?"...":""}}</span></div>
<!--span *ngIf="pub.result.publisher" class="uk-article-meta">Publisher: {{pub.result.publisher}}</span><span *ngIf="pub.date" class="uk-article-meta" >({{pub.date.substring(0,4)}})</span>
<div *ngIf="pub.result.author && pub.result.author.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.author.slice(0,10) let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.author.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.author.slice(0,10).length-1 && pub.result.author.length > 10)?"...":""}}</span></div-->
<div *ngIf="pub.result.editor && pub.result.editor.length > 0" class="uk-article-meta">Editors: <span *ngFor="let author of pub.result.editor.slice(0,10) let i = index">{{author.family}} {{author.given}}{{(i < (pub.result.editor.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.editor.slice(0,10).length-1 && pub.result.editor.length > 10)?"...":""}}</span></div>
<!-- Openaire -->
<div *ngIf="pub.result.authors && pub.result.authors.length >0 " class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.authors.slice(0,10) let i = index">{{author.name}}{{(i < (pub.result.authors.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.authors.slice(0,10).length-1 && pub.result.authors.length > 10)?"...":""}}</span></div>
<!-- Orcid -->
<span *ngIf="pub.result['journal-title'] && pub.result['journal-title'].value " class="uk-article-meta">Journal: {{pub.result['journal-title'].value}}</span>
<div *ngIf="pub.result.contributors && pub.result.contributors.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.contributors.slice(0,10) let i = index">{{author}}{{(i < (pub.result.contributors.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.contributors.slice(0,10).length-1 && pub.result.contributors.length > 10)?"...":""}}</span></div>
<!--span *ngIf="pub.result['journal-title'] && pub.result['journal-title'].value " class="uk-article-meta">Journal: {{pub.result['journal-title'].value}}</span>
<div *ngIf="pub.result.contributors && pub.result.contributors.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.contributors.slice(0,10) let i = index">{{author}}{{(i < (pub.result.contributors.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.contributors.slice(0,10).length-1 && pub.result.contributors.length > 10)?"...":""}}</span></div-->
<!-- Datacite -->
<div *ngIf="pub.result.creator && pub.result.creator.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.creator.slice(0,10) let i = index">{{author}}{{(i < (pub.result.creator.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.creator.slice(0,10).length-1 && pub.result.creator.length > 10)?"...":""}}</span></div>
<!--span *ngIf="pub.result.attributes['container-title']" class="uk-article-meta">Publisher: {{pub.result.attributes['container-title']}}</span><span *ngIf="pub.date" class="uk-article-meta" >({{pub.date.substring(0,4)}})</span>
<div *ngIf="pub.result.attributes.author && pub.result.attributes.author.length > 0" class="uk-article-meta">Authors: <span *ngFor="let author of pub.result.attributes.author.slice(0,10) let i = index">{{(author.family)?author.family+', '+author.given:author.literal}}{{(i < (pub.result.attributes.author.slice(0,10).length-1))?"; ":""}}{{(i == pub.result.attributes.author.slice(0,10).length-1 && pub.result.attributes.author.length > 10)?"...":""}}</span></div-->
</div>
<div *ngIf="showAccessRights && pub.source != 'openaire' " class = "uk-width-1-3 uk-grid">
<div class="uk-width-1-3 uk-padding-remove-left">

View File

@ -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

View File

@ -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;
}

View File

@ -61,7 +61,7 @@
</head>
<body class="" cz-shortcut-listen="true" style="">
<div class="uk-offcanvas-content">
<div class="uk-offcanvas-content uk-height-viewport">
<script async src="/main.bundle.js"></script>