[Library|Trunk]

Linking:
	rename entity type to Result type

Deposit:
	First page:
	remove border
	remove small text in first section paragraphs
	remove padding from search form
	Search:
	go to first page when keyword changes
	keep filters when keyword changes


Impact Factors:
	update text (Exceptional,Substantial,Average)


Search bar:
	pass parameters for advanced search
	init keyword from params
	if page not among search pages ignore keyword
	when change to other entity clear parameters


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58606 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-05-05 16:21:31 +00:00
parent 81240f9325
commit c4addc2f13
9 changed files with 53 additions and 22 deletions

View File

@ -107,7 +107,7 @@
<!-- Type filter-->
<ul class="uk-list">
<li class="uk-open uk-margin-small-bottom">
<h5 class="uk-margin-bottom-remove ">Entity Type (4)
<h5 class="uk-margin-bottom-remove ">Result Type (4)
</h5>
<div aria-expanded="false">
<div class="searchFilterBoxValues ">

View File

@ -3,7 +3,7 @@ import {HttpParams} from '@angular/common/http';
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
//domain = "beta.fam.openaire.eu"; //for testing
domain = "beta.covid-19.openaire.eu"; //for testing
if (domain.indexOf('openaire.eu') === -1) {
return null;
}

View File

@ -31,7 +31,7 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
<!-- <span class="uk-margin-small-right" uk-icon="search"></span>-->
<span class="uk-width-expand">
<div class="uk-margin-small-bottom uk-h6 uk-text-normal"><span class="uk-text-bold"> Find </span><span class="uk-text-normal">the appropriate</span> <span class="uk-text-bold"> repository </span> or <span class="uk-text-bold"> journal </span></div>
<div class="uk-text-small">
<div class="">
Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan.
Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data.
<br>
@ -48,7 +48,7 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
<!-- <span class="uk-margin-small-right" uk-icon="upload"></span>-->
<span class="uk-width-expand">
<div class="uk-margin-small-bottom uk-h6">Deposit</div>
<div class="uk-text-small">
<div class="">
Find the repository to deposit your research or use the Zenodo<span *ngIf="communityId && communityId != 'openaire'"> communities suggested by the community curators</span><span *ngIf="!communityId || communityId == 'openaire'"> repository</span>.
</div>
</span>
@ -60,7 +60,7 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
<!-- <span class="uk-margin-small-right" uk-icon="push"></span>-->
<span class="uk-width-expand">
<div class="uk-margin-small-bottom uk-h6">Publish</div>
<div class="uk-text-small">
<div class="">
Find the Open Access journals that suit your
<span *ngIf="communityId && communityId != 'openaire'">community </span><span *ngIf="!communityId || communityId == 'openaire'">needs </span>
among those registered in the Directory of Open Access Journals (DOAJ).
@ -74,8 +74,8 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
<!--<p class="uk-margin-auto-top uk-margin-remove-bottom uk-h5">
Start by <span class="uk-text-bold">searching</span> repositories and journals
</p>-->
<div class="uk-padding uk-padding-remove-vertical">
<form class=" uk-grid uk-margin">
<div class="">
<form class=" uk-flex uk-margin">
<!-- <span uk-search-icon class="uk-icon"></span>-->
<!-- <button routerLinkActive="uk-link"-->
<!-- routerLink="{{depositRoute}}" [queryParams]="{keyword: keyword}" class="uk-search-icon uk-icon" uk-search-icon>-->
@ -84,7 +84,7 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
type="search" [(ngModel)]="keyword" name="keyword"
placeholder="{{searchPlaceHolder}}">
<div class="uk-padding-remove-left">
<button routerLinkActive="uk-link" routerLink="{{depositRoute}}" [queryParams]="{keyword: keyword}" [class]="'uk-button uk-text-bold '+ (!!(communityId)?'':' portal-button')"> Search
<button routerLinkActive="uk-link" routerLink="{{depositRoute}}" [queryParams]="{'f0':'q','fv0': keyword}" [class]="'uk-button uk-text-bold '+ (!!(communityId)?'':' portal-button')"> Search
</button>
<div class="uk-padding-small">
<a [queryParams]="properties.environment!='development'?{}:routerHelper.createQueryParam('communityId',communityId)" routerLinkActive="router-link-active" [routerLink]="depositRoute"
@ -138,7 +138,7 @@ import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
<div class="communityBackground">
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-section tm-middle uk-container uk-container-large uk-margin-small-top uk-padding-remove-top uk-padding-remove-bottom ">
<div class="uk-container uk-container-large uk-margin-bottom exploreBorder communityBorder uk-margin-medium-top">
<div class="uk-container uk-container-large uk-margin-bottom uk-margin-medium-top">
<div class="uk-grid uk-padding">
<div class="uk-width-1-2 uk-text-center">
<div class="uk-margin-top">

View File

@ -118,6 +118,7 @@ export class SearchDataprovidersToDepositComponent {
}, {name: "Browse repositories", route: null});
});
this.sub = this.route.queryParams.subscribe(params => {
this.parameters = Object.assign({}, params);
this.keyword = params["fv0"]?params["fv0"]:'';
});
// this.searchPage.refineFields = this.refineFields;
@ -168,6 +169,12 @@ export class SearchDataprovidersToDepositComponent {
delete this.parameters['f0'];
}
if(this.parameters["page"]){
//GO to first page
delete this.parameters['page'];
}
this.router.navigate([this.properties.depositSearchPage], {queryParams: this.parameters} );
}
/*public getResults(keyword:string,refine:boolean, page: number, size: number){

View File

@ -1,5 +1,5 @@
<errorMessages *ngIf="status != errorCodes.NONE" [status]="[status]" [type]="'results'"></errorMessages>
<div *ngIf="status == errorCodes.NONE" class="uk-text-center uk-align-center uk-width-3-5">
<div *ngIf="status == errorCodes.NONE" class="uk-text-center uk-margin-large-top uk-width-3-5">
<p class="uk-text-large uk-text-muted uk-margin">There are no repositories for your preferences</p>
<p class="uk-text-large uk-text-muted">We suggest to deposit your research in</p>
@ -12,7 +12,7 @@
<span><span>Related zenodo communities</span><span uk-icon="arrow-right"></span></span>
</a>
<a *ngIf="!zenodoInformation.shareInZenodoUrl" target="_blank" href="{{zenodoInformation.url}}" type="submit"
class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left">
class="uk-button portal-button uk-padding uk-padding-remove-vertical zenodoButton uk-margin-small-left">
<span><span>Deposit in Zenodo</span><span uk-icon="arrow-right"></span></span>
</a>
</div>

View File

@ -39,14 +39,30 @@ export class SearchResultComponent implements OnInit, OnChanges {
this.http.get(url).subscribe((data_received) => {
for (let i = 0; i < this.previewResults.length; i++) {
this.previewResults[i].pop_inf = new Array<string>();
// console.log(data[1][i].DOI,'inf: ',data_received[i].pop_class,'and pop: ',data_received[i].inf_class);
// researchResults[1].pop_inf[i].push(data[i].inf_class,data[i].pop_class);
console.log(this.previewResults[i].DOI)
if (this.previewResults[i].DOI != '' && this.previewResults[i].DOI != null) {
this.previewResults[i].pop_inf.push(data_received[i].pop_class, data_received[i].inf_class);
if(this.previewResults[i].pop_inf[0]=="A"){
// this.previewResults[i].pop_inf.push("High");
this.previewResults[i].pop_inf.push("Exceptional");
}else if(this.previewResults[i].pop_inf[0]=="B"){
// this.previewResults[i].pop_inf.push("Average");
this.previewResults[i].pop_inf.push("Substantial");
}else{
// this.previewResults[i].pop_inf.push("low");
this.previewResults[i].pop_inf.push("Average");
}
if(this.previewResults[i].pop_inf[1]=="A"){
// this.previewResults[i].pop_inf.push("Strong");
this.previewResults[i].pop_inf.push("Exceptional");
}else if(this.previewResults[i].pop_inf[1]=="B"){
// this.previewResults[i].pop_inf.push("Average");
this.previewResults[i].pop_inf.push("Substantial");
}else{
// this.previewResults[i].pop_inf.push("Weak");
this.previewResults[i].pop_inf.push("Average");
}
}
}
console.log(this.previewResults)
}, error1 => {
console.error("Failed to get Impact factors for elixir-gr")

View File

@ -30,5 +30,5 @@
class="uk-icon-button uk-icon portal-button uk-padding-remove-left uk-margin-small-left uk-margin-small-top"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="search"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg>
</button>
<a *ngIf="advancedSearchLink" class="portal-link uk-margin-top uk-padding-remove-left uk-margin-small-left"
routerLinkActive="router-link-active" [routerLink]="advancedSearchLink"> Advanced search</a>
routerLinkActive="router-link-active" [routerLink]="advancedSearchLink" [queryParams]="parameters"> Advanced search</a>
</form>

View File

@ -41,6 +41,9 @@ export class SearchBarComponent {
this.entityType = "all";
this.route.queryParams.subscribe(params => {
this.parameters = Object.assign({}, params);
if(params["fv0"] && params["f0"] && params["f0"] == "q"){
this.keyword =params["fv0"];
}
if(this.onlyresults) {
if (params["type"] && params["type"].length > 0) {
let types = params["type"].split(",");
@ -69,8 +72,12 @@ export class SearchBarComponent {
this.entityType = "dataprovider";
}else if(currentRoute== this.properties.searchLinkToOrganizations){
this.entityType = "organization";
}else{
}else if(currentRoute== this.properties.searchLinkToResults){
this.entityType = "result";
}else {
// not one of the search bar search pages
this.entityType = "result";
this.keyword = "";
}
}
if(this.getCurrentRoute() == this.properties.searchLinkToAdvancedResults){
@ -102,6 +109,7 @@ export class SearchBarComponent {
return this.router.url.split('?')[0];
}
entityChanged($event){
this.entityType = $event.entity;
this.searchRoute = $event.simpleUrl;
if(!this.onlyresults && this.entityType == "result") {
@ -110,7 +118,7 @@ export class SearchBarComponent {
this.showAdvancedLink();
}
keywordChanged(){
if(!this.onlyresults) {
if(this.getCurrentRoute()!=this.searchRoute) {
this.parameters = {};
}
if ( this.keyword.length > 0) {

View File

@ -263,7 +263,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="10.749" height="14.33" viewBox="0 0 10.749 14.33"><defs><!--<style>.a{fill:#d51717;}</style>--></defs><path class="a" d="M10.382.67a14.44,14.44,0,0,1,.5,3.225A2.331,2.331,0,0,1,8.589,6.4,2.445,2.445,0,0,1,6.15,3.895l.02-.242A9.25,9.25,0,0,0,4,9.625a5.375,5.375,0,0,0,10.749,0A11.5,11.5,0,0,0,10.382.67ZM9.18,12.985a2.134,2.134,0,0,1-2.163-2.11A2.1,2.1,0,0,1,8.9,8.779a5.181,5.181,0,0,0,3.1-1.733,9.374,9.374,0,0,1,.4,2.714A3.226,3.226,0,0,1,9.18,12.985Z" transform="translate(-4 -0.67)"/></svg>
<span class="uk-margin-small-left"
>
{{" "+(result.pop_inf[0]=='A'?'High':'')+(result.pop_inf[0]=='B'?'Average':'')+(result.pop_inf[0]=='C'?'Low':'')+
{{" "+result.pop_inf[2]+
" popularity" }}</span>
</a>
@ -276,7 +276,7 @@
viewBox="0 0 20.234 26.974"><defs> </defs><path class="a" d="M16.014.67a27.181,27.181,0,0,1,.936,6.07c0,2.605-1.707,4.717-4.312,4.717A4.6,4.6,0,0,1,8.047,6.74l.038-.455A17.411,17.411,0,0,0,4,17.527a10.117,10.117,0,0,0,20.234,0A21.643,21.643,0,0,0,16.014.67ZM13.75,23.85A4.016,4.016,0,0,1,9.678,19.88c0-2.049,1.328-3.49,3.554-3.946a9.753,9.753,0,0,0,5.843-3.263,17.645,17.645,0,0,1,.746,5.109,6.072,6.072,0,0,1-6.07,6.07Z" transform="translate(-4 -0.67)"/></svg>
</span>
<span class=" uk-margin-small-left uk-text-large"
>{{" "+(result.pop_inf[0]=='A'?'High':'')+(result.pop_inf[0]=='B'?'Average':'')+(result.pop_inf[0]=='C'?'Low':'')+
>{{" "+result.pop_inf[2]+
" popularity" }}</span>
<span
class="uk-margin-small-top uk-margin-small-left">{{" "+(result.pop_inf[0]=='A'?'In top 0.01%':'')+(result.pop_inf[0]=='B'?'In top 1%':'')+(result.pop_inf[0]=='C'?'In bottom 99%':'')}}</span>
@ -292,7 +292,7 @@
<a title = "Influence" class="influence-{{result.pop_inf[1]}} uk-flex uk-flex-middle">
<svg xmlns="http://www.w3.org/2000/svg" width="12.667" height="14" viewBox="0 0 12.667 14"><defs><!--<style>.a{fill:#e1920a;}</style>--></defs><path class="a" d="M3.333,7v4.667h2V7Zm4,0v4.667h2V7ZM2,15H14.667V13H2Zm9.333-8v4.667h2V7Zm-3-6L2,4.333V5.667H14.667V4.333Z" transform="translate(-2 -1)"/></svg>
<span class="uk-margin-small-left"
>{{" "+(result.pop_inf[1]=='A'?'Strong':'')+(result.pop_inf[1]=='B'?'Average':'')+(result.pop_inf[1]=='C'?'Weak':'')+
>{{" "+result.pop_inf[3]+
" influence" }}</span>
</a>
<div
@ -303,7 +303,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24.299" height="26.857" viewBox="0 0 24.299 26.857"><defs><style>.a{fill:#464646;}</style></defs><path class="a" d="M4.558,12.51v8.952H8.394V12.51Zm7.673,0v8.952h3.837V12.51ZM2,27.857H26.3V24.02H2ZM19.9,12.51v8.952h3.837V12.51ZM14.149,1,2,7.394V9.952H26.3V7.394Z" transform="translate(-2 -1)"/></svg>
</span>
<span class=" uk-margin-small-left uk-text-large"
>{{" "+(result.pop_inf[1]=='A'?'Strong':'')+(result.pop_inf[1]=='B'?'Average':'')+(result.pop_inf[1]=='C'?'Weak':'')+
>{{result.pop_inf[3]+
" influence" }}</span>
<span
class="uk-margin-small-top uk-margin-small-left">{{" "+(result.pop_inf[1]=='A'?'In top 0.01%':'')+(result.pop_inf[1]=='B'?'In top 1%':'')+(result.pop_inf[1]=='C'?'In bottom 99%':'')}}</span>