In linking- search result form : use select for the source and show only the tabs for the selected source | show open access mandate: no if it is not true | minor layout changes

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48570 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-07-14 14:29:06 +00:00
parent 8bac59417a
commit a6c5f4a38b
7 changed files with 85 additions and 41 deletions

View File

@ -1,21 +1,30 @@
<form class=" uk-panel uk-margin-top uk-padding uk-background-muted uk-animation">
Search for research results:
<input class=" uk-input uk-width-2-3 form-control" [(ngModel)]="keyword" name="keyword" placeholder="Type keywords..."/>
<div>Search for research results:</div>
<select [(ngModel)]="searchSource" name="select_source" (ngModelChange)="searchSourceChanged(searchSource)" class="uk-select uk-width-1-4">
<option value="openaire">in OpenAIRE </option>
<option value="crossref">in Crossref </option>
<option value="datacite">in Datacite </option>
<option value="orcid">in ORCID </option>
<option value="all">Search all</option>
</select>
<input class=" uk-input uk-width-1-2 form-control" [(ngModel)]="keyword" name="keyword" placeholder="Type keywords..."/>
<span class="input-group-btn">
<button (click)="search()" type="submit" class=" uk-button uk-button-default">Search</button>
<button (click)="search(false)" type="submit" class=" uk-button uk-button-default">Search</button>
</span>
</form>
Op:{{reloadOpenaire}}- Cross: {{reloadCrossref}} -
Datacite:{{reloadDatacite}} -
Orcid: {{reloadOrcid}}
<div *ngIf="showSearchResults" class="uk-margin-top uk-animation">
<ul class="uk-tab" uk-switcher="connect:'#claimsearchtabs'">
<li class="active"><a data-toggle="tab" >Crossref <span class="uk-badge uk-badge-notification">{{(crossrefResultsNum)?crossrefResultsNum:0}}</span></a></li>
<li><a data-toggle="tab" >Openaire Publications <span class="uk-badge uk-badge-notification">{{ (openairePubsNum)?openairePubsNum:0 }}</span></a></li>
<li><a data-toggle="tab" >Orcid <span class="uk-badge uk-badge-notification">{{(orcidResultsNum)?orcidResultsNum:0}}</span></a></li>
<li class="active"><a data-toggle="tab" >Datacite <span class="uk-badge uk-badge-notification">{{(dataciteResultsNum==null)?'0':dataciteResultsNum}}</span></a></li>
<li><a data-toggle="tab" >Openaire Datasets <span class="uk-badge uk-badge-notification">{{(openaireDataNum==null)?'0':openaireDataNum}}</span></a></li>
<ul class="uk-tab" uk-tab="animation: uk-animation-fade">
<li *ngIf="searchSource == 'all' || searchSource == 'openaire'" (click)="clickTab('openairePub')" ><a>Publications <span class="uk-badge uk-badge-notification">{{ (openairePubsNum)?openairePubsNum:0 }}</span></a></li>
<li *ngIf="searchSource == 'all' || searchSource == 'openaire'" (click)="clickTab('openaireData')" ><a>Datasets <span class="uk-badge uk-badge-notification">{{(openaireDataNum==null)?'0':openaireDataNum}}</span></a></li>
<li *ngIf="searchSource == 'all' || searchSource == 'crossref'" (click)="clickTab('crossref')" ><a>Crossref <span class="uk-badge uk-badge-notification">{{(crossrefResultsNum)?crossrefResultsNum:0}}</span></a></li>
<li *ngIf="searchSource == 'all' || searchSource == 'datacite'" (click)="clickTab('datacite')"><a>Datacite <span class="uk-badge uk-badge-notification">{{(dataciteResultsNum==null)?'0':dataciteResultsNum}}</span></a></li>
<li *ngIf="searchSource == 'all' || searchSource == 'orcid'" (click)="clickTab('orcid')"><a>Orcid <span class="uk-badge uk-badge-notification">{{(orcidResultsNum)?orcidResultsNum:0}}</span></a></li>
</ul>
<ul id="claimsearchtabs" class="uk-switcher">
<li id="crossref" >
<div *ngIf="activeTab == 'crossref'" id="crossref" >
<div class="uk-margin-top" >
<div *ngIf="crossrefStatus == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResults.length == 0" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
@ -41,8 +50,8 @@
</ul>
</div>
</div>
</li>
<li id="openairePubs" class="uk-animation-fade" >
</div>
<div *ngIf="activeTab == 'openairePub'" id="openairePubs" class="uk-animation-fade" >
<div class = "uk-margin-top">
<div *ngIf="openairePubsStatus == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="openairePubsStatus == errorCodes.NONE" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
@ -69,8 +78,8 @@
</ul>
</div>
</div>
</li>
<li id="orcid" class="uk-animation-fade">
</div>
<div *ngIf="activeTab == 'orcid'" id="orcid" class="uk-animation-fade">
<div class="uk-margin-top" >
<div *ngIf="orcidStatus == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="orcidStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
@ -115,8 +124,8 @@
</div>
</div>
</div>
</li>
<li id="datacite" class="uk-animation-fade">
</div>
<div *ngIf="activeTab == 'datacite'" id="datacite" class="uk-animation-fade">
<div *ngIf="dataciteStatus == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="dataciteStatus == errorCodes.NONE" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
<div *ngIf="dataciteStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
@ -145,8 +154,8 @@
</div>
</div>
</li>
<li id="openaireData" class="uk-animation-fade">
</div>
<div *ngIf="activeTab == 'openaireData'" id="openaireData" class="uk-animation-fade">
<div *ngIf="openaireDataStatus == errorCodes.LOADING" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
<div *ngIf="openaireDataStatus == errorCodes.NONE" class="uk-alert uk-alert-primary" role="alert">No Results found</div>
<div *ngIf="openaireDataStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning" role="alert">An Error Occured</div>
@ -176,6 +185,5 @@
</ul>
</div>
</div>
</li>
</ul>
</div>
</div>

View File

@ -26,7 +26,7 @@ export class ClaimResultSearchFormComponent {
}
ngOnInit() {
if(this.keyword !=null && this.keyword.length > 0){
this.search();
this.search(false);
}
}
@ -66,7 +66,8 @@ export class ClaimResultSearchFormComponent {
public nextDate = '';
public DOIs:string[] = [];
sub: any;
public searchSource:string = "openaire"
public activeTab:string = "openairePub"
crossrefResults=[];
@ -95,17 +96,41 @@ export class ClaimResultSearchFormComponent {
authorsNum : number ;
reloadOpenaire:boolean = true;
reloadCrossref:boolean = false;
reloadDatacite:boolean = false;
reloadOrcid:boolean = false;
search(){
search(sourceChanged){
this.warningMessage = "";
this.infoMessage = "";
this.DOIs = DOI.getDOIsFromString(this.keyword);
this.getCrossrefResults(this.keyword, this.size,1);
this.searchOrcid(this.keyword);
this.searchOpenairePubs(this.keyword, this.size, 1);
this.searchDatacite(this.keyword,this.size,1);
this.searchOpenaireData(this.keyword,this.size,1);
if(!sourceChanged){
this.DOIs = DOI.getDOIsFromString(this.keyword);
this.reloadOpenaire = true;
this.reloadCrossref = true;
this.reloadDatacite = true;
this.reloadOrcid = true;
}
if((this.searchSource == "all" || this.searchSource == "openaire") && this.reloadOpenaire){
this.searchOpenairePubs(this.keyword, this.size, 1);
this.searchOpenaireData(this.keyword,this.size,1);
this.reloadOpenaire = false;
}
if((this.searchSource == "all" || this.searchSource == "crossref")&&this.reloadCrossref){
this.getCrossrefResults(this.keyword, this.size,1);
this.reloadCrossref = false;
}
if((this.searchSource == "all" || this.searchSource == "datacite")&& this.reloadDatacite){
this.searchDatacite(this.keyword,this.size,1);
this.reloadDatacite = false;
}
if((this.searchSource == "all" || this.searchSource == "orcid")&& this.reloadOrcid){
this.searchOrcid(this.keyword);
this.reloadOrcid = false;
}
this.showSearchResults = true;
}
@ -531,4 +556,14 @@ openaireDataPageChange($event) {
}
public searchSourceChanged(source){
this.searchSource = source;
this.activeTab = (source == "openaire" || source == "all")?"openairePub":source;
if(this.keyword && this.keyword.length > 0){
this.search(true);
}
}
public clickTab(tab){
this.activeTab = tab;
}
}

View File

@ -34,10 +34,10 @@ import { Meta} from '../../../angular2-meta';
</span> Linking Functionality:</div>
<p>Through linking functioanilty you are able to create links from {{type}} to {{(linkTo =='context')?"communities/ concepts":((linkTo =='project')?"projects":"research results")}}. You have to select at least one {{(linkTo =='context')?"community/ concept":((linkTo =='project')?"project":"research result")}} in order to be able to proceed.</p>
<p *ngIf="linkTo=='project'">Projects: Search and add projects using keyword search. Limit the search space by specifying project Funder. </p>
<p *ngIf="linkTo=='context'">Communities: Search and add communities/ concepts by selecting community, category and using keyword search for . Or browse through the categories and add communities. </p>
<p *ngIf="linkTo=='result'">Research Results: You can search for reasearch results (publication and/ or datasets) to link, in openaire, crossref, and/ or Datacite. Use search mode, to search and add results through keyword search. Use upload mode, to upload a list of DOIs of results. </p>
<p *ngIf="show=='claim' && linkTo=='result'">Review Metadata: For selected research results that came from 3rd party repositories (Datacite, Crossreff), you need to set access mode, and type before they are included in openaire information space.
<p *ngIf="linkTo=='project'"><span class="uk-text-bold">Projects:</span> Search and add projects using keyword search. Limit the search space by specifying project Funder. </p>
<p *ngIf="linkTo=='context'"><span class="uk-text-bold">Communities:</span> Search and add communities/ concepts by selecting community, category and using keyword search for . Or browse through the categories and add communities. </p>
<p *ngIf="linkTo=='result'"><span class="uk-text-bold">Research Results:</span> You can search for reasearch results (publication and/ or datasets) to link, in openaire, crossref, and/ or Datacite. Use search mode, to search and add results through keyword search. Use upload mode, to upload a list of DOIs of results. </p>
<p *ngIf="show=='claim' && linkTo=='result'"><span class="uk-text-bold">Review Metadata:</span> For selected research results that came from 3rd party repositories (Datacite, Crossreff), you need to set access mode, and type before they are included in openaire information space.
Please have in mind that if you ignore this step they will have the default values.
</p>

View File

@ -34,10 +34,10 @@ declare var UIkit:any;
<p>Through linking functioanilty you are able to create links from research results to projects and/ or communities. You have to select at least one research result and one project or community in order to be able to proceed.</p>
<p>You can search for reasearch results (publication and/ or datasets) to link, in openaire, crossref, and/ or Datacite. </p>
<p *ngIf="show=='project'">Projects: Search and add projects using keyword search. Limit the search space by specifying project Funder. </p>
<p *ngIf="show=='context'">Communities: Search and add communities/ concepts by selecting community, category and using keyword search for . Or browse through the categories and add communities. </p>
<p *ngIf="show=='result'">Research Results: Use search mode, to search and add results through keyword search. Use upload mode, to upload a list of DOIs of results. </p>
<p *ngIf="show=='claim'">Review Metadata: For selected research results that came from 3rd party repositories (Datacite, Crossreff), you need to set access mode, and type before they are included in openaire information space.
<p *ngIf="show=='project'"><span class="uk-text-bold">Projects:</span> Search and add projects using keyword search. Limit the search space by specifying project Funder. </p>
<p *ngIf="show=='context'"><span class="uk-text-bold">Communities:</span> Search and add communities/ concepts by selecting community, category and using keyword search for . Or browse through the categories and add communities. </p>
<p *ngIf="show=='result'"><span class="uk-text-bold">Research Results:</span> Use search mode, to search and add results through keyword search. Use upload mode, to upload a list of DOIs of results. </p>
<p *ngIf="show=='claim'"><span class="uk-text-bold">Review Metadata:</span> For selected research results that came from 3rd party repositories (Datacite, Crossreff), you need to set access mode, and type before they are included in openaire information space.
Please have in mind that if you ignore this step they will have the default values.
</p>

View File

@ -27,6 +27,7 @@
<li *ngIf="projectInfo.funding"><span class="uk-text-bold">Funding:</span> {{projectInfo.funding}}</li>
<li *ngIf="projectInfo.startDate"><span class="uk-text-bold">Start Date:</span> {{projectInfo.startDate}}</li>
<li *ngIf="projectInfo.endDate"><span class="uk-text-bold">End Date:</span> {{projectInfo.endDate}}</li>
<li *ngIf="projectInfo.openAccessMandate != undefined && !projectInfo.openAccessMandate "><span class="uk-text-bold">Open Access mandate:</span> no</li>
<li *ngIf="projectInfo.organizations && projectInfo.organizations.length > 0"><span class="uk-text-bold">Organizations:</span>
<span class="list-horizontal-line">

View File

@ -103,7 +103,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
</div>
</div-->
<div class=" uk-margin-small-top uk-container">
<ul class=" uk-tab uk-visible@m" uk-tab="connect: #searchtabs; animation: uk-animation-fade">
<ul class=" uk-tab uk-visible@m" uk-tab="animation: uk-animation-fade">
<li (click)="searchPublications()" >
<a>
Publications

View File

@ -452,7 +452,7 @@ export class SearchPageComponent {
return (doiQuery.length > 0 ? doiQuery:keywordQuery) + allFqs;
}
private isFiltered(){
public isFiltered(){
var filtered=false;
this.showUnknownFilters = false;
for (let filter of this.filters){