diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index cc43640..81c0870 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,278 +1,80 @@
-import {Component} from '@angular/core';
-import {ActivatedRoute, NavigationStart, Router} from '@angular/router';
+import {ChangeDetectorRef, Component} from '@angular/core';
+import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
-import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
-import {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
-import {Session, User} from './openaireLibrary/login/utils/helper.class';
-import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
-import {SubscribeService} from './openaireLibrary/utils/subscribe/subscribe.service';
-import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class";
+import {User} from './openaireLibrary/login/utils/helper.class';
import {UserManagementService} from "./openaireLibrary/services/user-management.service";
+import {SideBarService} from "./library/sharedComponents/sidebar/sideBar.service";
+import {StakeholderService} from "./services/stakeholder.service";
@Component({
- //changeDetection: ChangeDetectionStrategy.Default,
- //encapsulation: ViewEncapsulation.Emulated,
selector: 'app-root',
- styles: [`
- `],
- template: `
-
-
-
-
-
-
-
-
- OpenAIRE uses cookies in order to function properly.
- Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing
- experience possible.
- By using the OpenAIRE portal you accept our use of cookies. Read more
-
-
-
-
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
new file mode 100644
index 0000000..941e466
--- /dev/null
+++ b/src/app/home/home.component.ts
@@ -0,0 +1,87 @@
+import {Component, OnDestroy, OnInit} from '@angular/core';
+import {ActivatedRoute, Router} from '@angular/router';
+import {Title} from '@angular/platform-browser';
+import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
+
+import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
+import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component';
+import {Stakeholder, Topic} from "../utils/entities/stakeholder";
+import {SideBarService} from "../library/sharedComponents/sidebar/sideBar.service";
+import {StakeholderService} from "../services/stakeholder.service";
+
+declare var UIkit;
+
+@Component({
+ selector: 'home',
+ templateUrl: './home.component.html',
+})
+export class HomeComponent implements OnInit, OnDestroy {
+ public status: number;
+ public loading: boolean = true;
+ public errorCodes: ErrorCodes;
+ public stakeholder: Stakeholder;
+ public analysisOpen: boolean = true;
+ private errorMessages: ErrorMessagesComponent;
+ public topic: Topic;
+ public valid = true;
+ properties: EnvProperties;
+
+ constructor(
+ private route: ActivatedRoute,
+ private router: Router,
+ private title: Title,
+ private sideBarService: SideBarService,
+ private stakeholderService: StakeholderService) {
+ this.errorCodes = new ErrorCodes();
+ this.errorMessages = new ErrorMessagesComponent();
+ this.status = this.errorCodes.LOADING;
+ }
+
+ public ngOnInit() {
+ this.route.data
+ .subscribe((data: { envSpecific: EnvProperties }) => {
+ this.properties = data.envSpecific;
+ this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
+ if (stakeholder) {
+ this.sideBarService.setHasSidebar(true);
+ this.stakeholder = stakeholder;
+ this.topic = null;
+ }
+ });
+ });
+ }
+
+ public ngOnDestroy() {
+ }
+
+ public newTopicOpen() {
+ this.topic = new Topic(null, null, null,true, true);
+ this.valid = true;
+ }
+
+ public close(element) {
+ UIkit.drop(element).hide();
+ }
+
+ get open(): boolean {
+ return this.sideBarService.open;
+ }
+
+ public toggleOpen(event = null) {
+ if (!event) {
+ this.sideBarService.setOpen(!this.open);
+ } else if (event && event['value'] === true) {
+ this.sideBarService.setOpen(false);
+ }
+ }
+
+ public createTopic(element) {
+ if(this.topic.name && this.topic.name !== '') {
+ this.topic.alias = this.topic.name.toLowerCase().replace(' ', '_');
+ this.stakeholder.topics.push(this.topic);
+ this.close(element);
+ } else {
+ this.valid = false;
+ }
+ }
+}
diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts
new file mode 100644
index 0000000..5e23808
--- /dev/null
+++ b/src/app/home/home.module.ts
@@ -0,0 +1,30 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+
+import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
+import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
+
+import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
+import {HomeComponent} from "./home.component";
+import {HomeRoutingModule} from "./home-routing.module";
+import {ModalModule} from "../openaireLibrary/utils/modal/modal.module";
+import {RouterModule} from "@angular/router";
+import {FormsModule} from "@angular/forms";
+
+@NgModule({
+ imports: [
+ CommonModule, HomeRoutingModule, ModalModule, RouterModule, FormsModule
+ ],
+ declarations: [
+ HomeComponent
+ ],
+ providers: [
+ FreeGuard, PreviousRouteRecorder,
+ PiwikService
+ ],
+ exports: [
+ HomeComponent
+ ]
+})
+export class HomeModule {
+}
diff --git a/src/app/learn-how/learn-how-routing.module.ts b/src/app/learn-how/learn-how-routing.module.ts
deleted file mode 100644
index ca8e08c..0000000
--- a/src/app/learn-how/learn-how-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import {NgModule} from '@angular/core';
-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, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
-
- ])
- ]
-})
-export class LearnHowRoutingModule { }
diff --git a/src/app/learn-how/learn-how.component.ts b/src/app/learn-how/learn-how.component.ts
deleted file mode 100644
index 50a1d91..0000000
--- a/src/app/learn-how/learn-how.component.ts
+++ /dev/null
@@ -1,228 +0,0 @@
-import {Component} from '@angular/core';
-import {ActivatedRoute, Router} from '@angular/router';
-import {Meta, Title} from '@angular/platform-browser';
-import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
-import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
-import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
-import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
-
-@Component({
- selector: 'learn-how',
- template: `
-
-
-
-
1. Understanding your needs
-
- First, we learn about your requirements and challenges. We help you understand Open Science practices within
- EOSC and together we’ll talk about how OpenAIRE RCD fits as a solution.
-
-
-
-
2. Develop a pilot
-
- How do you work today, and how would you like to work tomorrow? We translate your needs into rules and processes
- and we configure operational OpenAIRE services. By the end of this phase, we’ll have defined the basic
- configuration of your Community Gateway.
-
-
-
-
3. Test and Validate
-
- You validate and test your new Community Gateway (portal) with your experts and community to ensure all
- workflows are in place and quality of data meets your standards. If needed, we work together in another
- iteration to further refine and adapt to your needs.
-
-
-
-
4. Roll out the service
-
- We jointly roll out your new Community Gateway. You take over the business operations and start engaging your
- researchers, we take care of the smooth operation of the e-service.
-
-
-
- 0"
- [texts]="pageContents['top']">
-
-
- `
-})
-export class LearnHowComponent {
- public piwiksub: any;
- public gifs: { "gif": string, "header": string, "text" }[] = [];
- public pageContents = null;
- public divContents = null;
-
- public url: string = null;
- public pageTitle: string = "OpenAIRE - Connect | Learn How";
-
- properties: EnvProperties;
-
- constructor(
- private route: ActivatedRoute,
- private _router: Router,
- private _meta: Meta,
- private _title: Title,
- private seoService: SEOService,
- private _piwikService: PiwikService,
- private helper: HelperService) {}
-
- public ngOnInit() {
- this.route.data
- .subscribe((data: { envSpecific: EnvProperties }) => {
- this.properties = data.envSpecific;
-
- if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
- this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe();
- }
- this.url = this.properties.baseLink + this._router.url;
- this.seoService.createLinkForCanonicalURL(this.url);
- this.updateUrl(this.url);
- this.updateTitle(this.pageTitle);
- this.updateDescription("OpenAIRE - Connect, Community Gateway, research community");
-
- //this.getDivContents();
- this.getPageContents();
- });
- this.createGifs();
- }
-
- private getPageContents() {
- this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
- this.pageContents = contents;
- })
- }
-
- private getDivContents() {
- this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
- this.divContents = contents;
- })
- }
-
- public ngOnDestroy() {
- if (this.piwiksub) {
- this.piwiksub.unsubscribe();
- }
- }
-
- private createGifs() {
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/profile.gif",
- header: "Profile",
- text: "Edit community information, change logo url, add community managers or organizations related to community."
- });
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/content.gif",
- header: "Content",
- text: "Manage projects, content providers, subjects and zenodo communities that are related to the research community."
- });
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/statistics.gif",
- header: "Statistics & Charts",
- text: "Manage statistical numbers & charts that will be displayed in the community overview and graph analysis views."
- });
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/links.gif",
- header: "Links",
- text: " Manage user claims related to the research community."
- });
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/help.gif",
- header: " Help texts",
- text: "Add or edit help text in research community pages."
- });
- this.gifs.push({
- gif: "assets/connect-assets/about/gifs/users.gif",
- header: "Users",
- text: "Invite more users to subscribe, manage community subscribers, your personal info and notification settings."
- });
- }
-
- private updateDescription(description: string) {
- this._meta.updateTag({content: description}, "name='description'");
- this._meta.updateTag({content: description}, "property='og:description'");
- }
-
- private updateTitle(title: string) {
- var _title = ((title.length > 50) ? title.substring(0, 50) : title);
- this._title.setTitle(_title);
- this._meta.updateTag({content: _title}, "property='og:title'");
- }
-
- private updateUrl(url: string) {
- this._meta.updateTag({content: url}, "property='og:url'");
- }
-}
diff --git a/src/app/learn-how/learn-how.module.ts b/src/app/learn-how/learn-how.module.ts
deleted file mode 100644
index 9848b5a..0000000
--- a/src/app/learn-how/learn-how.module.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { NgModule} from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { RouterModule } from '@angular/router';
-
-import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
-import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
-import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
-
-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";
-import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
-import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
-
-@NgModule({
- imports: [
- CommonModule, RouterModule, LearnHowRoutingModule, GifSliderModule, HelperModule,
- Schema2jsonldModule, SEOServiceModule
- ],
- declarations: [
- LearnHowComponent
- ],
- exports: [
- LearnHowComponent
- ],
- providers:[
- FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled
- ]
-})
-export class LearnHowModule { }
diff --git a/src/app/learn-how/learnInDepth/learn-in-depth-routing.module.ts b/src/app/learn-how/learnInDepth/learn-in-depth-routing.module.ts
deleted file mode 100644
index d1ab12f..0000000
--- a/src/app/learn-how/learnInDepth/learn-in-depth-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import {NgModule} from '@angular/core';
-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, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
-
- ])
- ]
-})
-export class LearnInDepthRoutingModule { }
diff --git a/src/app/learn-how/learnInDepth/learn-in-depth.component.ts b/src/app/learn-how/learnInDepth/learn-in-depth.component.ts
deleted file mode 100644
index 9796700..0000000
--- a/src/app/learn-how/learnInDepth/learn-in-depth.component.ts
+++ /dev/null
@@ -1,279 +0,0 @@
-import {Component} from '@angular/core';
-import {ActivatedRoute, Router} from '@angular/router';
-import {Meta, Title} from '@angular/platform-browser';
-import {PiwikService} from '../../openaireLibrary/utils/piwik/piwik.service';
-import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
-import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
-import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
-
-@Component({
- selector: 'learn-in-depth',
- template: `
-
-
-