add margin in loading/ error messages in landing pages | add more width in browse results to avoid crop small values | add forbiden message in claims | change local search to beta |comment clear all from linking

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48410 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-07-07 10:08:02 +00:00
parent cc740847f3
commit 70d980bce3
16 changed files with 88 additions and 86 deletions

View File

@ -33,6 +33,7 @@ import {ErrorCodes} from '../../login/utils/guardHelper.class';
</table>
<div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
<div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
<div>Or <a uk-toggle="target: #browse; animation: uk-animation-fade"> Browse </a> through categories </div>
<div id="browse" class="uk-card uk-card-default uk-card-body uk-margin-small" hidden>
<a uk-toggle="target: #browse; animation: uk-animation-fade" class="uk-float-right"><span class="uk-icon">
@ -126,6 +127,8 @@ public conceptsCategoryLoading = [];
public warningMessage = "";
public infoMessage = "";
public loading:boolean = false;
public error:boolean = false;
ngOnInit() {
this.getCommunities();
}
@ -186,6 +189,7 @@ getCommunities () {
err => {
console.log(err);
this.loading = false;
this.error = true;
}
);
}

View File

@ -34,6 +34,9 @@
<div *ngIf="showErrorMessage " class = "uk-alert uk-alert-danger " >
An Error occured.
</div>
<div *ngIf="showForbiddenMessage " class = "uk-alert uk-alert-danger " >
You are not allowed to access this page.
</div>
<div *ngIf="userValidMessage.length > 0 " class = "uk-alert uk-alert-danger " >
User session is not valid. Please login again.
</div>

View File

@ -85,6 +85,7 @@ export class DisplayClaimsComponent {
selected=[];
deleteMessage:string = "";
showErrorMessage:boolean = false;
showForbiddenMessage:boolean = false;
userValidMessage:string = "";
//params for pagingFormatter to use when navigate to page
@ -102,6 +103,7 @@ export class DisplayClaimsComponent {
this.selected=[];
var types = '';
this.showErrorMessage = false;
this.showForbiddenMessage = false;
for (var type of this.entityTypes){
types+=(types.length>0?'&':'')+"types="+type;
}
@ -112,8 +114,7 @@ export class DisplayClaimsComponent {
this.resultsNum= data.total;
},
err => {
console.log(err);
this.showErrorMessage = true;
this.handleErrors(err);
}
);
}else if(this.fetchBy =="User"){
@ -123,8 +124,7 @@ export class DisplayClaimsComponent {
this.resultsNum= data.total;
},
err => {
console.log(err);
this.showErrorMessage = true;
this.handleErrors(err);
}
);
}else if(this.fetchBy =="Result"){
@ -134,8 +134,7 @@ export class DisplayClaimsComponent {
this.resultsNum= data.total;
},
err => {
console.log(err);
this.showErrorMessage = true;
this.handleErrors(err);
}
);
}else if(this.fetchBy =="Context"){
@ -146,8 +145,7 @@ export class DisplayClaimsComponent {
this.resultsNum= data.total;//data.length; //TODO get the total results num
},
err => {
console.log(err);
this.showErrorMessage = true;
this.handleErrors(err);
}
);
}else{
@ -158,14 +156,28 @@ export class DisplayClaimsComponent {
this.resultsNum= data.total;//data.length; //TODO get the total results num
},
err => {
console.log(err);
this.showErrorMessage = true;
this.handleErrors(err);
}
);
}
}
}
handleErrors(err){
this.showErrorMessage = true;
try{
var error = err.json()
var code = error.code;
if(code == 403){
this.showErrorMessage = false;
this.showForbiddenMessage = true;
}
}catch (e) {
console.log("Couldn't parse answer as json")
this.showErrorMessage = true;
}
}
goTo(page:number = 1){

View File

@ -20,7 +20,7 @@ import { Meta} from '../../../angular2-meta';
Link {{(type=="project")?'Project':' Research result'}}:
</div>
<div class="uk-clearfix">
<start-over [results]="results" [contexts]="contexts" [projects]="projects" [linkTo]="linkTo" [type]="type" ></start-over>
<!--start-over [results]="results" [contexts]="contexts" [projects]="projects" [linkTo]="linkTo" [type]="type" ></start-over-->
</div>
<!-- inline result -->
<div *ngIf="displayedResult != null && (type =='publication' || type =='dataset' )" class="uk-padding uk-panel uk-background-muted">

View File

@ -38,7 +38,7 @@ declare var UIkit:any;
<li [class]="(show=='result')?'uk-active':''" ><a (click)="show='result';"> Select Research Results <span >({{results.length}})</span></a></li>
<li [class]="(show=='claim')?'uk-active':''" (click)="canProceedToMetadata();"><a [class]="(results.length == 0)?'uk-disabled':''" (click)="show='claim';" > Review metadata</a></li>
</ul>
<start-over [results]="results" [contexts]="contexts" [projects]="projects" ></start-over>
<!--start-over [results]="results" [contexts]="contexts" [projects]="projects" ></start-over-->

View File

@ -1,7 +1,7 @@
<div class="uk-container uk-margin-top datasource">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary uk-margin-large-top" role="alert">Loading...</div>
<div *ngIf="dataProviderInfo != null" uk-grid>

View File

@ -1,8 +1,8 @@
<div class="uk-container uk-margin-top dataset">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary uk-margin-large-top" role="alert">Loading...</div>
<div *ngIf="datasetInfo != null" uk-grid>
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">

View File

@ -31,7 +31,7 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
<div *ngIf="metrics != undefined" class="uk-child-width-1-3@m uk-grid-small uk-grid-match uk-grid" uk-grid="">
<div class="uk-first-column">
<div class="uk-card uk-card-default uk-padding-small">
<div class="uk-clearfix">
<!--div class="uk-clearfix">
<div class="uk-float-left " uk-tooltip="pos:right; delay:5"
title='<div class= "uk-margin uk-padding-small">
<p>Info about the value....</p>
@ -39,14 +39,14 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span>
</div>
</div>
</div-->
<div class="uk-text-center">Page Views</div>
<div class="uk-text-center">{{pageViews}}</div>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-padding-small">
<div class="uk-clearfix">
<!--div class="uk-clearfix">
<div class="uk-float-left " uk-tooltip="pos:right; delay:5"
title='<div class= "uk-margin uk-padding-small">
<p>Info about the value....</p>
@ -54,7 +54,7 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span>
</div>
</div>
</div-->
<div *ngIf="type=='results'" class="uk-text-center">Total views</div>
<div *ngIf="type!='results'" class="uk-text-center"> Total <span [innerHTML]="name"></span> Publication Views</div>
@ -67,7 +67,7 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
</div>
<div>
<div class="uk-card uk-card-default uk-padding-small">
<div class="uk-clearfix">
<!--div class="uk-clearfix">
<div class="uk-float-left " uk-tooltip="pos:right; delay:5"
title='<div class= "uk-margin uk-padding-small">
<p>Info about the value....</p>
@ -75,7 +75,7 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span>
</div>
</div>
</div-->
<div *ngIf="type=='results'" class="uk-text-center">Total Downloads</div>
<div *ngIf="type!='results'" class="uk-text-center">Total <span [innerHTML]="name"></span> Publication Downloads</div>
@ -89,37 +89,6 @@ import {ErrorCodes} from '../utils/properties/openaireProperties';
</div>
<!--table *ngIf="metrics != undefined"
class="uk-table uk-padding uk-background-muted">
<thead>
<tr>
<th *ngIf="type=='results'" class="uk-text-center">Total Views</th>
<th *ngIf="type!='results'" class="uk-text-center">
Total <span [innerHTML]="name"></span> Publication Views
</th>
<th *ngIf="type=='results'" class="uk-text-center">Total Downloads</th>
<th *ngIf="type!='results'" class="uk-text-center">
Total <span [innerHTML]="name"></span> Publication Downloads
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="uk-text-center">
{{metrics.totalViews}}
<span *ngIf="metrics.totalViews > 0 && metrics.totalOpenaireViews > 0">
( {{metrics.totalOpenaireViews}} from OpenAIRE )
</span>
</td>
<td class="uk-text-center">
{{metrics.totalDownloads}}
<span *ngIf="metrics.totalDownloads > 0 && metrics.totalOpenaireDownloads > 0">
( {{metrics.totalOpenaireDownloads}} from OpenAIRE )
</span>
</td>
</tr>
</tbody>
</table-->
<p *ngIf="metrics != undefined && metrics.infos.size > 0" >The information is available from the following content providers: </p>
<table *ngIf="metrics != undefined && metrics.infos.size > 0"
class="uk-table uk-table-striped">

View File

@ -1,7 +1,7 @@
<div class="uk-container uk-margin-top organization">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary uk-margin-large-top" role="alert">Loading...</div>
<div *ngIf="organizationInfo != null" uk-grid>
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">

View File

@ -1,7 +1,7 @@
<div class="uk-container uk-margin-top project">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div id="project" class="uk-container uk-margin-top project">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary uk-margin-large-top" role="alert">Loading...</div>
<div *ngIf="projectInfo != null" uk-grid>
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">

View File

@ -1,8 +1,8 @@
<div class="uk-container uk-margin-top publication">
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-margin-large-top" role="alert">{{warningMessage}}</div>
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger uk-margin-large-top" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-alert uk-alert-primary uk-margin-large-top" role="alert">Loading...</div>
<div *ngIf="publicationInfo != null" uk-grid>
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">

View File

@ -126,7 +126,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
Countries: <span *ngFor="let country of result['countries'].slice(0,10) let i = index">{{country}}{{(i < ( result['countries'].slice(0,10).length-1))?", ":""}}{{(i == result['countries'].slice(0,10).length-1 && result['countries'].length > 10)?"...":""}}</span>
</div>
<div *ngIf="showSubjects && result['subjects'] && result['subjects'].length > 0">
Subjects <span *ngFor="let subject of result['subjects'].slice(0,10) let i = index">{{subject}}{{(i < ( result['subjects'].slice(0,10).length-1))?", ":""}}{{(i == result['subjects'].slice(0,10).length-1 && result['subjects'].length > 10)?"...":""}}</span>
Subjects: <span *ngFor="let subject of result['subjects'].slice(0,10) let i = index">{{subject}}{{(i < ( result['subjects'].slice(0,10).length-1))?", ":""}}{{(i == result['subjects'].slice(0,10).length-1 && result['subjects'].length > 10)?"...":""}}</span>
</div>

View File

@ -21,7 +21,7 @@ export class PublicationInfo {
fundedByProjects: { "id": string, "acronym": string, "title": string,
"funderShortname": string, "funderName": string,
"funding": string, "code": string, "provenanceAction": string,
inline: boolean}[];
"inline": boolean}[];
bioentities: Map<string, Map<string, string>>; //<site name, <>>
software: { "name": string, "url": string}[]; //<site name, <>>
//relatedPublications: { "name": string, "url": string, "date": string, "trust": number}[];

View File

@ -44,18 +44,18 @@ 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 = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";
private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/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 = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources";
private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/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 = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/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
private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
private static searchCrossrefAPIURL = "https://api.crossref.org/works";
// private static searchDataciteAPIURL = "https://search.datacite.org/api";

View File

@ -124,11 +124,15 @@
height: 500px;
}
.filterItem span {
display: inline-flex;
}
.filterItem .filterName {
max-width: 71%;
}
.browseFilters .filterItem .filterName {
max-width: 68%;
@ -141,16 +145,23 @@ width: 20%;
white-space: nowrap;
}
.browseFilters .filterItem span div {
min-width: 45px;
}
.filterItem span div {
overflow: hidden;
text-overflow: ellipsis;
min-width: 65px;
}
.browseFilters{
overflow-y: auto;
overflow-x: hidden;
max-height:265px;
}
.custom-offcanvas-close {
position: relative;
right: 0;
@ -226,3 +237,20 @@ max-height:265px;
color: #f0506e;
}
/*
li span {
display: inline-flex;
}
.item span {
width: 100px;
margin-left: 1em;
white-space: nowrap;
}
.item span div {
overflow: hidden;
text-overflow: ellipsis;
}*/

View File

@ -30,20 +30,6 @@
console.log("********UIKIT Error ***********");
$.getScript("assets/dl119_files/uikit.js");
$.getScript("assets/dl119_files/uikit-icons-max.js");
// location.reload();
// var script= document.createElement('script');
// script.type= 'text/javascript';
// script.src= 'assets/dl119_files/uikit.js';
// head.appendChild(script);
// console.log("LOOOOOOOOOOOOOOOOOOOAD");
// jQuery.loadScript = function (url, callback) {
// jQuery.ajax({
// url: url,
// dataType: 'script',
// });}
// $.loadScript("assets/dl119_files/uikit.js", function(){
// console.log("LOOOOOOOOOOOOOOOOOOOAD");});
}
}