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:
argiro.kokogiannaki 2017-09-15 11:51:38 +00:00
parent 00e6d479e9
commit 41c97cf410
32 changed files with 685 additions and 450 deletions

View File

@ -35,6 +35,7 @@ export class XLargeDirective {
<div class="custom-main-content" >
<main>
<router-outlet></router-outlet>
</main>
</div>
<!--/div>

View File

@ -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 },

View File

@ -1,5 +1,11 @@
<form class="">
<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="">
<div class="-row">
@ -20,8 +26,8 @@
Context </label>
</div>
</form>
<div class="searchPaging uk-panel uk-margin-top" data-uk-grid-margin="">
</form>
<div class="searchPaging uk-panel uk-margin-top" data-uk-grid-margin="">
<div *ngIf="resultsNum" class="uk-float-right">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size" (pageChange)="pageChange($event)"> </paging-no-load>
@ -36,7 +42,7 @@
<span >Showing {{(size*page - size +1)}} to {{(size*page>resultsNum)?resultsNum:(size*page)}} of {{resultsNum}} claims </span>
</div>
</div>
</div>
<div *ngIf="showErrorMessage " class = "uk-alert uk-alert-danger " >
@ -50,8 +56,8 @@
</div>
<!-- Buttons for selecting and Delete Claims -->
<div *ngIf="enableDelete">
<!-- Buttons for selecting and Delete Claims -->
<div *ngIf="enableDelete">
<div *ngIf="selected.length>0 && resultsNum > 0 ">
<div class = "uk-alert uk-alert-primary " >
You have selected {{selected.length}} claim(s)
@ -61,16 +67,16 @@
</div>
<button class=" uk-button uk-button-default" (click)="confirmOpen()"> <span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="trash" ratio="1"><polyline fill="none" stroke="#000" points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7" width="1" height="9"></rect><rect x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span> Delete</button>
</div>
<br>
</div>
<br>
<div *ngIf=" claims && claims.length == 0" >
<div *ngIf=" claims && claims.length == 0" >
<div class = "uk-alert uk-alert-primary " >No entries found.</div>
</div>
</div>
<div class="">
<table *ngIf="claims && claims.length > 0" class="uk-table uk-table-striped">
<div class="">
<table *ngIf="claims && claims.length > 0" class="uk-table uk-table-striped">
<thead>
<tr>
<th *ngIf="enableDelete"><input id="checkAll" type="checkbox" (click)="selectAll($event)" [ngModel]="selected.length==claims.length" /></th>
@ -94,7 +100,11 @@
<td>{{claim.date}}</td>
</tr>
</tbody>
</table>
</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>

View File

@ -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
]

View File

@ -18,20 +18,26 @@ import { Meta} from '../../../angular2-meta';
<div class="uk-article-title">
Link
</div>
<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">
<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">
<a class="uk-float-right" uk-toggle="target: #linkingInfo; animation: uk-animation-fade"><span class="uk-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span> More Information </a>
</div>
<div id="linkingInfo" class="uk-card uk-card-default uk-card-body uk-margin-small" hidden>
</div>
<div id="linkingInfo" class="uk-card uk-card-default uk-card-body uk-margin-small" hidden>
<a uk-toggle="target: #linkingInfo; animation: uk-animation-fade" class="uk-float-right"><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></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></a>
<div class="uk-text-bold"><span class="uk-icon">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</span> Linking Functionality:</div>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" icon="info" ratio="1"><path d="M12.13,11.59 C11.97,12.84 10.35,14.12 9.1,14.16 C6.17,14.2 9.89,9.46 8.74,8.37 C9.3,8.16 10.62,7.83 10.62,8.81 C10.62,9.63 10.12,10.55 9.88,11.32 C8.66,15.16 12.13,11.15 12.14,11.18 C12.16,11.21 12.16,11.35 12.13,11.59 C12.08,11.95 12.16,11.35 12.13,11.59 L12.13,11.59 Z M11.56,5.67 C11.56,6.67 9.36,7.15 9.36,6.03 C9.36,5 11.56,4.54 11.56,5.67 L11.56,5.67 Z"></path><circle fill="none" stroke="#000" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
</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'"><span class="uk-text-bold">Projects:</span> Search & add projects using keyword search. Limit the search space by specifying project Funder. </p>
@ -69,7 +75,7 @@ import { Meta} from '../../../angular2-meta';
</div>
<hr>
<!-- search for entity -->
<!-- search for entity -->
<div class = "uk-margin-top">
@ -97,7 +103,11 @@ import { Meta} from '../../../angular2-meta';
<li *ngIf="show != 'claim'"(click)="show='claim';" class="uk-margin-auto-left uk-width-1-1"><a>Next <span class="uk-margin-small-left" uk-pagination-next></span></a></li>
</ul>
</div>
</div>
</div>
<helper position="right" styleName=" uk-width-1-5"></helper>
</div>
<helper position="bottom"></helper>
</div>
</div>
</div>
</div>

View File

@ -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
],

View File

@ -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>

View File

@ -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: [

View File

@ -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

View File

@ -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 ]
})

View File

@ -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>

View File

@ -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
]

View File

@ -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 OpenAIREs 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";

View File

@ -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,

View File

@ -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>
@ -66,8 +68,8 @@ import {PiwikService} from '../utils/piwik/piwik.service';
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
</span>
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
</span>
</a-->
<a [queryParams]="routerHelper.createQueryParams(['organizationId', 'or'], [organizationId, 'and'])"
@ -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>

View File

@ -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>

View File

@ -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,

View File

@ -16,12 +16,10 @@ import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.gua
DepositPublicationsResultRoutingModule
],
declarations: [
DepositPublicationsResultComponent,
DepositPublicationsResultComponent
],
exports: [
DepositPublicationsResultComponent,
DepositPublicationsResultComponent
],
providers: [FreeGuard,PreviousRouteRecorder
]

View File

@ -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>
`

View File

@ -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: [

View File

@ -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>

View File

@ -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,

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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//,

View File

@ -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();
}
}
}

View File

@ -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{ }

View File

@ -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);
});
}
}

View File

@ -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 { }

View File

@ -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;

View File

@ -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;
}