get numbers for first page from search API | fix cite-this issue | add class for forms background images, add class in every search page | add form background image also in table view

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48596 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-07-18 11:45:12 +00:00
parent d0df3d127a
commit 69debfb564
21 changed files with 270 additions and 139 deletions

View File

@ -60,7 +60,7 @@
"angular2-universal-polyfills": "~2.1.0-rc.1",
"base64url": "^2.0.0",
"body-parser": "^1.15.2",
"citation-js": "^0.3.0-2",
"citation-js": "^0.3.0-6",
"clipboard": "^1.5.16",
"compression": "^1.6.2",
"express": "^4.14.0",

View File

@ -5,7 +5,11 @@ import { Meta} from '../../angular2-meta';
@Component({
selector: 'error',
template: `
<div class="container">
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" >
<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 ">
<div class="uk-container">
<h2>
Bad karma: we can't find that page!
</h2>
@ -21,6 +25,9 @@ import { Meta} from '../../angular2-meta';
<li>or, quite unlikely for sure, maybe you typed it yourself and there was a little mistake ?</li>
</ul>
</div>
</div>
</div>
</div>
`
})

View File

@ -37,20 +37,15 @@ export class CiteThisComponent {
}
ngOnInit() {
// this.Cite
// this.sub = this.route.queryParams.subscribe(data => {
if(typeof window !== 'undefined') {
this.parseData();
var Cite = require('citation-js');
this.cite = new Cite(this.data);
// this.cite.setData(this.data);
this.cite = new Cite(this.data,this.citation.getOptionsBy(this.selectedStyle));
this.citationText = this.cite.get(this.citation.getOptionsBy(this.selectedStyle));
}
// });
}
parseData(){
var citationData:CitationData = new CitationData();
// try{
citationData.id = this.id;
if(this.result.types != undefined && this.result.types.length > 0 && this.result.types[0]){
@ -88,18 +83,13 @@ export class CiteThisComponent {
dateArray.push["01"];
}
citationData.issued.push({"date-parts":[dateArray[0],dateArray[1], dateArray[2]]});
if(this.result.date ){
citationData.date = this.result.date ;
// console.log(citationData.issued[0]["date-parts"][0]+" "+citationData.issued[0]["date-parts"][1]+" "+citationData.issued[0]["date-parts"][2] + "--->"+ citationData.date)
}
}
// }catch (e) {
// console.log("Error parsing data for citeThis component");
// console.log(e);
//
// citationData = new CitationData();
// }
this.data = JSON.stringify([citationData]);
this.data = JSON.stringify(citationData);
console.log(this.data);
}

View File

@ -20,7 +20,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
<!--form *ngIf="!loggedIn" class=" ">
<h3>Welcome to OpenAIRE's Discover/ Share Portal</h3>
<h3>Welcome to OpenAIRE's Discover Portal</h3>
<p>This service uses the same ldap sign-in as the OpenAIRE services so you can use the same
credentials.</p>

View File

@ -24,7 +24,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
(downloadClick)="downloadClicked($event)"
[csvParams]="csvParams" csvPath="resources"
[disableForms]="disableForms"
[tableViewLink]="'/search/content-providers-table'">
[tableViewLink]="'/search/content-providers-table'"
searchFormClass="compatibleDatasourcesSearchForm">
</search-page>
<!--table-view [(datasources)] = results></table-view-->

View File

@ -20,7 +20,11 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[showResultCount]=false
[disableForms]="disableForms"
[searchViewLink]="'/search/content-providers'">
[searchViewLink]="'/search/content-providers'"
searchFormClass="compatibleDatasourcesTableSearchForm"
formPlaceholderText="Search for OpenAIRE Content Providers">
</search-page-table>
`

View File

@ -24,7 +24,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
(downloadClick)="downloadClicked($event)"
[csvParams]="csvParams" csvPath="resources"
[disableForms]="disableForms"
[tableViewLink]="'/search/entity-registries-table'">
[tableViewLink]="'/search/entity-registries-table'"
searchFormClass="entityRegistriesSearchForm">
</search-page>
`

View File

@ -20,7 +20,9 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[showResultCount]=false
[disableForms]="disableForms"
[searchViewLink]="'/search/entity-registries'">
[searchViewLink]="'/search/entity-registries'"
searchFormClass="entityRegistriesTableSearchForm"
formPlaceholderText="Search for Entity Registries">
</search-page-table>
`

View File

@ -24,7 +24,8 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
(downloadClick)="downloadClicked($event)"
[csvParams]="csvParams" csvPath="resources"
[disableForms]="disableForms"
[tableViewLink]="'/search/journals-table'">
[tableViewLink]="'/search/journals-table'"
searchFormClass="journalsSearchForm">
</search-page>
`

View File

@ -20,7 +20,9 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[showResultCount]=false
[disableForms]="disableForms"
[searchViewLink]="'/search/journals'">
[searchViewLink]="'/search/journals'"
searchFormClass="journalsTableSearchForm"
formPlaceholderText="Search for Journals">
</search-page-table>
`

View File

@ -21,6 +21,8 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';
import {SearchFields} from '../../utils/properties/searchFields';
import {ErrorCodes} from '../../utils/properties/openaireProperties';
import {RouterHelper} from '../../utils/routerHelper.class';
import {NumberUtils} from '../../utils/number-utils.class';
import {RefineFieldResultsService} from '../../services/refineFieldResults.service';
@Component({
changeDetection: ChangeDetectionStrategy.Default,
@ -30,7 +32,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<div class="image-front-topbar uk-section-secondary uk-position-relative" uk-scrollspy="{&quot;target&quot;:&quot;[uk-scrollspy-class]&quot;,&quot;cls&quot;:&quot;uk-animation-fade&quot;,&quot;delay&quot;:false}" tm-header-transparent="light">
<div style="background-image: url(&quot;/assets/globe_tech.jpg&quot;); background-color: rgb(255, 255, 255); box-sizing: border-box; min-height: calc(100vh - 412.767px);" class="uk-background-norepeat uk-background-cover uk-background-fixed uk-section uk-padding-remove-bottom uk-flex uk-flex-middle" uk-height-viewport="offset-top: true;offset-bottom: ! +">
<div style="" class="mainPageSearchForm uk-background-norepeat uk-background-cover uk-background-fixed uk-section uk-padding-remove-bottom uk-flex uk-flex-middle" uk-height-viewport="offset-top: true;offset-bottom: ! +">
<div class="uk-position-cover" style="background-color: rgba(70, 68, 68, 0.65);"></div>
<div class="uk-width-1-1">
<div class="uk-position-relative">
@ -53,28 +55,28 @@ import {RouterHelper} from '../../utils/routerHelper.class';
<div class="uk-first-column">
<div uk-scrollspy-class="" class="uk-width-medium uk-margin-auto el-item uk-panel uk-scrollspy-inview uk-animation-fade" style="">
<h2 class="el-title uk-margin uk-h2">
<span class="uk-text-background">16 mi publications</span>
<span *ngIf="publicationsSize" class="uk-text-background">{{publicationsSize.number}} {{publicationsSize.size}} publications</span>
</h2>
</div>
</div>
<div>
<div uk-scrollspy-class="" class="uk-width-medium uk-margin-auto el-item uk-panel uk-scrollspy-inview uk-animation-fade" style="">
<h2 class="el-title uk-margin uk-h2">
<span class="uk-text-background">83 K datasets</span>
<span *ngIf="datasetsSize" class="uk-text-background">{{datasetsSize.number}} {{datasetsSize.size}} datasets</span>
</h2>
</div>
</div>
<div>
<div uk-scrollspy-class="" class="uk-width-medium uk-margin-auto el-item uk-panel uk-scrollspy-inview uk-animation-fade" style="">
<h2 class="el-title uk-margin uk-h2">
<span class="uk-text-background">7900 data sources</span>
<span *ngIf="datasourcesSize" class="uk-text-background">{{datasourcesSize.number}} {{datasourcesSize.size}} data sources</span>
</h2>
</div>
</div>
<div>
<div uk-scrollspy-class="" class="uk-width-medium uk-margin-auto el-item uk-panel uk-scrollspy-inview uk-animation-fade" style="">
<h2 class="el-title uk-margin uk-h2">
<span class="uk-text-background">15 funders</span>
<span *ngIf="fundersSize" class="uk-text-background">{{fundersSize.number}} {{fundersSize.size}} funders</span>
</h2>
</div>
</div>
@ -308,6 +310,7 @@ import {RouterHelper} from '../../utils/routerHelper.class';
})
export class SearchComponent {
public sub: any;
public subfunders: any;
public reloadPublications: boolean;
public reloadDatasets: boolean;
public reloadProjects: boolean;
@ -340,6 +343,12 @@ export class SearchComponent {
public errorCodes:ErrorCodes = new ErrorCodes();
public routerHelper:RouterHelper = new RouterHelper();
public publicationsSize:any = null;
public datasetsSize:any = null;
public fundersSize:any = null;
public projectsSize:any = null;
public datasourcesSize:any = null;
public subPub;public subData;public subProjects;public subOrg; public subDataPr;
constructor ( private route: ActivatedRoute,
private _router: Router,
@ -348,6 +357,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
private _searchProjectsService: SearchProjectsService,
private _searchDatasetsService: SearchDatasetsService,
private _searchOrganizationsService: SearchOrganizationsService,
private _refineFieldResultsService:RefineFieldResultsService,
private location: Location, private _meta: Meta ) {
this.fetchPublications = new FetchPublications(this._searchPublicationsService);
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
@ -363,6 +373,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
this._meta.updateProperty("og:description", description);
this._meta.updateProperty("og:title", title);
this._meta.updateProperty("og:url", url);
this.getNumbers();
}
@ -380,6 +391,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
}
public ngOnDestroy() {
this.sub.unsubscribe();
this.subfunders.unsubscribe();
if(this.keyword !=null && this.keyword.length > 0){
if(this.subPub){
this.subPub.unsubscribe();
@ -566,4 +578,64 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
this.reloadOrganizations = true;
}
private getNumbers() {
this.subPub = this._searchPublicationsService.numOfSearchPublications("").subscribe(
data => {
console.log("Count results: "+data);
if(data && data != null && data > 0 ){
this.publicationsSize = NumberUtils.roundNumber(data);
}
},
err => {
console.log(err);
}
);
this.subData = this._searchDatasetsService.numOfSearchDatasets("").subscribe(
data => {
if(data && data != null && data > 0 ){
this.datasetsSize = NumberUtils.roundNumber(data);
}
},
err => {
console.log(err);
}
);
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project").subscribe(
data => {
console.info("Funders: "+data[1][0].title+ " values "+data[1][0].values.length+"]");
console.info("Projects: "+data[0]);
if(data[0] && data[0] > 0 ){
this.projectsSize = NumberUtils.roundNumber(data[0]);
}
if(data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values ){
this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length);
}
},
err => {
console.log(err);
});
this._searchDataprovidersService.numOfSearchDataproviders("").subscribe(
data => {
if(data && data != null && data > 0 ){
this.datasourcesSize = NumberUtils.roundNumber(data);
}
},
err => {
console.log(err);
}
);
}
}

View File

@ -25,10 +25,10 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
<h2>{{pageTitle}}</h2>
</div-->
<!--div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted"-->
<div class="uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle" style="background-image: url('./assets/formImage.jpg'); box-sizing: border-box; height: 250px">
<div [class]="'uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle '+searchFormClass" >
<div class="uk-width-1-1">
<div class="uk-width-1-1">
<search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)" [placeholderText]="formPlaceholderText"s></search-form>
<search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)" [placeholderText]="formPlaceholderText"></search-form>
</div>
<div class="uk-width-1-1 uk-light">
<!--link to advanced search -->
@ -55,10 +55,10 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
Clear All
</a>
</div>
</div>
<div *ngIf= "showUnknownFilters" class = " uk-text-center uk-light">
<a (click) = "clearFilters() " >Try new Query</a>
</div>
</div>
</div>
</div>
@ -135,6 +135,7 @@ export class SearchPageComponent {
@Input() tableViewLink: string;
@Input() disableForms: boolean = false;
@Input() tableView: boolean = false;
@Input() searchFormClass: string = "searchForm";
@ViewChild (ModalLoading) loading : ModalLoading ;
public fieldIdsMap;//: { [key:string]:{ name:string, operator:string, type:string, indexField:string, equalityOperator:string }};

View File

@ -21,24 +21,25 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
<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 ">
<div class="uk-container uk-margin-top">
<div class="page-header">
<!--div class="page-header">
<h2>{{pageTitle}}</h2>
</div-->
<div [class]="'uk-background-norepeat uk-background-cover uk-section uk-flex uk-flex-middle '+searchFormClass" >
<div class="uk-width-1-1">
<div class="uk-width-1-1">
<search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)" [placeholderText]="formPlaceholderText"></search-form>
</div>
<div>
<div *ngIf="showRefine" >
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
<search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)"></search-form>
<div *ngIf="isFiltered()" class = " uk-text-center ">
<div class="uk-width-1-1 uk-light">
<div *ngIf="isFiltered()" class = "uk-container uk-text-center ">
<span *ngIf = "searchUtils.keyword.length > 0">Keywords: <span>{{searchUtils.keyword}}<a (click) = "clearKeywords() " [class]="(disableForms)?'uk-icon-button uk-disabled':'uk-icon-button'"><span class=" clickable " aria-hidden="true"><span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
</span></span></a></span>
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
</span></span></a></span>
</span>
<span *ngFor="let filter of filters " >
<span *ngIf = "filter.countSelectedValues > 0"> {{filter.title}}:
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; " >{{value.name}}<a (click) = "removeFilter(value, filter) " [class]="(disableForms)?'uk-icon-button uk-disabled':'uk-icon-button'"><span class=" clickable" aria-hidden="true"><span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
</span></span></a>
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg>
</span></span></a>
<span *ngIf="!end">, </span>
</span>
</span>
@ -49,21 +50,24 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
</a>
</div>
</div>
</div>
</div>
<div class="uk-container">
<div *ngIf="searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
<div *ngIf="searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">This may take a while...</div>
<div class="uk-grid uk-width-1-1 uk-margin">
<div class=" search-filters uk-width-1-4@l uk-width-1-4@m uk-width-1-1@s ">
<div *ngIf="searchUtils.totalResults > 0" class=" search-filters uk-width-1-4@l uk-width-1-4@m uk-width-1-1@s uk-margin-large-top">
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
</div>
<div class="uk-width-3-4@m uk-width-3-4@l uk-width-1-1@s uk-first-column" >
<div class="uk-overflow-container custom-dataTable-content">
<table class="uk-table uk-table-striped" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
<table class="uk-table uk-table-striped divider-table" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
[mfData]="results | contentProvidersDatatable : [searchUtils, filters, triggerPipe]">
<div *ngIf="searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No Results found</div>
<div *ngIf="searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">This may take a while...</div>
<thead *ngIf="searchUtils.totalResults > 0">
<tr><td colspan="5" class="uk-padding-remove-bottom uk-padding-remove-right">
<span>
@ -78,8 +82,8 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
<p>
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><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>
</span>
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><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>
</span>
Show results in search view
</a>
</p>
@ -87,7 +91,7 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
<tr>
<!-- Name Type Country Institution Compatibility -->
<th class="uk-text-center"><mfDefaultSorter by="title.name">Name</mfDefaultSorter></th>
<th class="uk-text-left"><mfDefaultSorter by="title.name">Name</mfDefaultSorter></th>
<th class="uk-text-center"><mfDefaultSorter by="type">Type</mfDefaultSorter></th>
<th class="uk-text-center"><mfDefaultSorter by="countries">Country</mfDefaultSorter></th>
<th class="uk-text-center"><mfDefaultSorter [by]="sortByOrganization">Institution</mfDefaultSorter></th>
@ -97,7 +101,7 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
</thead>
<tbody *ngIf="searchUtils.totalResults > 0">
<tr class="uk-table-middle" *ngFor="let dataprovider of mf.data">
<td class="uk-width-1-5 uk-text-center">
<td class="uk-width-1-5 uk-text-left">
<a [queryParams]="{datasourceId: dataprovider.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
<span *ngIf="dataprovider.title.name"
[innerHTML]="dataprovider.title.name">
@ -129,13 +133,11 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
</div>
@ -149,7 +151,7 @@ export class SearchPageTableViewComponent {
@Input() filters = [];
@Input() type:string = "";
@Input() entityType: string = "";
@Input() searchUtils:SearchUtilsClass = new SearchUtilsClass();
@Input() searchUtils:SearchUtilsClass;// = new SearchUtilsClass();
//@Output() downloadClick = new EventEmitter();
@Input() showResultCount:boolean = true;
@Input() showRefine:boolean = true;
@ -158,7 +160,8 @@ export class SearchPageTableViewComponent {
//@Input() csvPath: string;
@Input() searchViewLink: string;
@Input() disableForms: boolean = false;
@Input() searchFormClass: string = "searchForm";
@Input() formPlaceholderText = "Type Keywords...";
@ViewChild (ModalLoading) loading : ModalLoading ;
private searchFieldsHelper:SearchFields = new SearchFields();
private queryParameters: Map<string, string> = new Map<string,string>();

View File

@ -20,7 +20,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
[(results)] = "results" [(searchUtils)] = "searchUtils" [baseUrl] = "baseUrl"
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
[csvParams]="csvParams" csvPath="datasources" advancedSearchLink="/search/advanced/dataproviders"
[disableForms]="disableForms">
[disableForms]="disableForms"
searchFormClass="datasourcesSearchForm">
</search-page>
`

View File

@ -21,7 +21,8 @@ import {DOI} from '../../utils/string-utils.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
[csvParams]="csvParams" csvPath="datasets" advancedSearchLink="/search/advanced/datasets"
[disableForms]="disableForms">
[disableForms]="disableForms"
searchFormClass="datasetsSearchForm">
</search-page>
`
})

View File

@ -19,7 +19,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
[csvParams]="csvParams" csvPath="organizations" advancedSearchLink="/search/advanced/organizations"
[disableForms]="disableForms">
[disableForms]="disableForms"
searchFormClass="organizationsSearchForm">
</search-page>
`

View File

@ -19,7 +19,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class';
[(results)] = "results" [(searchUtils)] = "searchUtils"
[baseUrl] = "baseUrl" (queryChange)="queryChanged($event)"
[csvParams]="csvParams" csvPath="projects" advancedSearchLink="/search/advanced/projects"
[disableForms]="disableForms">
[disableForms]="disableForms"
searchFormClass="projectsSearchForm">
</search-page>
`

View File

@ -24,7 +24,8 @@ import {DOI} from '../../utils/string-utils.class';
[(searchUtils)] = "searchUtils" [(baseUrl)] = baseUrl
(queryChange)="queryChanged($event)" (downloadClick)="downloadClicked($event)"
[csvParams]="csvParams" csvPath="publications" advancedSearchLink="/search/advanced/publications"
[disableForms]="disableForms">
[disableForms]="disableForms"
searchFormClass="publicationsSearchForm">
</search-page>
`

View File

@ -97,7 +97,7 @@ import {Session} from '../login/utils/helper.class';
<div class="uk-panel inner" id="module-119">
<ul class="uk-subnav uk-subnav-line">
<li class="uk-active"><a href="https://beta.openaire.eu"><img class="uk-responsive-height" src="assets/dl119_files/Home-icon.png" alt="home"></a></li>
<li class="custom-discover-li"><a routerLinkActive="uk-link" routerLink="/search/find" >Discover/ Share</a></li>
<li class="custom-discover-li"><a routerLinkActive="uk-link" routerLink="/search/find" >Discover</a></li>
<li><a >Join</a></li>
<li><a >Connect</a></li>
<li><a >Monitor</a></li>

View File

@ -0,0 +1,31 @@
export class NumberUtils{
public static roundNumber(num: number):any {
console.log("Trying to round number: "+ num);
var roundNum = null;
if(num >= 1000000){
num=num/1000000;
num= Math.round(num);
roundNum = { "number": num, "size": "mi" };
}else if( num >= 10000){
num=num/1000;
num= Math.round(num);
roundNum = { "number": num, "size": "K" };
}else if (num >= 100) {
num=num/100;
num= Math.round(num);
num=num*100;
roundNum = { "number": num, "size": "" };
}else{
roundNum = { "number": num, "size": "" };
}
console.log("Rounded number: "+ roundNum.number + " "+ roundNum.size);
return roundNum;
}
}

View File

@ -263,7 +263,18 @@ color: #f0506e;
right: 0;
border-bottom: 1px solid #e5e5e5;
}
.mainPageSearchForm{
background-image: url("./globe_tech.jpg"); background-color: rgb(255, 255, 255); box-sizing: border-box; min-height: calc(100vh - 412.767px);
}
.searchForm, .publicationsSearchForm, .projectsSearchForm, .organizationsSearchForm, .datasetsSearchForm, .datasourcesSearchForm, .journalsSearchForm,
.entityRegistriesSearchForm, .compatibleDatasourcesSearchForm,
.journalsTableSearchForm, .compatibleDatasourcesTableSearchForm, .entityRegistriesTableSearchForm{
background-image: url('./formImage.jpg'); box-sizing: border-box; height: 250px;
}
.divider-table tbody td, .uk-table th {
border-bottom: 1px solid #E5E5E5;
}
/*
li span {
display: inline-flex;