[Trunk|Connect]: Add is Route enabled in all routes except /content. Add Helper texts on Deposti first page, content policy and organizations.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56631 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
1e5d67eb83
commit
1729eea27d
|
@ -17,7 +17,6 @@ const routes: Routes = [
|
|||
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
|
|
@ -197,14 +197,14 @@
|
|||
</gif-slider>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-container uk-container-large uk-margin-large-top">
|
||||
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
|
||||
</div>
|
||||
<div class="uk-container uk-container-large">
|
||||
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="loading" class="uk-container uk-container-large uk-height-large">
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-2" role="alert"><span class="loading-gif uk-align-center" ></span></div>
|
||||
</div>
|
||||
<div *ngIf= "!loading && researchCommunities.length > 0" class="uk-container uk-container-large">
|
||||
<div *ngIf= "!loading && researchCommunities.length > 0" class="uk-container uk-container-large uk-margin-large-top">
|
||||
<h1 class="uk-text-bold">Community Gateways in Action</h1>
|
||||
<div [class]="'uk-margin-medium-top' + (researchCommunities.length <= 5 ? ' uk-margin-medium-bottom' : '')">
|
||||
|
||||
|
|
|
@ -81,14 +81,14 @@ export class CommunitiesComponent {
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {ContactComponent} from './contact.component';
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: ContactComponent}
|
||||
{ path: '', component: ContactComponent, canActivate: [IsRouteEnabled]}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
|
|
@ -64,14 +64,14 @@ export class ContactComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import {RecaptchaModule} from "ng-recaptcha";
|
|||
import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
@ -21,7 +22,7 @@ import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
|||
ContactComponent
|
||||
],
|
||||
providers: [
|
||||
EmailService, PiwikService
|
||||
EmailService, PiwikService, IsRouteEnabled
|
||||
],
|
||||
exports: [
|
||||
ContactComponent
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<!--
|
||||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<div class="uk-article-title custom-article-title">
|
||||
|
@ -12,7 +13,7 @@
|
|||
|
||||
<p>
|
||||
OpenAIRE builds an open scholarly graph of research products (publications, datasets, software and other types of research products), linked to each other and to fundings, projects and organizations.
|
||||
The information used to build the graph is collected from the OpenAIRE network of content providers<!-- (currently composed of more than 400 institutional repositories, 8,000 Open Access journals, 70 dataset archives and 20 funders)-->
|
||||
The information used to build the graph is collected from the OpenAIRE network of content providers<!– (currently composed of more than 400 institutional repositories, 8,000 Open Access journals, 70 dataset archives and 20 funders)–>
|
||||
and is inferred by OpenAIRE algorithms. OpenAIRE algorithms are capable of detecting duplicates and mining information from the full-texts of Open Access publications.
|
||||
For more details about the construction of the graph, please check <a href="https://beta.openaire.eu/aggregation-and-content-provision-workflows" target="_blank" >here</a>.
|
||||
</p>
|
||||
|
@ -23,17 +24,17 @@
|
|||
|
||||
|
||||
<p class="uk-margin-left">
|
||||
<!-- <span class="uk-text-large uk-text-primary">Users </span> -->
|
||||
<!-- <div class="uk-margin-left"> -->
|
||||
<!– <span class="uk-text-large uk-text-primary">Users </span> –>
|
||||
<!– <div class="uk-margin-left"> –>
|
||||
<b>Links:</b> Users can "claim" that a research result is relevant to a community via the
|
||||
<a routerLinkActive="uk-link" routerLink="/participate/claim" >Link</a> functionality of the Research community dashboard.
|
||||
<br>
|
||||
For more details about linking functionality, please check <a href="https://beta.openaire.eu/linking" target="_blank" >here</a>.
|
||||
|
||||
<!-- </div> -->
|
||||
<!– </div> –>
|
||||
</p>
|
||||
<div class="uk-margin-left uk-margin-top">
|
||||
<!-- <span class="uk-text-large uk-text-primary">OpenAIRE algorithms </span><br> -->
|
||||
<!– <span class="uk-text-large uk-text-primary">OpenAIRE algorithms </span><br> –>
|
||||
<b>OpenAIRE algorithms:</b> Community managers can configure the OpenAIRE algorithms, in order to automatically assign research products to a community based on:
|
||||
|
||||
<div class="uk-margin-left">
|
||||
|
@ -57,7 +58,7 @@
|
|||
<div class="uk-margin-left uk-margin-top">
|
||||
<b>Acknowledgement statements:</b> Acknowledgement statements found in full-texts (only for RCDs serving research infrastructures/initiatives)
|
||||
</div>
|
||||
<!--div class="uk-margin-top">
|
||||
<!–div class="uk-margin-top">
|
||||
Stay tuned to discover the new criteria that will be supported in the next releases of the OpenAIRE-Connect Research Community Dashboard:
|
||||
<div class="uk-margin-left ">
|
||||
|
||||
|
@ -72,8 +73,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
</div-->
|
||||
</div–>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
|
||||
@Component({
|
||||
selector: 'content',
|
||||
|
@ -9,12 +10,23 @@ import {Title, Meta} from '@angular/platform-browser';
|
|||
})
|
||||
export class ContentPageComponent {
|
||||
|
||||
properties:EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title) {}
|
||||
private _meta: Meta, private _title: Title,
|
||||
private helper: HelperService) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.updateTitle("Content");
|
||||
this.updateDescription("content, open access");
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,4 +43,16 @@ export class ContentPageComponent {
|
|||
private updateUrl(url:string){
|
||||
this._meta.updateTag({content:url},"property='og:url'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,13 @@ import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRout
|
|||
|
||||
import {ContentPageComponent} from './contentPage.component';
|
||||
import {ContentPageRoutingModule} from './content-routing.module';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ContentPageRoutingModule, RouterModule
|
||||
ContentPageRoutingModule, RouterModule, CommonModule, HelperModule
|
||||
],
|
||||
declarations: [
|
||||
ContentPageComponent
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
|
@ -8,26 +8,32 @@ import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class";
|
|||
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-deposit',
|
||||
template: `
|
||||
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"></deposit-first-page>
|
||||
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation" [pageContents]="pageContents" [divContents]="divContents"></deposit-first-page>
|
||||
`
|
||||
})
|
||||
|
||||
export class OpenaireDepositComponent {
|
||||
properties:EnvProperties;
|
||||
piwikSiteId = null;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
|
||||
public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
|
||||
fetchZenodoInformation: FetchZenodoInformation;
|
||||
|
||||
constructor ( private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _zenodoCommunitieService: ZenodoCommunitiesService,
|
||||
private _communityService: CommunityService,
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
|
||||
private helper: HelperService) {
|
||||
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService, this._searchZenodoCommunitiesService);
|
||||
}
|
||||
|
||||
|
@ -41,15 +47,12 @@ export class OpenaireDepositComponent {
|
|||
if (!communityId) {
|
||||
communityId = params['communityId'];
|
||||
}
|
||||
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
|
||||
if (communityId) {
|
||||
|
||||
if (communityId != null && communityId != '') {
|
||||
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI + communityId).subscribe(
|
||||
community => {
|
||||
//this.getDivContents();
|
||||
this.getPageContents(communityId);
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage+communityId;
|
||||
|
@ -63,7 +66,6 @@ export class OpenaireDepositComponent {
|
|||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.zenodoInformation.shareInZenodoUrl) {
|
||||
this.zenodoInformation.url = this.properties.zenodo;
|
||||
|
@ -76,6 +78,18 @@ export class OpenaireDepositComponent {
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents(communityId: string) {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents(communityId: string) {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error("Deposit First Page: "+message, error);
|
||||
}
|
||||
|
|
|
@ -28,8 +28,8 @@ export class HelperTestComponent implements OnInit{
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -4,19 +4,20 @@ import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
|||
import {HelperTestComponent} from "./helper-test.component";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
HelperModule,
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{path: '', component: HelperTestComponent}
|
||||
{path: '', component: HelperTestComponent, canActivate: [IsRouteEnabled]}
|
||||
])
|
||||
],
|
||||
declarations: [
|
||||
HelperTestComponent
|
||||
],
|
||||
providers:[],
|
||||
providers:[IsRouteEnabled],
|
||||
exports: [
|
||||
HelperTestComponent
|
||||
]
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import{EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'organizations',
|
||||
|
@ -10,7 +11,7 @@ import{EnvProperties} from '../../openaireLibrary/utils/properties/env-propertie
|
|||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<div class="uk-article-title custom-article-title uk-margin-bottom"> Organizations related to the community</div>
|
||||
<helper div="organizations"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<affiliations [fullView]="true" [getAffiliationsFromAPI]="true"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -18,16 +19,24 @@ import{EnvProperties} from '../../openaireLibrary/utils/properties/env-propertie
|
|||
})
|
||||
export class OrganizationsPageComponent {
|
||||
properties:EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
public communityId = null;
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title) {}
|
||||
private _meta: Meta, private _title: Title,
|
||||
private helper: HelperService) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
this.updateUrl(data.envSpecific.baseLink+this._router.url);
|
||||
this.updateTitle("Organizations");
|
||||
this.updateDescription("Organizations, open access");
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -44,4 +53,16 @@ export class OrganizationsPageComponent {
|
|||
private updateUrl(url:string){
|
||||
this._meta.updateTag({content:url},"property='og:url'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, this.communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, this.communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,10 +9,11 @@ import {OrganizationsPageRoutingModule} from './organizationsPage-routing.module
|
|||
|
||||
import {AffiliationsModule} from "../../affiliations/affiliations.module";
|
||||
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
|
||||
import {CommonModule} from "@angular/common";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule
|
||||
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationsPageComponent
|
||||
|
|
|
@ -4,11 +4,12 @@ import {RouterModule} from '@angular/router';
|
|||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {LearnHowComponent} from "./learn-how.component";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: LearnHowComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: LearnHowComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -133,14 +133,14 @@ export class LearnHowComponent {
|
|||
this.createGifs();
|
||||
}
|
||||
|
||||
public getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import {LearnHowComponent} from "./learn-how.component";
|
|||
import {LearnHowRoutingModule} from "./learn-how-routing.module";
|
||||
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -22,7 +23,7 @@ import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
|||
LearnHowComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled
|
||||
]
|
||||
})
|
||||
export class LearnHowModule { }
|
||||
|
|
|
@ -4,11 +4,12 @@ import {RouterModule} from '@angular/router';
|
|||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {LearnInDepthComponent} from "./learn-in-depth.component";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: LearnInDepthComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: LearnInDepthComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -201,14 +201,14 @@ export class LearnInDepthComponent {
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import {PiwikService} from '../../openaireLibrary/utils/piwik/piwik.ser
|
|||
import {LearnInDepthComponent} from "./learn-in-depth.component";
|
||||
import {LearnInDepthRoutingModule} from "./learn-in-depth-routing.module";
|
||||
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -21,7 +22,7 @@ import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
|
|||
LearnInDepthComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled
|
||||
]
|
||||
})
|
||||
export class LearnInDepthModule { }
|
||||
|
|
|
@ -4,11 +4,12 @@ import {RouterModule} from '@angular/router';
|
|||
import {InviteComponent} from './invite.component';
|
||||
import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: InviteComponent, canActivate: [LoginGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: InviteComponent, canActivate: [LoginGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -13,6 +13,7 @@ import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
|
|||
import {EmailService} from '../../../openaireLibrary/utils/email/email.service';
|
||||
import {CommunityService} from '../../../openaireLibrary/connect/community/community.service';
|
||||
import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module';
|
||||
import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -23,7 +24,7 @@ import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMe
|
|||
],
|
||||
providers: [
|
||||
LoginGuard, PreviousRouteRecorder,
|
||||
EmailService, CommunityService
|
||||
EmailService, CommunityService, IsRouteEnabled
|
||||
],
|
||||
exports: [
|
||||
InviteComponent
|
||||
|
|
Loading…
Reference in New Issue