Adding helpText in all pages, Set api url and enableText variables in Openaire properties
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48973 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
00e6d479e9
commit
41c97cf410
|
@ -35,6 +35,7 @@ export class XLargeDirective {
|
|||
<div class="custom-main-content" >
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
<!--/div>
|
||||
|
|
|
@ -10,7 +10,7 @@ import {SharedComponentsModule} from './sharedComponents/sharedComponents.module
|
|||
import { ErrorModule } from './error/error.module';
|
||||
import { CacheService } from './shared/cache.service';
|
||||
import { CookieLawModule } from './sharedComponents/cookie-law/cookie-law.module';
|
||||
import { XSRFStrategy, CookieXSRFStrategy, RequestOptions } from '@angular/http';
|
||||
// import { XSRFStrategy, CookieXSRFStrategy, RequestOptions } from '@angular/http';
|
||||
|
||||
@NgModule({
|
||||
declarations: [ AppComponent ],
|
||||
|
@ -20,8 +20,7 @@ import { XSRFStrategy, CookieXSRFStrategy, RequestOptions } from '@angular/http
|
|||
SharedComponentsModule,
|
||||
AppRoutingModule,
|
||||
ErrorModule,
|
||||
CookieLawModule,
|
||||
|
||||
CookieLawModule
|
||||
], exports:[],
|
||||
providers:[CacheService,
|
||||
// { provide: XSRFStrategy, useFactory: cookieStrategy },
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
<form class="">
|
||||
|
||||
|
||||
|
@ -95,6 +101,10 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
<modal-alert (alertOutput)="confirmClose($event)">
|
||||
</modal-alert>
|
||||
<modal-loading [message]= "'Please wait...'"></modal-loading>
|
||||
|
|
|
@ -7,20 +7,18 @@ import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
|
|||
import {AlertModalModule} from '../../../utils/modal/alertModal.module';
|
||||
import {ClaimEntityFormatterModule} from '../entityFormatter/claimEntityFormatter.module';
|
||||
import {PagingModule } from '../../../utils/paging.module';
|
||||
// import { Claim } from '../claim';
|
||||
//helpers
|
||||
import {HelperModule} from '../../../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
|
||||
ClaimEntityFormatterModule, PagingModule
|
||||
ClaimEntityFormatterModule, PagingModule, HelperModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
DisplayClaimsComponent
|
||||
|
||||
],
|
||||
providers: [ ],
|
||||
exports: [
|
||||
DisplayClaimsComponent
|
||||
]
|
||||
|
|
|
@ -18,6 +18,12 @@ import { Meta} from '../../../angular2-meta';
|
|||
<div class="uk-article-title">
|
||||
Link
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
<div *ngIf="validInput != null && !validInput" class="uk-alert uk-alert-warning" role="alert">No valid arguments provided in order to start linking openAIRE entities. </div>
|
||||
<div *ngIf="validInput != null && validInput">
|
||||
<div class="uk-clearfix">
|
||||
|
@ -98,6 +104,10 @@ import { Meta} from '../../../angular2-meta';
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,7 @@ import {PublicationsServiceModule} from '../../services/publicationsService.modu
|
|||
import {DatasetsServiceModule} from '../../services/datasetsService.module';
|
||||
import {LoginGuard} from'../../login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +23,7 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
|||
imports: [
|
||||
SharedModule,
|
||||
DirectLinkingRoutingModule,SelectedProjectsModule, SelectedContextsModule, SelectedPublicationsModule, InsertClaimsModule,
|
||||
EntitySearchServiceModule, PublicationsServiceModule, DatasetsServiceModule, StartOverModule
|
||||
EntitySearchServiceModule, PublicationsServiceModule, DatasetsServiceModule, StartOverModule, HelperModule
|
||||
|
||||
|
||||
],
|
||||
|
|
|
@ -19,6 +19,14 @@ declare var UIkit:any;
|
|||
<div class="uk-article-title">
|
||||
Link
|
||||
</div>
|
||||
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
|
||||
<ul class="uk-breadcrumb">
|
||||
<li [class]="(step==1)?'uk-active':''" ><a (click)="step=1;"><span class="step uk-text-large">1</span> Select Projects <span >or Communities <span ></span></span></a></li>
|
||||
<li [class]="(step==2)?'uk-active':''" ><a (click)="step=2;"><span class="step uk-text-large">2</span> Select Research Results <span ></span></a></li>
|
||||
|
@ -135,6 +143,13 @@ declare var UIkit:any;
|
|||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@ import {ClaimContextSearchFormModule} from '../claim-utils/claimContextSearchFor
|
|||
import {ClaimProjectsSearchFormModule} from '../claim-utils/claimProjectSearchForm.module';
|
||||
import {BulkClaimModule} from './bulkClaim/bulkClaim.module';
|
||||
import {ClaimResultSearchFormModule} from '../claim-utils/claimResultSearchForm.module';
|
||||
// import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -25,8 +25,7 @@ import {ClaimResultSearchFormModule} from '../claim-utils/claimResultSearchForm.
|
|||
SelectedPublicationsModule,
|
||||
InsertClaimsModule,
|
||||
EntitySearchServiceModule, PublicationsServiceModule, DatasetsServiceModule, LinkingRoutingModule, StartOverModule,
|
||||
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule
|
||||
// AlertModalModule
|
||||
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule, HelperModule
|
||||
],
|
||||
providers:[LoginGuard, PreviousRouteRecorder],
|
||||
declarations: [
|
||||
|
|
|
@ -39,6 +39,12 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.LOADING"
|
||||
class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img src="./assets/loading.gif" class="uk-align-center" alt="Loading">
|
||||
</div>
|
||||
|
@ -75,6 +81,10 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
<a href="{{zenodo}}" target="_blank">OpenAIRE's Zenodo catch-all repository (<i class="custom-external"></i>)</a>
|
||||
hosted by CERN.
|
||||
</div>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
|
||||
<button class=" uk-button uk-button-default" type="submit" (click)="goToDeposit()">
|
||||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span> Back
|
||||
|
|
|
@ -11,21 +11,22 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
|||
import {PagingModule } from '../../utils/paging.module';
|
||||
import {DataProvidersServiceModule} from '../../services/dataProvidersService.module';
|
||||
import {SearchResultsModule } from '../../searchPages/searchUtils/searchResults.module';
|
||||
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositBySubjectResultsRoutingModule, SearchResultsModule, DataProvidersServiceModule, PagingModule
|
||||
DepositBySubjectResultsRoutingModule, SearchResultsModule, DataProvidersServiceModule, PagingModule,
|
||||
HelperModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositBySubjectResultComponent,
|
||||
DepositBySubjectResultComponent
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositBySubjectResultComponent,
|
||||
DepositBySubjectResultComponent
|
||||
],
|
||||
providers: [FreeGuard,PreviousRouteRecorder ]
|
||||
})
|
||||
|
|
|
@ -8,8 +8,7 @@ import {Component} from '@angular/core';
|
|||
<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">
|
||||
<deposit [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'" [requestFor]="'Research Data'"></deposit>
|
||||
<deposit-by-subject [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'" [requestFor]="'Research Data'" ></deposit-by-subject>
|
||||
<deposit [compatibility]="'openaire____::21f8a223b9925c2f87c404096080b046||Registry of Research Data Repository'" [requestFor]="'Research Data'" [searchBySubjects]=true></deposit>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,14 +3,12 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { DepositDatasetsComponent } from './depositDatasets.component';
|
||||
import { DepositBySubjectComponent } from './depositBySubject.component';
|
||||
|
||||
import { DepositDatasetsResultComponent } from './depositDatasetsResult.component';
|
||||
|
||||
import {DepositDatasetsRoutingModule} from './depositDatasets-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
import {FreeGuard} from'../../login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
|
@ -19,11 +17,11 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
|||
],
|
||||
declarations: [
|
||||
|
||||
DepositDatasetsComponent, DepositBySubjectComponent
|
||||
DepositDatasetsComponent
|
||||
|
||||
],
|
||||
exports: [
|
||||
DepositDatasetsComponent,
|
||||
DepositDatasetsComponent
|
||||
],
|
||||
providers: [FreeGuard,PreviousRouteRecorder
|
||||
]
|
||||
|
|
|
@ -13,6 +13,12 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
<div class="uk-article-title">
|
||||
Deposit {{requestFor}}
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
<div>
|
||||
<p>
|
||||
<i>
|
||||
|
@ -30,7 +36,7 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
<a href="{{ercGuidlines}}" target="_blank">ERC guidelines (<i class="custom-external"></i>)</a> OR
|
||||
<a href="{{helpdesk}}" target="_blank">ask a question (<i class="custom-external"></i>)</a> to OpenAIRE’s national representative.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<h3>Locate repository via your institution</h3>
|
||||
|
||||
<form class= "uk-grid">
|
||||
|
@ -45,13 +51,30 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
</button>
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">{{warningMessage}}</div>
|
||||
</form>
|
||||
<div *ngIf="searchBySubjects" >
|
||||
<deposit-by-subject [compatibility]=compatibility [requestFor]=requestFor ></deposit-by-subject>
|
||||
</div>
|
||||
<div *ngIf="mapUrl">
|
||||
<h3>Or locate repository in map</h3>
|
||||
<div class="uk-margin-top">
|
||||
<i-frame [url]="mapUrl" width="100%" height="900"></i-frame>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class DepositComponent {
|
||||
@Input() compatibility: string = '';
|
||||
@Input() mapUrl: string = null; // optional in case i-frame is needed
|
||||
@Input() searchBySubjects: boolean = false; // optional: in case search by subjects is needed
|
||||
|
||||
|
||||
public status: number;
|
||||
|
||||
// Type of entity: Publication or Research Data
|
||||
@Input() requestFor: string = "Publications";
|
||||
|
|
|
@ -12,6 +12,9 @@ import {DataProvidersServiceModule} from '../services/dataProvidersService.modul
|
|||
import {OrganizationServiceModule} from '../services/organizationService.module';
|
||||
import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.module';
|
||||
import {PiwikServiceModule} from '../utils/piwik/piwikService.module';
|
||||
import {HelperModule} from '../utils/helper/helper.module';
|
||||
import { DepositBySubjectComponent } from './datasets/depositBySubject.component';
|
||||
import {IFrameModule} from '../utils/iframe.module';
|
||||
|
||||
|
||||
|
||||
|
@ -23,12 +26,14 @@ import {PiwikServiceModule} from '../utils/piwik/piwikService.module';
|
|||
DataProvidersServiceModule,
|
||||
OrganizationServiceModule,
|
||||
SearchResultsModule,
|
||||
PiwikServiceModule
|
||||
PiwikServiceModule,
|
||||
HelperModule,
|
||||
IFrameModule
|
||||
],
|
||||
declarations: [
|
||||
DepositComponent,
|
||||
DepositResultComponent
|
||||
|
||||
DepositResultComponent,
|
||||
DepositBySubjectComponent
|
||||
],
|
||||
exports: [
|
||||
DepositComponent,
|
||||
|
|
|
@ -23,8 +23,10 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
<div class="uk-article-title">
|
||||
Deposit {{requestFor}}
|
||||
</div>
|
||||
|
||||
|
||||
<helper position="top"></helper>
|
||||
<div class="uk-grid helper-grid">
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand">
|
||||
<div *ngIf="status == errorCodes.LOADING || (status == errorCodes.LOADING && fetchDataproviders.searchUtils.status == errorCodes.LOADING)"
|
||||
class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img src="./assets/loading.gif" class="uk-align-center" alt="Loading">
|
||||
</div>
|
||||
|
@ -110,7 +112,10 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
<a href="{{zenodo}}" target="_blank">OpenAIRE's Zenodo catch-all repository (<i class="custom-external"></i>)</a>
|
||||
hosted by CERN.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
<button class=" uk-button uk-button-default" type="submit" (click)="goToDeposit()">
|
||||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span> Back
|
||||
</button>
|
||||
|
|
|
@ -8,11 +8,7 @@ import {Component} from '@angular/core';
|
|||
<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">
|
||||
<deposit [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'" [requestFor]="'Publications'"></deposit>
|
||||
<h3>Or locate repository in map</h3>
|
||||
<div class="uk-margin-top">
|
||||
<i-frame [url]="mapUrl"width="100%" height="900"></i-frame>
|
||||
</div>
|
||||
<deposit [compatibility]="'openaire____::47ce9e9f4fad46e732cff06419ecaabb||OpenDOAR'" [requestFor]="'Publications'" [mapUrl]=mapUrl></deposit>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,6 @@ import { DepositPublicationsComponent } from './depositPublications.component';
|
|||
|
||||
import {DepositPublicationsRoutingModule} from './depositPublications-routing.module';
|
||||
import {DepoditModule} from '../deposit.module';
|
||||
import {IFrameModule} from '../../utils/iframe.module';
|
||||
import {FreeGuard} from'../../login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
@ -14,12 +13,10 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
|||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
DepoditModule,
|
||||
DepositPublicationsRoutingModule,IFrameModule
|
||||
DepositPublicationsRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositPublicationsComponent,
|
||||
|
||||
DepositPublicationsComponent
|
||||
],
|
||||
exports: [
|
||||
DepositPublicationsComponent,
|
||||
|
|
|
@ -16,12 +16,10 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
|
|||
DepositPublicationsResultRoutingModule
|
||||
],
|
||||
declarations: [
|
||||
|
||||
DepositPublicationsResultComponent,
|
||||
|
||||
DepositPublicationsResultComponent
|
||||
],
|
||||
exports: [
|
||||
DepositPublicationsResultComponent,
|
||||
DepositPublicationsResultComponent
|
||||
],
|
||||
providers: [FreeGuard,PreviousRouteRecorder
|
||||
]
|
||||
|
|
|
@ -83,6 +83,7 @@ import {PiwikService} from '../utils/piwik/piwik.service';
|
|||
</div>
|
||||
|
||||
<div class="tm-main uk-container" style="min-height:200px">
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
|
||||
`
|
||||
|
|
|
@ -17,6 +17,7 @@ import {FreeGuard} from'../login/freeGuard.guard';
|
|||
import {PiwikServiceModule} from '../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from '../utils/piwik/previousRouteRecorder.guard';
|
||||
import {RefineFieldResultsServiceModule} from '../services/refineFieldResultsService.module';
|
||||
import {HelperModule} from '../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -27,7 +28,8 @@ import {RefineFieldResultsServiceModule} from '../services/refineFieldResultsSer
|
|||
OrganizationsServiceModule,
|
||||
SearchFormModule,
|
||||
PiwikServiceModule,
|
||||
HomeRoutingModule
|
||||
HomeRoutingModule,
|
||||
HelperModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -34,16 +34,28 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
(queryChange)="queryChanged($event)"
|
||||
[isDisabled]="disableForms">
|
||||
</advanced-search-form>
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>
|
||||
|
||||
<div>
|
||||
<div class="uk-width-1-1 uk-grid helper-grid" >
|
||||
|
||||
|
||||
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>
|
||||
<div class="uk-width-expand uk-padding-remove-left">
|
||||
<search-result [results]="results"
|
||||
[status]=searchUtils.status
|
||||
[type]="entityType" [urlParam]="urlParam"
|
||||
[showLoading]="true">
|
||||
</search-result>
|
||||
</div>
|
||||
<helper position="right" styleName=" uk-width-1-5"></helper>
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,10 +13,11 @@ import{SearchPagingModule} from './searchPaging.module';
|
|||
import {AdvancedSearchFormModule} from '../searchUtils/advancedSearchForm.module';
|
||||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, AdvancedSearchFormModule, SearchDownloadModule, PiwikServiceModule
|
||||
CommonModule, FormsModule, RouterModule, SearchResultsModule, LoadingModalModule, ReportsServiceModule, SearchPagingModule, AdvancedSearchFormModule, SearchDownloadModule, PiwikServiceModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
AdvancedSearchPageComponent,
|
||||
|
|
|
@ -63,6 +63,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-container">
|
||||
<helper position="top"></helper>
|
||||
<div [class]="(showRefine)?'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-align-center uk-margin-remove-bottom':'uk-width-1-1'">
|
||||
<div *ngIf="showRefine" class="uk-offcanvas-content uk-hidden@m">
|
||||
|
||||
|
@ -83,11 +84,12 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
</div>
|
||||
<div class="uk-grid uk-width-1-1 uk-margin">
|
||||
<div *ngIf="showRefine" class=" search-filters uk-width-1-5@l uk-width-1-5@m uk-width-1-1@s uk-visible@m">
|
||||
<helper position="left"></helper>
|
||||
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
|
||||
</div>
|
||||
|
||||
<!--div [class]="(showRefine)?'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-first-column':''" -->
|
||||
<div [class]="(showRefine)?'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-first-column':''" >
|
||||
<div [class]="(showRefine)?'uk-width-expand@m uk-first-column':''" >
|
||||
|
||||
<search-result *ngIf="!tableView"
|
||||
[results]="results"
|
||||
|
@ -107,14 +109,18 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
|
||||
</span>
|
||||
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults"></search-download>
|
||||
<helper position="right"></helper>
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="!(tableViewLink || searchUtils.totalResults <=10000)" class=" search-filters uk-width-1-5@l uk-width-1-5@m uk-width-1-1@s uk-visible@m">
|
||||
<helper position="right"></helper>
|
||||
</div>
|
||||
<div [class]="(showRefine)?'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-align-center uk-margin-remove-bottom':'uk-width-1-1'">
|
||||
<search-paging [type]="type" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,13 +17,14 @@ import {SearchDownloadModule} from './searchDownload.module';
|
|||
import {ModalModule} from '../../utils/modal/modal.module';
|
||||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,RouterModule, SearchFormModule, SearchResultsModule,
|
||||
LoadingModalModule, ReportsServiceModule,
|
||||
SearchPagingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule
|
||||
SearchPagingModule, SearchDownloadModule, ModalModule, SearchFilterModule, PiwikServiceModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
SearchPageComponent
|
||||
|
|
|
@ -58,7 +58,9 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img src="./assets/loading.gif" class="uk-align-center" alt="Loading">
|
||||
</div>
|
||||
<div class="uk-grid uk-width-1-1 uk-margin">
|
||||
|
||||
<div class="uk-width-1-1">
|
||||
<helper position="top"></helper>
|
||||
</div>
|
||||
<div *ngIf="searchUtils.totalResults > 0" class="uk-offcanvas-content uk-hidden@m">
|
||||
|
||||
<a href="#offcanvas-usage" uk-toggle><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="6" y="4" width="12" height="1"></rect><rect x="6" y="9" width="12" height="1"></rect><rect x="6" y="14" width="12" height="1"></rect><rect x="2" y="4" width="2" height="1"></rect><rect x="2" y="9" width="2" height="1"></rect><rect x="2" y="14" width="2" height="1"></rect></svg></a>
|
||||
|
@ -73,6 +75,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
|
||||
</div>
|
||||
<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 uk-visible@m">
|
||||
<helper position="left"></helper>
|
||||
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
|
||||
</div>
|
||||
|
||||
|
@ -175,6 +178,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<helper position="bottom"></helper>
|
||||
</div>
|
||||
|
||||
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
|
||||
|
|
|
@ -22,10 +22,12 @@ import {ContentProvidersDatatablePipe} from '../../utils/pipes/contentProvidersD
|
|||
import {PiwikServiceModule} from '../../utils/piwik/piwikService.module';
|
||||
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
import {HelperModule} from '../../utils/helper/helper.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,RouterModule, SearchFormModule, SearchResultsModule, LoadingModalModule,
|
||||
ReportsServiceModule, SearchPagingModule, SearchDownloadModule, ModalModule, PagingModule, DataTableModule, SearchFilterModule, PiwikServiceModule
|
||||
ReportsServiceModule, SearchPagingModule, SearchDownloadModule, ModalModule, PagingModule, DataTableModule, SearchFilterModule, PiwikServiceModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
SearchPageTableViewComponent//,
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import 'rxjs/Rx';
|
||||
import {HelperService} from './helper.service';
|
||||
import {OpenaireProperties} from '../properties/openaireProperties';
|
||||
|
||||
@Component({
|
||||
selector: 'helper',
|
||||
template: `
|
||||
|
||||
<div *ngIf=" texts && texts.length > 0" [ngClass]=styleName>
|
||||
<div *ngFor="let text of texts " [innerHTML]="text.content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
`
|
||||
})
|
||||
export class HelperComponent {
|
||||
texts=[];
|
||||
@Input() style:boolean = false;
|
||||
@Input() position:string = 'right';
|
||||
@Input() styleName:string = '';
|
||||
sub:any;
|
||||
|
||||
constructor (
|
||||
private _service: HelperService
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(OpenaireProperties.isHelperEnabled() && location){
|
||||
this.sub = this._service.getHelper(location.pathname).subscribe(
|
||||
data => {
|
||||
this.texts =(data && data.content && data.content[this.position] )? data.content[this.position]:[];
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
// import { RouterModule } from "@angular/router";
|
||||
|
||||
import {HelperComponent} from './helper.component';
|
||||
// import {HelperServiceModule} from './helperService.module';
|
||||
import {HelperService} from './helper.service';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
// RouterModule//,HelperServiceModule
|
||||
],
|
||||
declarations: [
|
||||
HelperComponent
|
||||
],
|
||||
providers:[HelperService],
|
||||
exports: [
|
||||
HelperComponent
|
||||
]
|
||||
})
|
||||
export class HelperModule{ }
|
|
@ -0,0 +1,32 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {Http, Response} from '@angular/http';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import { CacheService } from '../../shared/cache.service';
|
||||
import { OpenaireProperties } from '../../utils/properties/openaireProperties';
|
||||
|
||||
@Injectable()
|
||||
export class HelperService {
|
||||
constructor(private http: Http, public _cache: CacheService) {}
|
||||
|
||||
getHelper (router: string):any {
|
||||
console.info("get router helpText for : "+router);
|
||||
|
||||
let url = OpenaireProperties.getHelperPageUrl() + '?q=' + router;
|
||||
let key = url;
|
||||
if (this._cache.has(key)) {
|
||||
return Observable.of(this._cache.get(key)).map(res => <any> res);
|
||||
}
|
||||
return this.http.get(url)
|
||||
.map(res => <any> res.json())
|
||||
.do(res => {
|
||||
this._cache.set(key, res);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import {HelperService} from './helper.service';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule
|
||||
],
|
||||
declarations: [
|
||||
],
|
||||
providers:[
|
||||
HelperService
|
||||
],
|
||||
exports: [
|
||||
]
|
||||
})
|
||||
export class HelperServiceModule { }
|
|
@ -104,6 +104,9 @@ export class OpenaireProperties {
|
|||
|
||||
private static feedbackmail ="openaire.test@gmail.com";
|
||||
|
||||
private static helperPageUrl ="http://scoobydoo.di.uoa.gr:16000/api/page/route";
|
||||
private static enableHelper:boolean = false;
|
||||
|
||||
public static getBaseLink():string{
|
||||
return this.baseLink;
|
||||
}
|
||||
|
@ -356,6 +359,13 @@ export class OpenaireProperties {
|
|||
public static getFeedbackMail():string{
|
||||
return this.feedbackmail;
|
||||
}
|
||||
public static getHelperPageUrl():string{
|
||||
return this.helperPageUrl;
|
||||
}
|
||||
public static isHelperEnabled():boolean{
|
||||
return this.enableHelper;
|
||||
}
|
||||
|
||||
}
|
||||
export class ErrorCodes {
|
||||
public LOADING = 0;
|
||||
|
|
|
@ -482,3 +482,7 @@ h2, .uk-h2{
|
|||
}
|
||||
|
||||
.tm-toolbar .uk-subnav-line li:hover {display: block;} // remove the others
|
||||
|
||||
.helper-grid > * {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue