fix css for entityIcons, fix issue with dateofacceptance in landing pages, try new search message when there are no refine
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47769 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
46e1657731
commit
bd37e593dd
|
@ -6,21 +6,21 @@ import {Component, Input} from '@angular/core';
|
|||
@Component({
|
||||
selector: 'claim-entity',
|
||||
template: `
|
||||
<div *ngIf="type == 'publication'">
|
||||
<div *ngIf="type == 'publication'" title="Publication">
|
||||
<img class= "entityIcon" src="assets/publication.png" alt="(Publication)">
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" ></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'dataset'">
|
||||
<div *ngIf="type == 'dataset'" title="Dataset">
|
||||
<img class= "entityIcon" src="assets/dataset.png" alt="(Dataset)">
|
||||
<publication-title [title]="entity.title" [url]="entity.externalUrl" ></publication-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'project' ">
|
||||
<div *ngIf="type == 'project' " title="Project">
|
||||
<img class= "entityIcon" src="assets/project.png" alt="(Project)">
|
||||
<project-title [project]="entity"></project-title>
|
||||
</div>
|
||||
<div *ngIf="type == 'context' ">
|
||||
<i>(Context)</i>
|
||||
<h5>{{entity.title}}</h5>
|
||||
<div *ngIf="type == 'context' " title="Concept">
|
||||
<i>(Community)</i>
|
||||
<span>{{entity.title}}</span>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -7,9 +7,9 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
|
|||
@Component({
|
||||
selector: 'project-title',
|
||||
template: `
|
||||
<div class="project-title">
|
||||
<h5 ><a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" routerLinkActive="router-link-active" routerLink="/search/project" >{{project['name']}} ({{project['funderName']}})</a></h5>
|
||||
</div>
|
||||
<span class="project-title">
|
||||
<span ><a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" routerLinkActive="router-link-active" routerLink="/search/project" >{{project['name']}} ({{project['funderName']}})</a></span>
|
||||
</span>
|
||||
`
|
||||
})
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ import {Component, Input} from '@angular/core';
|
|||
@Component({
|
||||
selector: 'publication-title',
|
||||
template: `
|
||||
<div class="publication-title">
|
||||
<h5 *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="custom-external custom-icon" ></span> {{title}}</a></h5>
|
||||
<h5 *ngIf="!url" >{{title}}</h5>
|
||||
</div>
|
||||
<span class="publication-title">
|
||||
<span *ngIf="url" ><a target="_blank" href="{{url}}" ><span class="custom-external custom-icon" ></span> {{title}}</a></span>
|
||||
<span *ngIf="!url" >{{title}}</span>
|
||||
</span>
|
||||
`
|
||||
})
|
||||
|
||||
|
|
|
@ -56,7 +56,8 @@ export class DatasetService {
|
|||
this.datasetInfo = new DatasetInfo();
|
||||
|
||||
if(data[0] != null) {
|
||||
this.datasetInfo.date = data[0].dateofacceptance.substring(0,4);
|
||||
var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
|
||||
this.datasetInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
this.datasetInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.datasetInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
|
|
|
@ -55,7 +55,8 @@ export class PublicationService {
|
|||
this.publicationInfo = new PublicationInfo();
|
||||
|
||||
if(data[0] != null) {
|
||||
this.publicationInfo.date = data[0].dateofacceptance.substring(0,4);
|
||||
var date:string = (data[0].dateofacceptance)+""; // transform to string in case it is an integer
|
||||
this.publicationInfo.date = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||
this.publicationInfo.dateofacceptance = data[0].dateofacceptance;
|
||||
this.publicationInfo.publisher = data[0].publisher;
|
||||
if(!Array.isArray(data[0].description)) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {Observable} from 'rxjs/Observable';
|
|||
template: `
|
||||
<form [class]="(isDisabled)?'uk-margin uk-text-center uk-margin-top uk-disabled':'uk-margin uk-text-center uk-margin-top'">
|
||||
<input type="text" class="uk-input uk-width-1-2" placeholder="Type keywords..." aria-describedby="sizing-addon2" [(ngModel)]="keyword" name="keyword" >
|
||||
<button (click)="keywordChanged()" type="submit" class=" uk-button uk-button-default">Search</button>
|
||||
<button (click)="keywordChanged()" type="submit" class=" uk-button uk-button-default"><span uk-icon="icon: search"></span>Search</button>
|
||||
</form>
|
||||
`
|
||||
})
|
||||
|
|
|
@ -11,6 +11,7 @@ import { Meta} from '../../../angular2-meta';
|
|||
import{SearchFilterComponent} from './searchFilter.component';
|
||||
import {SearchFilterModalComponent} from './searchFilterModal.component';
|
||||
import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
||||
import { ErrorCodes} from '../../utils/properties/openaireProperties';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -35,6 +36,7 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<!--span>
|
||||
Clear All
|
||||
<a (click)="clearFilters()" class="uk-icon-button uk-text-right"><span uk-icon="icon: close"></span></a></span-->
|
||||
|
@ -42,6 +44,9 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
|
|||
Clear All
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf= "showUnknownFilters" class = " uk-text-center ">
|
||||
<a (click) = "clearFilters() " >Try new Query</a>
|
||||
</div>
|
||||
<a *ngIf = "advancedSearchLink && advancedSearchLink.length > 0" routerLinkActive="router-link-active" [class]="(disableForms)?'uk-float-right uk-disabled uk-link-muted':'uk-float-right'" [routerLink]=advancedSearchLink >More search options <span uk-icon="icon: chevron-right"></span></a>
|
||||
</div>
|
||||
<div class="uk-grid uk-width-1-1 uk-margin">
|
||||
|
@ -140,7 +145,7 @@ export class SearchPageComponent {
|
|||
public urlParam: string;
|
||||
public parameterNames:string[] =[];
|
||||
public parameterValues:string[] =[];
|
||||
|
||||
public showUnknownFilters:boolean = false; // when a filter exists in query but has no results, so no filters returned from the query
|
||||
//@ViewChild (SearchFilterModalComponent) searchFilterModal : SearchFilterModalComponent ;
|
||||
public currentFilter: Filter;
|
||||
|
||||
|
@ -448,6 +453,7 @@ export class SearchPageComponent {
|
|||
}
|
||||
private isFiltered(){
|
||||
var filtered=false;
|
||||
this.showUnknownFilters = false;
|
||||
for (let filter of this.filters){
|
||||
if(filter.countSelectedValues > 0){
|
||||
filtered = true;
|
||||
|
@ -457,6 +463,10 @@ export class SearchPageComponent {
|
|||
if(this.searchUtils.keyword.length > 0 ){
|
||||
filtered = true;
|
||||
}
|
||||
var errorCodes:ErrorCodes = new ErrorCodes();
|
||||
if(this.queryParameters.keys() && this.searchUtils.totalResults == 0 && this.searchUtils.status !=errorCodes.LOADING ){
|
||||
this.showUnknownFilters = true;
|
||||
}
|
||||
return filtered;
|
||||
}
|
||||
private clearKeywords(){
|
||||
|
|
|
@ -44,16 +44,16 @@ 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 = "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 = "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 = "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 = "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 = "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://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
|
||||
|
||||
|
|
|
@ -182,9 +182,7 @@ max-height:265px;
|
|||
vertical-align: middle;
|
||||
}
|
||||
.entityIcon{
|
||||
background-repeat: :no-repeat;
|
||||
content: '';
|
||||
height: 36px;
|
||||
width: 42px;
|
||||
height: 15px;
|
||||
width: 20px;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue