Use openairelib as an svn external subfolder| make the corresponding changes

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50763 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-02-15 11:12:55 +00:00
parent 8bdf178099
commit 2f7d91409a
72 changed files with 255 additions and 790 deletions

View File

@ -1,9 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
import {EnvironmentSpecificResolver, EnvironmentSpecificService} from 'ng-openaire-library'; import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, ErrorModule} from 'ng-openaire-library';
import { OpenaireErrorPageComponent } from './error/errorPage.component'; import { OpenaireErrorPageComponent } from './error/errorPage.component';

View File

@ -2,7 +2,9 @@ import { Component, Directive, ElementRef, Renderer, ChangeDetectionStrategy, Vi
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {MenuItem, RootMenuItem, EnvironmentSpecificService, EnvProperties} from 'ng-openaire-library'; import { EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import{MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
@Component({ @Component({

View File

@ -8,7 +8,15 @@ import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, ErrorModule, EnvironmentSpecificResolver} from 'ng-openaire-library';
import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module';
import { CookieLawModule } from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
import {FeedbackModule} from './openaireLibrary/sharedComponents/feedback/feedback.module';
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
import { ErrorModule} from './openaireLibrary/error/error.module';
import { OpenaireErrorPageComponent } from './error/errorPage.component'; import { OpenaireErrorPageComponent } from './error/errorPage.component';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';

View File

@ -1,7 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireClaimsAdminComponent } from './claimsAdmin.component'; import { OpenaireClaimsAdminComponent } from './claimsAdmin.component';
import{ PreviousRouteRecorder, IsRouteEnabled ,AdminLoginGuard} from 'ng-openaire-library'; import{ AdminLoginGuard} from '../../openaireLibrary/login/adminLoginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -3,7 +3,11 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { OpenaireClaimsAdminComponent } from './claimsAdmin.component'; import { OpenaireClaimsAdminComponent } from './claimsAdmin.component';
import { ClaimsAdminRoutingModule } from './claimsAdmin-routing.module'; import { ClaimsAdminRoutingModule } from './claimsAdmin-routing.module';
import{ClaimsAdminModule, PreviousRouteRecorder, IsRouteEnabled ,AdminLoginGuard} from 'ng-openaire-library'; import{ClaimsAdminModule } from '../../openaireLibrary/claims/claimsAdmin/claimsAdmin.module';
import {AdminLoginGuard} from '../../openaireLibrary/login/adminLoginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -1,7 +1,11 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireClaimsByTokenComponent } from './claimsByToken.component'; import { OpenaireClaimsByTokenComponent } from './claimsByToken.component';
import{ PreviousRouteRecorder, IsRouteEnabled ,LoginGuard} from 'ng-openaire-library';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,7 +3,9 @@ import { RouterModule } from '@angular/router';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { OpenaireClaimsByTokenComponent } from './claimsByToken.component'; import { OpenaireClaimsByTokenComponent } from './claimsByToken.component';
//ClaimsByTokenModule, //ClaimsByTokenModule,
import{ PreviousRouteRecorder, IsRouteEnabled ,LoginGuard} from 'ng-openaire-library'; import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDirectLinkingComponent } from './directLinking.component'; import { OpenaireDirectLinkingComponent } from './directLinking.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library'; import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,8 +2,11 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { OpenaireDirectLinkingComponent } from './directLinking.component'; import { OpenaireDirectLinkingComponent } from './directLinking.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard, DirectLinkingModule} from 'ng-openaire-library'; import{ DirectLinkingModule} from '../../openaireLibrary/claims/directLinking/directLinking.module';
import {DirectLinkingRoutingModule} from './directLinking-routing.module'; import {DirectLinkingRoutingModule} from './directLinking-routing.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireLinkingComponent } from './linkingGeneric.component'; import { OpenaireLinkingComponent } from './linkingGeneric.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library'; import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,7 +3,10 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import {OpenaireLinkingComponent} from './linkingGeneric.component'; import {OpenaireLinkingComponent} from './linkingGeneric.component';
import {LinkingRoutingModule} from './linking-routing.module'; import {LinkingRoutingModule} from './linking-routing.module';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard, LinkingGenericModule} from 'ng-openaire-library'; import{ LinkingGenericModule} from '../../openaireLibrary/claims/linking/linkingGeneric.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {OpenaireMyClaimsComponent } from './myClaims.component'; import {OpenaireMyClaimsComponent } from './myClaims.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library'; import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,7 +3,10 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { OpenaireMyClaimsComponent } from './myClaims.component'; import { OpenaireMyClaimsComponent } from './myClaims.component';
import { MyClaimsRoutingModule } from './myClaims-routing.module'; import { MyClaimsRoutingModule } from './myClaims-routing.module';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard, MyClaimsModule} from 'ng-openaire-library'; import{ MyClaimsModule} from '../../openaireLibrary/claims/myClaims/myClaims.module';
import {LoginGuard} from '../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{CommunitiesComponent} from './communities.component'; import{CommunitiesComponent} from './communities.component';
import {FreeGuard,PreviousRouteRecorder} from 'ng-openaire-library';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,10 +3,12 @@ import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
import "rxjs/add/observable/zip"; import "rxjs/add/observable/zip";
import { Meta, MetaDefinition, ConfigurationService, EnvProperties} from 'ng-openaire-library'; import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import { ErrorCodes, RouterHelper, PiwikService} from 'ng-openaire-library';
import {Properties} from '../utils/properties'; import {Properties} from '../utils/properties';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
@Component({ @Component({
@ -48,7 +50,7 @@ properties:EnvProperties;
var url = data.envSpecific.baseLink+this._router.url var url = data.envSpecific.baseLink+this._router.url
this._meta.updateProperty("og:url", url); this._meta.updateProperty("og:url", url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE").subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE").subscribe();
} }
}); });

View File

@ -5,11 +5,14 @@ import { RouterModule } from '@angular/router';
import{CommunitiesRoutingModule} from './communities-routing.module'; import{CommunitiesRoutingModule} from './communities-routing.module';
import{CommunitiesComponent} from './communities.component'; import{CommunitiesComponent} from './communities.component';
import {PiwikService} from 'ng-openaire-library';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta, ConfigurationService, FreeGuard, PreviousRouteRecorder,} from 'ng-openaire-library'; import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,

View File

@ -2,7 +2,8 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{CommunityComponent} from './community.component'; import{CommunityComponent} from './community.component';
import {FreeGuard,PreviousRouteRecorder} from 'ng-openaire-library'; import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,11 +3,14 @@ import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
import "rxjs/add/observable/zip"; import "rxjs/add/observable/zip";
import { Meta, MetaDefinition, ConfigurationService} from 'ng-openaire-library'; import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import { ErrorCodes, RouterHelper, PiwikService, EnvProperties} from 'ng-openaire-library';
import {Properties} from '../utils/properties'; import {Properties} from '../utils/properties';
import {CommunityService} from "./community.service"; import {CommunityService} from "./community.service";
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
//import { PublicationInfo } from '../../publicationInfo'; //import { PublicationInfo } from '../../publicationInfo';
@ -21,9 +24,9 @@ export class CommunityComponent {
public pageTitle = "OpenAIRE" public pageTitle = "OpenAIRE"
public publications=[]; public publications;
public reasearchData=[]; public reasearchData;
public software=[]; public software;
public publicationsInfo=[]; public publicationsInfo=[];
public researchDataInfo=[]; public researchDataInfo=[];
public softwareInfo=[]; public softwareInfo=[];
@ -60,7 +63,7 @@ export class CommunityComponent {
var url = data.envSpecific.baseLink+this._router.url var url = data.envSpecific.baseLink+this._router.url
this._meta.updateProperty("og:url", url); this._meta.updateProperty("og:url", url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE").subscribe(); this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE").subscribe();
} }
}); });

View File

@ -5,10 +5,13 @@ import { RouterModule } from '@angular/router';
import{CommunityRoutingModule} from './community-routing.module'; import{CommunityRoutingModule} from './community-routing.module';
import{CommunityComponent} from './community.component'; import{CommunityComponent} from './community.component';
import {PiwikService} from 'ng-openaire-library'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {Meta, ConfigurationService, FreeGuard, PreviousRouteRecorder,} from 'ng-openaire-library';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,

View File

@ -1,17 +0,0 @@
import {Component, Input} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import { Router } from '@angular/router';
@Component({
selector: 'openaire-deposit-by-subject',
template: `
<deposit-by-subject>
</deposit-by-subject>
`
})
export class OpenaireDepositBySubjectComponent {
}

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDepositBySubjectResultComponent } from './depositBySubjectResult.component'; import { OpenaireDepositBySubjectResultComponent } from './depositBySubjectResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -5,8 +5,10 @@ import { FormsModule } from '@angular/forms';
import { OpenaireDepositBySubjectResultComponent } from './depositBySubjectResult.component'; import { OpenaireDepositBySubjectResultComponent } from './depositBySubjectResult.component';
import {DepositBySubjectResultsRoutingModule} from './depositBySubjectResult-routing.module'; import {DepositBySubjectResultsRoutingModule} from './depositBySubjectResult-routing.module';
import {DepositBySubjectResultsModule, FreeGuard,PreviousRouteRecorder,IsRouteEnabled } from 'ng-openaire-library'; import {DepositBySubjectResultsModule } from '../../openaireLibrary/deposit/datasets/depositBySubjectResults.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,8 +2,10 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDepositDatasetsComponent } from './depositDatasets.component'; import { OpenaireDepositDatasetsComponent } from './depositDatasets.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([

View File

@ -4,8 +4,10 @@ import { FormsModule } from '@angular/forms';
import { OpenaireDepositDatasetsComponent } from './depositDatasets.component'; import { OpenaireDepositDatasetsComponent } from './depositDatasets.component';
import {DepositDatasetsRoutingModule} from './depositDatasets-routing.module'; import {DepositDatasetsRoutingModule} from './depositDatasets-routing.module';
import {DepositDatasetsModule, FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {DepositDatasetsModule} from '../../openaireLibrary/deposit/datasets/depositDatasets.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,

View File

@ -1,7 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDepositDatasetsResultComponent } from './depositDatasetsResult.component'; import { OpenaireDepositDatasetsResultComponent } from './depositDatasetsResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -5,8 +5,10 @@ import { FormsModule } from '@angular/forms';
import { OpenaireDepositDatasetsResultComponent } from './depositDatasetsResult.component'; import { OpenaireDepositDatasetsResultComponent } from './depositDatasetsResult.component';
import {DepositDatasetsResultsRoutingModule} from './depositDatasetsResults-routing.module'; import {DepositDatasetsResultsRoutingModule} from './depositDatasetsResults-routing.module';
import {DepositDatasetsResultsModule, FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {DepositDatasetsResultsModule} from '../../openaireLibrary/deposit/datasets/depositDatasetsResults.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -1,7 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDepositPublicationsComponent } from './depositPublications.component'; import { OpenaireDepositPublicationsComponent } from './depositPublications.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -5,8 +5,10 @@ import { FormsModule } from '@angular/forms';
import { OpenaireDepositPublicationsComponent } from './depositPublications.component'; import { OpenaireDepositPublicationsComponent } from './depositPublications.component';
import {DepositPublicationsRoutingModule} from './depositPublications-routing.module'; import {DepositPublicationsRoutingModule} from './depositPublications-routing.module';
import {DepositPublicationsModule, FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {DepositPublicationsModule} from '../../openaireLibrary/deposit/publications/depositPublications.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,

View File

@ -1,7 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDepositPublicationsResultComponent } from './depositPublicationsResult.component'; import { OpenaireDepositPublicationsResultComponent } from './depositPublicationsResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -5,8 +5,10 @@ import { FormsModule } from '@angular/forms';
import { OpenaireDepositPublicationsResultComponent } from './depositPublicationsResult.component'; import { OpenaireDepositPublicationsResultComponent } from './depositPublicationsResult.component';
import {DepositPublicationsResultRoutingModule} from './depositPublicationsResult-routing.module'; import {DepositPublicationsResultRoutingModule} from './depositPublicationsResult-routing.module';
import {DepositPublicationsResultsModule, FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library'; import {DepositPublicationsResultsModule} from '../../openaireLibrary/deposit/publications/depositPublicationsResults.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDataProviderComponent } from './dataProvider.component'; import { OpenaireDataProviderComponent } from './dataProvider.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,11 +2,12 @@
import { NgModule} from '@angular/core'; import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { DataProviderModule } from 'ng-openaire-library'; import { DataProviderModule } from '../../openaireLibrary/landingPages/dataProvider/dataProvider.module';
import { OpenaireDataProviderComponent } from './dataProvider.component'; import { OpenaireDataProviderComponent } from './dataProvider.component';
import {DataProviderRoutingModule} from './dataProvider-routing.module'; import {DataProviderRoutingModule} from './dataProvider-routing.module';
import { FreeGuard, PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [DataProviderModule, DataProviderRoutingModule], imports: [DataProviderModule, DataProviderRoutingModule],

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireDatasetComponent } from './dataset.component'; import { OpenaireDatasetComponent } from './dataset.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -4,9 +4,11 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { DatasetModule, FreeGuard, PreviousRouteRecorder, IsRouteEnabled } from 'ng-openaire-library'; import { DatasetModule } from '../../openaireLibrary/landingPages/dataset/dataset.module';
import { OpenaireDatasetComponent } from './dataset.component'; import { OpenaireDatasetComponent } from './dataset.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {DatasetRoutingModule} from './dataset-routing.module'; import {DatasetRoutingModule} from './dataset-routing.module';
@NgModule({ @NgModule({
imports: [DatasetModule, DatasetRoutingModule], imports: [DatasetModule, DatasetRoutingModule],

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component'; import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([

View File

@ -4,8 +4,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { HtmlProjectReportModule , FreeGuard, PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import { HtmlProjectReportModule } from '../../openaireLibrary/landingPages/htmlProjectReport/htmlProjectReport.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component'; import { OpenaireHtmlProjectReportComponent } from './htmlProjectReport.component';
import {HtmlProjectReportRoutingModule} from './htmlProjectReport-routing.module'; import {HtmlProjectReportRoutingModule} from './htmlProjectReport-routing.module';

View File

@ -4,8 +4,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OrganizationModule, FreeGuard, PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import { OrganizationModule } from '../../openaireLibrary/landingPages/organization/organization.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import { OpenaireOrganizationComponent } from './organization.component'; import { OpenaireOrganizationComponent } from './organization.component';
import {OrganizationRoutingModule} from './organization-routing.module'; import {OrganizationRoutingModule} from './organization-routing.module';

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireOrganizationComponent } from './organization.component'; import { OpenaireOrganizationComponent } from './organization.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -4,8 +4,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { ProjectModule, FreeGuard, PreviousRouteRecorder, IsRouteEnabled } from 'ng-openaire-library'; import { ProjectModule } from '../../openaireLibrary/landingPages/project/project.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import { OpenaireProjectComponent } from './project.component'; import { OpenaireProjectComponent } from './project.component';
import {ProjectRoutingModule} from './project-routing.module'; import {ProjectRoutingModule} from './project-routing.module';

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { OpenaireProjectComponent } from './project.component'; import { OpenaireProjectComponent } from './project.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -4,8 +4,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { PublicationModule, FreeGuard, PreviousRouteRecorder, IsRouteEnabled } from 'ng-openaire-library'; import { PublicationModule } from '../../openaireLibrary/landingPages/publication/publication.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import { OpenairePublicationComponent } from './publication.component'; import { OpenairePublicationComponent } from './publication.component';
import {PublicationRoutingModule} from './publication-routing.module'; import {PublicationRoutingModule} from './publication-routing.module';

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {OpenairePublicationComponent } from './publication.component'; import {OpenairePublicationComponent } from './publication.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -4,8 +4,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { SoftwareModule, FreeGuard, PreviousRouteRecorder, IsRouteEnabled } from 'ng-openaire-library'; import { SoftwareModule } from '../../openaireLibrary/landingPages/software/software.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
import { OpenaireSoftwareComponent } from './software.component'; import { OpenaireSoftwareComponent } from './software.component';
import {SoftwareRoutingModule} from './software-routing.module'; import {SoftwareRoutingModule} from './software-routing.module';
@NgModule({ @NgModule({

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {OpenaireSoftwareComponent } from './software.component'; import {OpenaireSoftwareComponent } from './software.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -4,7 +4,9 @@ import { FormsModule } from '@angular/forms';
import {OpenaireUserComponent } from './user.component'; import {OpenaireUserComponent } from './user.component';
import { UserRoutingModule } from './user-routing.module'; import { UserRoutingModule } from './user-routing.module';
import {PreviousRouteRecorder, UserModule} from 'ng-openaire-library'; import { UserModule} from '../openaireLibrary/login/user.module';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {OpenaireUserComponent } from './user.component'; import {OpenaireUserComponent } from './user.component';
import {PreviousRouteRecorder} from 'ng-openaire-library'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,8 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{CommunitiesComponent} from './communities.component'; import{CommunitiesComponent} from './communities.component';
import {FreeGuard,PreviousRouteRecorder} from 'ng-openaire-library'; import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -3,10 +3,13 @@ import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Location} from '@angular/common'; import {Location} from '@angular/common';
import "rxjs/add/observable/zip"; import "rxjs/add/observable/zip";
import { Meta, MetaDefinition, ConfigurationService} from 'ng-openaire-library'; import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import { ErrorCodes, RouterHelper, PiwikService, EnvProperties} from 'ng-openaire-library'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Properties} from '../utils/properties'; import {Properties} from '../utils/properties';
import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
@Component({ @Component({
@ -29,9 +32,9 @@ properties:EnvProperties;
) { ) {
var description = "open access, research, scientific publication, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects "; var description = "open access, research, research community, European Commission, EC, FP7, ERC, Horizon 2020, H2020, search, projects ";
var title = "OpenAIRE"; var title = "OpenAIRE Connect";
this._meta.setTitle(title); this._meta.setTitle(title);
this._meta.updateMeta("description", description); this._meta.updateMeta("description", description);
@ -49,7 +52,7 @@ properties:EnvProperties;
var url = data.envSpecific.baseLink+this._router.url var url = data.envSpecific.baseLink+this._router.url
this._meta.updateProperty("og:url", url); this._meta.updateProperty("og:url", url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE").subscribe(); this.piwiksub = this._piwikService.trackView(this.properties,"OpenAIRE").subscribe();
} }
}); });

View File

@ -5,11 +5,13 @@ import { RouterModule } from '@angular/router';
import{CommunitiesRoutingModule} from './communities-routing.module'; import{CommunitiesRoutingModule} from './communities-routing.module';
import{CommunitiesComponent} from './communities.component'; import{CommunitiesComponent} from './communities.component';
import {PiwikService} from 'ng-openaire-library'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {Meta, ConfigurationService, FreeGuard, PreviousRouteRecorder,} from 'ng-openaire-library'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, RouterModule, CommonModule, FormsModule, RouterModule,

View File

@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{ReloadModule} from 'ng-openaire-library'; import{ReloadModule} from '../openaireLibrary/reload/reload.module';
@NgModule({ @NgModule({

View File

@ -2,9 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([

View File

@ -6,7 +6,10 @@ import{ AdvancedSearchDatasetsRoutingModule} from './advancedSearchDatasets-rout
import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component';
import {AdvancedSearchDatasetsModule,FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {AdvancedSearchDatasetsModule } from '../../openaireLibrary/searchPages/advanced/advancedSearchDatasets.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -6,7 +6,10 @@ import{ AdvancedSearchPublicationsRoutingModule} from './advancedSearchPublicati
import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component';
import {AdvancedSearchPublicationsModule, FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {AdvancedSearchPublicationsModule } from '../../openaireLibrary/searchPages/advanced/advancedSearchPublications.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -6,7 +6,10 @@ import{ AdvancedSearchSoftwareRoutingModule} from './advancedSearchSoftware-rout
import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component';
import {AdvancedSearchSoftwareModule, FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {AdvancedSearchSoftwareModule } from '../../openaireLibrary/searchPages/advanced/advancedSearchSoftware.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -4,7 +4,7 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {MainSearchModule} from 'ng-openaire-library'; import {MainSearchModule} from '../../openaireLibrary/searchPages/find/mainSearch.module';
import { OpenaireSearchComponent } from './search.component'; import { OpenaireSearchComponent } from './search.component';
import { MainSearchRoutingModule } from './mainSearch-routing.module'; import { MainSearchRoutingModule } from './mainSearch-routing.module';

View File

@ -1,186 +0,0 @@
<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-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 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>
</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>
<span *ngIf="!end">, </span>
</span>
</span>
</span>
<a (click)="clearFilters()" [class]="(disableForms)?'uk-disabled uk-link-muted':''">
Clear All
</a>
</div>
</div>
</div>
</div>
<div class="uk-container">
<helper position="top"></helper>
<div class="uk-width-2-3@m uk-width-2-3@l uk-width-1-1@s">
<div 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>
<div id="offcanvas-usage" uk-offcanvas>
<div class="uk-offcanvas-bar">
<button class="uk-offcanvas-close" type="button" uk-close></button>
<div class="uk-text-large">Filter By:</div>
<search-filter *ngFor="let filter of filters " [addShowMore]=false [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
</div>
</div>
</div>
</div>
<div class="uk-grid uk-width-1-1">
<div class="helper-left-right search-filters uk-width-1-6@m 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="uk-width-expand@m uk-width-1-1@s uk-first-column custom-dataTable-content" >
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
<div class="searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom">
<span class="uk-h6 uk-width-1-1@s uk-width-1-2@m">
{{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
</span>
<span class="float-children-right-at-medium margin-small-top-at-small uk-width-1-1@s uk-width-1-2@m">
<paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
</span>
</div>
</div>
<div *ngIf="searchViewLink" class="uk-width-1-1@s uk-hidden@m">
<p>
<span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
<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="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>
</a>
</p>
</div>
<div *ngIf="searchUtils.totalResults <= 0" class="errors-in-searchTableView">
<errorMessages [status]="[searchUtils.status]" [type]="'results'"></errorMessages>
</div>
<div class="uk-overflow-container ">
<!-- #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
[mfData]="results | contentProvidersDatatable : [searchUtils, filters, triggerPipe, cd]"
dtInstance="dtInstanceCallback"
-->
<table datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions" id="dpTable" [dtTrigger]="dtTrigger" >
<thead >
<tr>
<!-- Name Type Country Institution Compatibility -->
<th class="uk-text-left">Name
<!--svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<polygon fill="#767779" points="4 1 1 6 7 6"></polygon>
<polygon fill="#767779" points="4 13 1 8 7 8"></polygon>
</svg-->
</th>
<th class="uk-text-center"> Type
</th>
<th class="uk-text-center"> Country
</th>
<th class="uk-text-center"> Institution
</th>
<th class="uk-text-center"> Compatibility
</th>
</tr>
</thead>
<tbody>
<tr class="uk-table-middle" *ngFor="let dataprovider of results">
<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">
</span>
<span *ngIf="!dataprovider.title.name">
[no title available]
</span>
</a>
</td>
<td class="uk-width-1-5 uk-text-center">
<span *ngIf="dataprovider.type">{{dataprovider.type}}</span>
<span *ngIf="!dataprovider.type">-</span>
</td>
<td class="uk-width-1-5 uk-text-center">
<span *ngFor="let country of dataprovider['countries'].slice(0,5) let i = index">{{country}}{{(i < ( dataprovider['countries'].slice(0,5).length-1))?", ":""}}{{(i == dataprovider['countries'].slice(0,5).length-1 && dataprovider['countries'].length > 5)?"...":""}}</span>
<span *ngIf="dataprovider.countries.length == 0">-</span>
</td>
<td class="uk-width-1-5 uk-text-center">
<span *ngFor="let org of dataprovider['organizations'].slice(0,5) let i = index">
<a *ngIf="org.id" [queryParams]="{organizationId: org.id}" routerLinkActive="router-link-active" routerLink="/search/organization">{{org.name}}</a><span *ngIf="!org.id">{{org.name}}</span>{{(i < ( dataprovider['organizations'].slice(0,5).length-1))?", ":""}}{{(i == dataprovider['organizations'].slice(0,5).length-1 && dataprovider['organizations'].length > 5)?"...":""}}
</span>
<span *ngIf="dataprovider.organizations.length == 0">-</span>
</td>
<td class="uk-width-1-5 uk-text-center">
<span *ngIf="dataprovider.compatibility">{{dataprovider.compatibility}}</span>
<span *ngIf="!dataprovider.compatibility">-</span>
</td>
</tr>
</tbody>
<!-- <thead *ngIf="searchUtils.totalResults > 0">
<tr><td colspan="5" class="uk-padding-remove-horizontal">
<span class="uk-h6">
{{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
</span>
<paging-no-load class="uk-float-right" [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
</td></tr>
</thead> -->
</table>
</div>
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
<div class="searchPaging uk-panel uk-margin-top uk-grid uk-margin-bottom">
<span class="uk-h6 uk-width-1-1@s uk-width-1-2@m">
{{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
</span>
<span class="float-children-right-at-medium margin-small-top-at-small uk-width-1-1@s uk-width-1-2@m">
<paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
</span>
</div>
</div>
<helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
<helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
</div>
<div *ngIf="searchViewLink" class="helper-left-right uk-width-1-6@m uk-visible@m">
<p>
<span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
<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="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>
</a>
</p>
<helper position="right"></helper>
</div>
</div>
<helper position="bottom"></helper>
</div>
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
</div>
</div>
</div>

View File

@ -1,452 +0,0 @@
import {Component, Input, ViewChild, Output, EventEmitter, ViewEncapsulation, OnInit, AfterViewInit} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import {Location} from '@angular/common';
import { DataTableDirective } from 'angular-datatables';
import {SearchFields, DOI, StringUtils,ModalLoading,ErrorCodes,OpenaireProperties,PiwikService, SearchDataprovidersService} from 'ng-openaire-library';
import {Meta, SearchUtilsClass, Filter, Value, SearchFilterComponent, SearchFilterModalComponent } from 'ng-openaire-library';
@Component({
selector: 'search-page-table',
templateUrl:'searchPageTableView.component.html',
styles: [`
#dpTable_info, #dpTable_paginate, #dpTable_length, #dpTable_filter{
display: none;
}
`],
encapsulation: ViewEncapsulation.None // this used in order styles to work
})
export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
@Input() pageTitle = "";
@Input() results;
@Input() filters = [];
@Input() type:string = "";
@Input() entityType: string = "";
@Input() searchUtils:SearchUtilsClass;// = new SearchUtilsClass();
//@Output() downloadClick = new EventEmitter();
@Input() showResultCount:boolean = true;
@Input() showRefine:boolean = true;
@Input() refineFields = [];
//@Input() csvParams: string;
//@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>();
public countFilters= 0;
public parameterNames:string[] =[];
public parameterValues:string[] =[];
public rowsOnPage:number = 10;
@ViewChild (SearchFilterModalComponent) searchFilterModal : SearchFilterModalComponent ;
public currentFilter: Filter;
public errorCodes:ErrorCodes = new ErrorCodes();
piwiksub: any;
dtOptions: DataTables.Settings = {};
showTable = false; filteringAdded = false;
@ViewChild(DataTableDirective) datatableElement: DataTableDirective;
dtTrigger: Subject<any> = new Subject(); //necessary
constructor (private location: Location , private _meta: Meta, private _piwikService:PiwikService, private _searchDataprovidersService: SearchDataprovidersService ) { }
ngOnInit() {
this.dtOptions = {
"paging": true,
"searching": false,
"lengthChange": false,
"pageLength": this.rowsOnPage
};
this.updateTitle(this.pageTitle);
this.updateDescription("Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle);
if(typeof window !== 'undefined') {
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
}
if(OpenaireProperties.isPiwikTrackEnabled() && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
}
}
ngOnDestroy() {
if(this.piwiksub){
this.piwiksub.unsubscribe();
}
}
ngAfterViewInit(): void {
$.fn['dataTable'].ext.search.push((settings, data, dataIndex) => {
if (this.filterData(data, this.searchUtils.keyword, this.filters)) {
return true;
}
return false;
});
}
totalPages(): number {
let totalPages:any = this.searchUtils.totalResults/(this.rowsOnPage);
if(!(Number.isInteger(totalPages))) {
totalPages = (parseInt(totalPages, 10) + 1);
}
return totalPages;
}
toggleModal($event) {
this.currentFilter = $event.value;
this.searchFilterModal.open();
}
updateDescription(description:string){
this._meta.updateMeta("description", description);
this._meta.updateProperty("og:description", description);
}
updateTitle(title:string){
var _prefix ="OpenAIRE | ";
var _title = _prefix + ((title.length> 50 ) ?title.substring(0,50):title);
this._meta.setTitle(_title );
this._meta.updateProperty("og:title",_title);
}
updateUrl(url:string){
this._meta.updateProperty("og:url", url);
}
public getParametersFromUrl(params) {
for(var i=0; i< this.refineFields.length ; i++) {
var filterId = this.refineFields[i];
if(params[filterId] != undefined) {
if(this.queryParameters == undefined){
this.queryParameters = new Map<string,string>();
}
this.queryParameters[filterId]=decodeURIComponent(params[filterId]);
}
}
}
/*
* Mark as check the new filters that are selected, when you get them from search
*/
public checkSelectedFilters(filters:Filter[]){
this.filters = filters;
for(var i=0; i< filters.length ; i++){
var filter:Filter = filters[i];
filter.countSelectedValues = 0;
if(this.queryParameters[filter.filterId] != undefined) {
let values = (decodeURIComponent(this.queryParameters[filter.filterId])).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,-1);
for(let filterValue of filter.values) {
if(values.indexOf(StringUtils.quote(filterValue.id)) > -1) {
filterValue.selected = true;
filter.countSelectedValues++;
}else{
filterValue.selected = false;
}
}
}else{
for(let filterValue of filter.values) {
filterValue.selected = false;
}
}
}
return filters;
}
/*
*
*/
private createUrlParameters(filters:Filter[], includePage:boolean){
var allLimits="";//location.search.slice(1);
this.parameterNames.splice(0,this.parameterNames.length);
this.parameterValues.splice(0,this.parameterValues.length);
for (let filter of filters){
var filterLimits="";
if(filter.countSelectedValues > 0){
for (let value of filter.values){
if(value.selected == true){
filterLimits+=((filterLimits.length == 0)?'':',') +'"'+ StringUtils.URIEncode(value.id)+'"';
}
}
this.queryParameters[filter.filterId]=filterLimits;
if(filterLimits.length > 0){
this.parameterNames.push(filter.filterId);
this.parameterValues.push(filterLimits);
}
allLimits+=(allLimits.length==0?"?":"&")+((filterLimits.length == 0 )?'':filter.filterId + '='+ filterLimits) ;
}
}
if(this.searchUtils.keyword.length > 0 ){
allLimits+=(allLimits.length==0?"?":"&")+'keyword=' + this.searchUtils.keyword;
this.parameterNames.push("keyword");
this.parameterValues.push(this.searchUtils.keyword);
}
return allLimits;
}
public isFiltered(){
var filtered=false;
for (let filter of this.filters){
if(filter.countSelectedValues > 0){
filtered = true;
break;
}
}
if(this.searchUtils.keyword.length > 0 ){
filtered = true;
}
return filtered;
}
private clearKeywords(){
if(this.searchUtils.keyword.length > 0 ){
this.searchUtils.keyword ='';
}
this.goTo(1);
}
private clearFilters(){
for (var i =0 ; i < this.filters.length; i++) {
for (var j=0; j < this.filters[i].values.length; j++) {
if(this.filters[i].values[j].selected) {
this.filters[i].values[j].selected = false;
}
}
this.filters[i].countSelectedValues = 0;
}
this.clearKeywords();
}
private removeFilter(value:Value,filter:Filter){
filter.countSelectedValues--;
if(value.selected == true){
value.selected = false;
}
this.goTo(1);
}
goTo(page:number = 1){
this.searchUtils.page=page;
var table = $('#dpTable').DataTable();
table.page( page - 1 ).draw( false );
// Object { page: 0, pages: 3, start: 0, end: 10, length: 10, recordsTotal: 28, recordsDisplay: 21, serverSide: false }
var info = table.page.info();
this.searchUtils.totalResults = info.recordsDisplay;
var urlParameters = this.createUrlParameters(this.filters,true);
this.location.go(location.pathname,urlParameters);
}
filterChanged($event){
this.goTo(1);
}
keywordChanged($event) {
this.searchUtils.keyword = $event.value;
this.goTo(1);
}
/*
downloadClicked($event) {
if($event.value == true) {
var queryParameters = this.createSearchQueryParameters(this.filters);
this.downloadClick.emit({
value: queryParameters
});
}
}
*/
getSelectedValues(filter):any{
var selected = [];
if(filter.countSelectedValues >0){
for (var i=0; i < filter.values.length; i++){
if(filter.values[i].selected){
selected.push(filter.values[i]);
}
}
}
return selected;
}
/*
Trigger a table draw in order to get the initial filtering
*/
triggerInitialLoad(){
setTimeout(function(){
var table = $('#dpTable').DataTable();
table.page( 0 ).draw( false );
}, 500);
}
/*
Transform initial - not filtered results to get the filtered number
*/
transform(results): any {
if(results.length > 0) {
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.LOADING;
var result = results.filter(row=>this.filterAll(row, this.searchUtils.keyword.toLowerCase(),this.filters));
let oldTotal = this.searchUtils.totalResults;
console.log(" Length: "+result.length);
this.searchUtils.totalResults = result.length;
var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = errorCodes.NONE;
}
// if(oldTotal != this.searchUtils.totalResults) {
// args[3].detectChanges();
// }
return result;
}
return [];
}
filterAll(row: any, query: string, filters:Filter[]) {
// console.log(row);
let returnValue: boolean = false;
if(query) {
if(row.title.name.toLowerCase().indexOf(query) > -1) {
returnValue = true;
}
if(row.type.toLowerCase().indexOf(query) > -1) {
returnValue = true;
}
if(row.countries && row.countries.length > 0) {
for(let country of row.countries) {
if(country.toLowerCase().indexOf(query) > -1) {
returnValue = true;
break;
}
}
}
if(row.compatibility && row.compatibility.toLowerCase().indexOf(query) > -1) {
returnValue = true;
}
if(row.organizations && row.organizations.length > 0) {
for(let organization of row.organizations) {
if(organization.name.toLowerCase().indexOf(query) > -1) {
returnValue = true;
break;
}
}
}
if(!returnValue) {
return false;
}
}
for (let filter of filters){
if(filter.countSelectedValues > 0){
for (let value of filter.values){
if(value.selected == true){
// make it generic in future commit
let field:string = "";
if(filter.title == "Type") {
field = "type";
} else if(filter.title == "Compatibility Level") {
field = "compatibility";
}
if(row[field] == value.name) {
returnValue = true;
if(filter.filterOperator == "or") {
break;
}
} else {
if(filter.filterOperator == "and") {
return false;
}
returnValue = false;
}
}
}
if(!returnValue) {
return false;
}
}
}
return true;
}
filterQuery(data, query){
if(data.toLowerCase().indexOf(query.toLowerCase()) > -1){
return true;
}else{
return false;
}
}
filterData(row: any, query: string, filters:Filter[]) {
let returnValue: boolean = false;
if(query) {
for(var i=0; i <5; i++){
var r= this.filterQuery(row[i], query);
// console.log(query+" "+ row+" "+r);
if(r) {
returnValue = true;
break;
}
}
if(!returnValue) {
return false;
}
}
for (let filter of filters){
if(filter.countSelectedValues > 0){
for (let value of filter.values){
if(value.selected == true){
let field = 1;
if(filter.title == "Type") {
field = 1;
} else if(filter.title == "Compatibility Level") {
field = 4;
}
r= this.filterQuery(row[field], value.name);
if(r) {
returnValue = true;
if(filter.filterOperator == "or") {
break;
}
} else {
if(filter.filterOperator == "and") {
return false;
}
returnValue = false;
}
}
}
if(!returnValue) {
return false;
}
}
}
return true;
}
}

View File

@ -1,33 +0,0 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import{SearchPageTableViewComponent} from './searchPageTableView.component';
import{LoadingModalModule, ReportsServiceModule, ModalModule, PagingModule, HelperModule, ErrorMessagesModule} from 'ng-openaire-library';
import{PiwikServiceModule } from 'ng-openaire-library';
import {DataTablesModule} from 'angular-datatables';
import {Meta, PreviousRouteRecorder, SearchFormModule, SearchResultsModule, SearchPagingModule, SearchDownloadModule, SearchFilterModule} from 'ng-openaire-library';
@NgModule({
imports: [
CommonModule, FormsModule,RouterModule, SearchFormModule, SearchResultsModule, LoadingModalModule,
ReportsServiceModule, SearchPagingModule, SearchDownloadModule, ModalModule, PagingModule,
DataTablesModule, SearchFilterModule, PiwikServiceModule, HelperModule, ErrorMessagesModule
],
declarations: [
SearchPageTableViewComponent
],
providers:[
PreviousRouteRecorder, Meta
],
exports: [
SearchPageTableViewComponent
]
})
export class SearchPageTableViewModule { }

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchDataprovidersComponent} from './searchDataproviders.component'; import{OpenaireSearchDataprovidersComponent} from './searchDataproviders.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -3,8 +3,10 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component'; import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component';
import{ SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module'; import{ SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {SearchDataProvidersModule} from 'ng-openaire-library'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {SearchDataProvidersModule} from '../../openaireLibrary/searchPages/simple/searchDataProviders.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, CommonModule, FormsModule,

View File

@ -2,7 +2,12 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchDatasetsComponent} from './searchDatasets.component'; import{OpenaireSearchDatasetsComponent} from './searchDatasets.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled, EnvironmentSpecificResolver} from 'ng-openaire-library'; import { EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properties/environmentSpecificResolver';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -5,7 +5,10 @@ import { FormsModule } from '@angular/forms';
import{ SearchDatasetsRoutingModule} from './searchDatasets-routing.module'; import{ SearchDatasetsRoutingModule} from './searchDatasets-routing.module';
import{OpenaireSearchDatasetsComponent} from './searchDatasets.component'; import{OpenaireSearchDatasetsComponent} from './searchDatasets.component';
import {SearchDatasetsModule, PreviousRouteRecorder, FreeGuard, IsRouteEnabled} from 'ng-openaire-library'; import {SearchDatasetsModule} from '../../openaireLibrary/searchPages/simple/searchDatasets.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component'; import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -5,8 +5,11 @@ import { FormsModule } from '@angular/forms';
import{ SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module'; import{ SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module';
import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component'; import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled, SearchOrganizationsModule} from 'ng-openaire-library'; import { SearchOrganizationsModule} from '../../openaireLibrary/searchPages/simple/searchOrganizations.module';
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchProjectsComponent} from './searchProjects.component'; import{OpenaireSearchProjectsComponent} from './searchProjects.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -5,8 +5,10 @@ import { FormsModule } from '@angular/forms';
import{ SearchProjectsRoutingModule} from './searchProjects-routing.module'; import{ SearchProjectsRoutingModule} from './searchProjects-routing.module';
import{OpenaireSearchProjectsComponent} from './searchProjects.component'; import{OpenaireSearchProjectsComponent} from './searchProjects.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled,SearchProjectsModule} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import { SearchProjectsModule} from '../../openaireLibrary/searchPages/simple/searchProjects.module';
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, FormsModule, SearchProjectsRoutingModule, SearchProjectsModule CommonModule, FormsModule, SearchProjectsRoutingModule, SearchProjectsModule

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import{OpenaireSearchPublicationsComponent} from './searchPublications.component'; import{OpenaireSearchPublicationsComponent} from './searchPublications.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -5,7 +5,10 @@ import { FormsModule } from '@angular/forms';
import{ SearchPublicationsRoutingModule} from './searchPublications-routing.module'; import{ SearchPublicationsRoutingModule} from './searchPublications-routing.module';
import{OpenaireSearchPublicationsComponent} from './searchPublications.component'; import{OpenaireSearchPublicationsComponent} from './searchPublications.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled, SearchPublicationsModule} from 'ng-openaire-library'; import { SearchPublicationsModule} from '../../openaireLibrary/searchPages/simple/searchPublications.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
@NgModule({ @NgModule({
imports: [ imports: [

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import {OpenaireSearchSoftwareComponent} from './searchSoftware.component'; import {OpenaireSearchSoftwareComponent} from './searchSoftware.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library'; import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {Properties} from '../../utils/properties'; import {Properties} from '../../utils/properties';
@NgModule({ @NgModule({

View File

@ -4,9 +4,12 @@ import { FormsModule } from '@angular/forms';
import{ SearchSoftwareRoutingModule} from './searchSoftware-routing.module'; import{ SearchSoftwareRoutingModule} from './searchSoftware-routing.module';
import{OpenaireSearchSoftwareComponent} from './searchSoftware.component'; import{OpenaireSearchSoftwareComponent} from './searchSoftware.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled, SearchSoftwareModule} from 'ng-openaire-library'; import { SearchSoftwareModule} from '../../openaireLibrary/searchPages/simple/searchSoftware.module';
@NgModule({ @NgModule({
imports: [ imports: [