[Monitor_dashboard]:Initialize monitor admin. Home page has been created.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57496 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
cc18e55e52
commit
6398c1f5d6
|
@ -1,5 +1,5 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
|
||||
|
||||
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
||||
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
||||
|
@ -8,7 +8,12 @@ import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
|||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
path: ':stakeholder',
|
||||
loadChildren: './home/home.module#HomeModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{
|
||||
path: 'monitor',
|
||||
loadChildren: './monitor/monitor.module#MonitorModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
|
@ -32,7 +37,10 @@ const routes: Routes = [
|
|||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
imports: [RouterModule.forRoot(routes, {
|
||||
preloadingStrategy: PreloadAllModules,
|
||||
scrollPositionRestoration: "top"
|
||||
})],
|
||||
exports: [RouterModule],
|
||||
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
||||
})
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<!--disable_transitions -->
|
||||
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar">
|
||||
<div id="header_main" [class.header_full]="!hasSidebar">
|
||||
<nav class="uk-light">
|
||||
<a *ngIf="hasSidebar" id="sidebar_main_toggle" (click)="toggleOpen()" class="sSwitch sSwitch_left">
|
||||
<span class="sSwitchIcon"></span>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
|
@ -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: `
|
||||
<div [class]="(community)?(community.id +'App'):'connectApp'">
|
||||
<div>
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
</main>
|
||||
</div>
|
||||
<!--feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback-->
|
||||
<cookie-law *ngIf="isClient" position="bottom">
|
||||
OpenAIRE uses cookies in order to function properly.<br>
|
||||
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. <a
|
||||
href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span class="uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right"
|
||||
ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03"
|
||||
points="7 4 13 10 7 16"></polyline></svg>
|
||||
</span></a>
|
||||
</cookie-law>
|
||||
</div>
|
||||
`
|
||||
|
||||
templateUrl: './app.component.html'
|
||||
})
|
||||
export class AppComponent {
|
||||
isClient: boolean = false;
|
||||
|
||||
userMenuItems: MenuItem[] = [];
|
||||
|
||||
|
||||
menuItems: RootMenuItem [] = [];
|
||||
bottomMenuItems: MenuItem[] = [];
|
||||
public community = null;
|
||||
properties: EnvProperties;
|
||||
showMenu: boolean = false;
|
||||
communities = null;
|
||||
subscriberOfCommunities = false;
|
||||
managerOfCommunities = false;
|
||||
user: User;
|
||||
loginCheck: boolean = false;
|
||||
hasSidebar: boolean = false;
|
||||
|
||||
// community: {id:string, name:string, logoUrl:string};
|
||||
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
|
||||
private _communitiesService: CommunitiesService, private _subscribeService: SubscribeService,
|
||||
private router: Router, private userManagementService: UserManagementService) {
|
||||
router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart) {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
});
|
||||
constructor(private route: ActivatedRoute,
|
||||
private propertiesService: EnvironmentSpecificService,
|
||||
private router: Router,
|
||||
private userManagementService: UserManagementService,
|
||||
private sideBarService: SideBarService,
|
||||
private stakeholderService: StakeholderService,
|
||||
private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
let r = this.route;
|
||||
while (r.firstChild) {
|
||||
r = r.firstChild;
|
||||
}
|
||||
r.params.subscribe(params => {
|
||||
if(params['stakeholder']) {
|
||||
if(!this.stakeholderService.stakeholder ||
|
||||
this.stakeholderService.stakeholder.alias !== params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => {
|
||||
this.stakeholderService.setStakeholder(stakeholder);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.stakeholderService.setStakeholder(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
this.propertiesService.loadEnvironment()
|
||||
.then(es => {
|
||||
this.properties = this.propertiesService.envSpecific;
|
||||
var communityId: string = "";
|
||||
this._communitiesService.updateCommunities(this.properties, this.properties.communitiesAPI);
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe( user => {
|
||||
.then(properties => {
|
||||
this.properties = properties;
|
||||
this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => {
|
||||
this.user = user;
|
||||
this.loginCheck = true;
|
||||
if (this.properties.environment == "development") {
|
||||
this.showMenu = false;
|
||||
this.route.queryParams.subscribe(params => {
|
||||
communityId = (params['communityId']) ? params['communityId'] : '';
|
||||
this.buildMenu(communityId);
|
||||
})
|
||||
} else {
|
||||
this.showMenu = false;
|
||||
communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
this.buildMenu(communityId);
|
||||
}
|
||||
if (typeof document !== 'undefined') {
|
||||
try {
|
||||
this.isClient = true;
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}, error => {
|
||||
console.log("App couldn't fetch properties");
|
||||
console.log(error);
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
this.sideBarService.hasSidebar.subscribe(hasSidebar => {
|
||||
this.hasSidebar = hasSidebar;
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
}
|
||||
|
||||
public buildMenu(communityId: string) {
|
||||
let community = null;
|
||||
this.community = null;
|
||||
this._communitiesService.getCommunitiesState().subscribe(
|
||||
communities => {
|
||||
if (!communities || communities.length == 0 && communityId !== null && communityId !== '') {
|
||||
return;
|
||||
}
|
||||
for (var com of communities) {
|
||||
if ((communityId && communityId != "" && com.communityId == communityId
|
||||
&& community != null) ||
|
||||
(
|
||||
!(communityId && communityId != "" && com.communityId == communityId)
|
||||
&&
|
||||
this.managerOfCommunities && this.subscriberOfCommunities)) {
|
||||
break;
|
||||
}
|
||||
if (this.user && com['status'] != "hidden") {
|
||||
if (Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user)) {
|
||||
this.managerOfCommunities = true;
|
||||
} else if (com.managers.indexOf(this.user.email) != -1) {
|
||||
this.managerOfCommunities = true;
|
||||
}
|
||||
}
|
||||
public get open() {
|
||||
return this.sideBarService.open;
|
||||
}
|
||||
|
||||
|
||||
if (communityId && communityId != "" && com.communityId == communityId) {
|
||||
community = com;
|
||||
let isCommunityManager: boolean = false;
|
||||
if (Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user)) {
|
||||
isCommunityManager = true;
|
||||
} else if (this.user && com.managers.indexOf(this.user.email) != -1) {
|
||||
isCommunityManager = true;
|
||||
}
|
||||
this.community = {
|
||||
id: community.communityId,
|
||||
name: (community.shortTitle) ? community.shortTitle : community.title,
|
||||
logoUrl: community.logoUrl
|
||||
};
|
||||
this.menuItems = [];
|
||||
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
items: [new MenuItem("", "Publications", "", "/search/find/publications", false, ["publication"], ["/search/find/publications"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Research Data", "", "/search/find/datasets", false, ["dataset"], ["/search/find/datasets"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Software", "", "/search/find/software", false, ["software"], ["/search/find/software"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Other Research Products", "", "/search/find/other", false, ["orp"], ["/search/find/other"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
]
|
||||
});
|
||||
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("deposit", "Deposit", "", "/participate/deposit/learn-how", false, [], ["/participate/deposit/learn-how"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
items: [
|
||||
/*
|
||||
new MenuItem("","Zenodo Communities","","/participate/share-zenodo",false,[],["/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||
new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||
new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],this.properties.environment!="development"?{}:{communityId:community.communityId})
|
||||
*/
|
||||
]
|
||||
});
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("link", "Link", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
items: [
|
||||
new MenuItem("", "Start linking", "", "/participate/claim", false, [], ["/participate/claim"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
|
||||
]
|
||||
});
|
||||
if (isCommunityManager) {
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("manage", "Manage", 'https://beta.admin.connect.openaire.eu/dashboard?communityId=' + community.communityId, "", false, [], [], {}),
|
||||
items: []
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (community == null) {
|
||||
this.menuItems = [];
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("about", "About", "", "/about/learn-how", false, [], null, {}),
|
||||
items: []
|
||||
});
|
||||
var myCommunities = [];
|
||||
/*if(this.managerOfCommunities){
|
||||
myCommunities.push( new MenuItem("","Managing communities","","/search/find/communities",false,[],[],{role:"%22manager%22"}))
|
||||
}
|
||||
if(Session.isLoggedIn()){
|
||||
this._subscribeService.getCommunitiesSubscribedTo(this.properties, Session.getUserEmail()).subscribe (
|
||||
pids => {
|
||||
if(pids.length > 0 ) {
|
||||
myCommunities.push( new MenuItem("","Subscribed to communities","","/search/find/communities",false,[],[],{status:"%22subscribed%22"}))
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.error("Error fetching your subscribed communities")
|
||||
});
|
||||
}*/
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("communities", "Communities", "", "/search/find/communities", false, [], null, {}),
|
||||
items: []
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("join", "Join", "", "/contact-us", false, [], null, {}),
|
||||
items: []
|
||||
});
|
||||
/*if(this.managerOfCommunities || this.subscriberOfCommunities){
|
||||
let myCommunitiesMenu = new MenuItem("myCommunities","My Communities","","",false,[],[],{});
|
||||
myCommunitiesMenu.setMarkAsActive(false);
|
||||
this.menuItems.push({rootItem: myCommunitiesMenu, items: myCommunities});
|
||||
}*/
|
||||
|
||||
|
||||
this.bottomMenuItems = [
|
||||
new MenuItem("", "About", "https://beta.openaire.eu/project-factsheets", "", false, [], [], {}),
|
||||
new MenuItem("", "News - Events", "https://beta.openaire.eu/news-events", "", false, [], [], {}),
|
||||
new MenuItem("", "Blog", "https://blogs.openaire.eu/", "", false, [], [], {}),
|
||||
new MenuItem("", "Contact us", "https://beta.openaire.eu/contact-us", "", false, [], [], {})
|
||||
];
|
||||
// if(this.properties.showContent){
|
||||
// this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{}));
|
||||
// }
|
||||
this.userMenuItems = [
|
||||
// new MenuItem("","My links","","/myclaims",false,[],["/myclaims"],(data['communityId'] && typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:data['communityId']}),
|
||||
];
|
||||
if (Session.isPortalAdministrator(this.user)) {
|
||||
//((this.properties.environment == "beta") ? "https://beta.admin.connect.openaire.eu" : "https://admin.explore.openaire.eu") + "/dashboard?communityId=openaire"
|
||||
this.userMenuItems.push(new MenuItem("", "Manage Helptexts",
|
||||
((this.properties.environment == "production") ? "https://admin.explore.openaire.eu" : "https://beta.admin.connect.openaire.eu") + "/dashboard?communityId=connect",
|
||||
"", false, [], [], {}))
|
||||
}
|
||||
/*if(this.managerOfCommunities){
|
||||
this.userMenuItems.push( new MenuItem("","Managing communities","","/search/find/communities",false,[],[],{role:"%22manager%22"}))
|
||||
}
|
||||
if(Session.isLoggedIn()){
|
||||
this._subscribeService.getCommunitiesSubscribedTo(this.properties, Session.getUserEmail()).subscribe (
|
||||
pids => {
|
||||
if(pids.length > 0 ) {
|
||||
this.userMenuItems.push( new MenuItem("","Subscribed to communities","","/search/find/communities",false,[],[],{status:"%22subscribed%22"}))
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.error("Error fetching your subscribed communities")
|
||||
});
|
||||
}*/
|
||||
if (this.user) {
|
||||
this.userMenuItems.push(new MenuItem("my-communities", "My Communities", "",
|
||||
"/myCommunities", false, [], [], {}));
|
||||
}
|
||||
} else {
|
||||
this.bottomMenuItems = [
|
||||
// new MenuItem("","About","","/about",false,[],["/about"],this.properties.environment!="development"?{}:{communityId:community.communityId}),
|
||||
new MenuItem("", "Organizations", "", "/organizations", false, [], ["/organizations"], this.properties.environment != "development" ? {} : {communityId: community.communityId})
|
||||
];
|
||||
if (this.properties.showContent) {
|
||||
this.bottomMenuItems.push(new MenuItem("", "Content Policy", "", "/content", false, [], [], {}));
|
||||
}
|
||||
this.userMenuItems = [ /*new MenuItem("","My profile","","",false,[],[],{}),*/
|
||||
new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Invite users", "", "/invite", false, [], [], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
];
|
||||
if (this.managerOfCommunities) {
|
||||
this.userMenuItems.push(new MenuItem("", "Support", "https://openaire-connect.d4science.org/group/openaire-connect-gateway/explore?siteId=172366611", "", false, [], [], {}))
|
||||
}
|
||||
}
|
||||
this.showMenu = true;
|
||||
});
|
||||
public toggleOpen(event = null) {
|
||||
if(!event) {
|
||||
this.sideBarService.setOpen(!this.open);
|
||||
} else if(event && event['value'] === true) {
|
||||
this.sideBarService.setOpen(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/en
|
|||
import {CommunitiesService} from './openaireLibrary/connect/communities/communities.service';
|
||||
import {LayoutService} from "./openaireLibrary/services/layout.service";
|
||||
import {SubscribeModule} from './utils/subscribe/subscribe.module';
|
||||
import {StakeholderService} from "./services/stakeholder.service";
|
||||
|
||||
@NgModule({
|
||||
|
||||
|
@ -38,7 +39,7 @@ import {SubscribeModule} from './utils/subscribe/subscribe.module';
|
|||
],
|
||||
declarations: [ AppComponent, OpenaireErrorPageComponent],
|
||||
exports: [ AppComponent ],
|
||||
providers:[EnvironmentSpecificResolver, CommunitiesService, LayoutService],
|
||||
providers:[EnvironmentSpecificResolver],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
//
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
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 {HomeComponent} from "./home.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: HomeComponent,
|
||||
canActivate: [FreeGuard],
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class HomeRoutingModule {
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
<aside *ngIf="stakeholder" id="sidebar_main">
|
||||
<div class="sidebar_main_header">
|
||||
<div class="uk-padding-small">
|
||||
<img class="uk-margin-bottom" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">
|
||||
<div class="uk-text-bold">{{stakeholder.index_name}}</div>
|
||||
<div>Admin Dashboard</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu_section">
|
||||
<ul>
|
||||
<li [class.current_section]="analysisOpen"
|
||||
[class.act_section]="analysisOpen"
|
||||
title="Analysis Indicators"
|
||||
class="submenu_trigger">
|
||||
<a [routerLink]="" (click)="analysisOpen = !analysisOpen">
|
||||
<span class="menu_icon"><i class="material-icons">donut_large</i></span>
|
||||
<span class="menu_title">Analysis Indicators</span>
|
||||
</a>
|
||||
<ul [style.display]="(analysisOpen?'block':'none')">
|
||||
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-j="index">
|
||||
<li>
|
||||
<a [routerLink]="topic.alias">
|
||||
<span *ngIf="topic.icon" class="menu_icon uk-margin-small-right"><i
|
||||
class="material-icons">{{topic.icon}}</i></span>
|
||||
<span class="menu_title">{{topic.name}}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ng-template>
|
||||
<li>
|
||||
<a [routerLink]="" (click)="newTopicOpen()">
|
||||
<span class="menu_icon"><i class="material-icons">add</i></span>
|
||||
<span class="menu_title">Create new Topic</span>
|
||||
</a>
|
||||
<div uk-drop="mode: click; offset: -2; delay-hide: 0" #newTopic
|
||||
class="uk-padding-large uk-padding-remove-vertical uk-padding-remove-right uk-drop">
|
||||
<div *ngIf="topic">
|
||||
<div class="md-card">
|
||||
<div class="md-card-content uk-position-relative">
|
||||
<a [routerLink]="" class="uk-position-top-right">
|
||||
<i (click)="close(newTopic)" class="material-icons">close</i>
|
||||
</a>
|
||||
<div class="uk-grid-small" uk-grid>
|
||||
<div class="uk-width-1-1">
|
||||
<label class="uk-text-bold">New Topic</label>
|
||||
<input class="uk-input uk-form-small" [(ngModel)]="topic.name"
|
||||
[class.uk-form-danger]="!valid" type="text">
|
||||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<select class="uk-select uk-form-small" [(ngModel)]="topic.isPublic">
|
||||
<option [value]="true">Public</option>
|
||||
<option [value]="false">Private</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="uk-width-1-2">
|
||||
<select class="uk-select uk-form-small" [(ngModel)]="topic.isActive">
|
||||
<option [value]="true">Active</option>
|
||||
<option [value]="false">Inactive</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="uk-grid-small uk-child-width-1-2" uk-grid>
|
||||
<div>
|
||||
<button class="md-btn md-btn-small" (click)="close(newTopic)">Cancel</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="md-btn md-btn-small md-btn-primary uk-float-right" (click)="createTopic(newTopic)">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
<div id="page_content" click-outside-or-esc targetId="page_content" (clickOutside)="toggleOpen($event)">
|
||||
<div id="page_content_inner">
|
||||
<h4 class="uk-text-bold">
|
||||
Customise your Monitor Dashboard!
|
||||
</h4>
|
||||
<div class="uk-text-large uk-margin-bottom">
|
||||
<div>
|
||||
Modify or add new topics, categories and content.<br><br>
|
||||
Start your navigation through the <span class="md-color-blue-700">left side menu!</span>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-margin-small-bottom uk-margin-large-left">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="27" height="88" viewBox="0 0 27 88">
|
||||
<g id="Group_749" data-name="Group 749" transform="translate(-872.168 -490.5)">
|
||||
<text class="fill_text" id="OR" transform="translate(872.168 540.271)" font-size="18"
|
||||
font-family="OpenSans-Bold, Open Sans" font-weight="900" opacity="0.8">
|
||||
<tspan x="0" y="0">OR</tspan>
|
||||
</text>
|
||||
<line class="stroke_line" id="Line_225" data-name="Line 225" y2="30" transform="translate(885.5 490.5)"
|
||||
fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
|
||||
<line class="stroke_line" id="Line_226" data-name="Line 226" y2="30" transform="translate(885.5 548.5)"
|
||||
fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="uk-width-1-1">
|
||||
Select one of the <span class="md-color-blue-700">topics below</span>!
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-medium" uk-grid uk-height-match="target: .target">
|
||||
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic>
|
||||
<div>
|
||||
<a [routerLink]="topic.alias">
|
||||
<div class="md-card target">
|
||||
<div class="md-card-content">
|
||||
<h6 class="uk-text-bold">{{topic.name}}</h6>
|
||||
<div class="uk-text-secondary">
|
||||
{{topic.description}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -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 { }
|
|
@ -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: `
|
||||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<ng-template #one>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">1. Understanding your needs</h5>
|
||||
<div>
|
||||
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.
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #two>
|
||||
<h5 class=" uk-text-bold uk-margin-small-bottom">2. Develop a pilot</h5>
|
||||
<div>
|
||||
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.
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #three>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">3. Test and Validate</h5>
|
||||
<div>
|
||||
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.
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #four>
|
||||
<h5 class=" uk-text-bold uk-margin-small-bottom">4. Roll out the service</h5>
|
||||
<div>
|
||||
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.
|
||||
</div>
|
||||
</ng-template>
|
||||
<div class="image-front-topbar"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<!--<div style=" min-height: calc(7.89999px + 60vh); background-image: url('assets/about/background.png') !important;"
|
||||
class="uk-section uk-background-norepeat uk-background-cover uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large uk-section uk-margin-top uk-padding-remove-top">
|
||||
<div class="uk-margin-large-top uk-grid">
|
||||
<h1 class="uk-width-1-1 font-41 uk-text-bold">Learn the process</h1>
|
||||
<div class="uk-width-1-2@l uk-width-1-1@s uk-h5 uk-margin-top">Build a <b>Gateway to your community's</b>
|
||||
open and linked research outcomes. Customized to your needs.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top uk-flex uk-child-width-1-3@m uk-child-width-1-1@s uk-flex-center" uk-grid>
|
||||
<div class="uk-flex uk-child-width-1-1@m uk-child-width-1-2@s" uk-grid>
|
||||
<div>
|
||||
<ng-container *ngTemplateOutlet="one"></ng-container>
|
||||
</div>
|
||||
<div class="uk-visible@m">
|
||||
<ng-container *ngTemplateOutlet="four"></ng-container>
|
||||
</div>
|
||||
<div class="uk-hidden@m">
|
||||
<ng-container *ngTemplateOutlet="two"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<img src="../../assets/about/cycle.png">
|
||||
</div>
|
||||
<div class="uk-flex uk-child-width-1-1@m uk-child-width-1-2@s" uk-grid>
|
||||
<div class="uk-visible@m">
|
||||
<ng-container *ngTemplateOutlet="two"></ng-container>
|
||||
</div>
|
||||
<div class="uk-hidden@m uk-visible@s">
|
||||
<ng-container *ngTemplateOutlet="four"></ng-container>
|
||||
</div>
|
||||
<div>
|
||||
<ng-container *ngTemplateOutlet="three"></ng-container>
|
||||
</div>
|
||||
<div class="uk-hidden@s uk-visible@xs">
|
||||
<ng-container *ngTemplateOutlet="four"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-1 uk-text-center uk-text-large uk-margin-large-top">
|
||||
<a class="uk-button portal-button uk-text-uppercase" routerLinkActive="router-link-active"
|
||||
routerLink="/about/learn-in-depth"> Learn more details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-image: url('assets/cloud/abstract.png') !important;"
|
||||
class="uk-background-norepeat uk-section uk-background-center uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large">
|
||||
<gif-slider [gifs]="gifs"></gif-slider>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color: #CFDEF1;"
|
||||
class="uk-background-norepeat uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-text-bold uk-h4">We look forward to working together and helping you unlock the full
|
||||
potential of your research community through open science.
|
||||
</div>
|
||||
<div class="uk-margin-medium">Get in touch with our team to find out how.</div>
|
||||
<div class="uk-inline">
|
||||
<a class="uk-button portal-button" routerLinkActive="router-link-active" routerLink="/contact-us">
|
||||
CONTACT US</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-text-center uk-width-1-1@s uk-width-1-3@m">
|
||||
<img width="263" height="250" src="assets/connect-assets/contact/3.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
`
|
||||
})
|
||||
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'");
|
||||
}
|
||||
}
|
|
@ -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 { }
|
|
@ -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 { }
|
|
@ -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: `
|
||||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<div class="image-front-topbar"
|
||||
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}"
|
||||
tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<!--<div
|
||||
class="uk-background-norepeat uk-background-cover uk-section uk-padding-remove-bottom uk-section-overlap uk-position-relative uk-preserve-color"
|
||||
style="min-height: calc(7.89999px + 60vh); background-image: url('assets/cloud/background.png') !important;">
|
||||
<div class="uk-container uk-container-large uk-section uk-margin-top uk-padding-remove-top">
|
||||
<div uk-grid>
|
||||
<div class="uk-margin-large-top uk-width-3-4@m uk-width-1-1@s">
|
||||
<h1 class="uk-width-3-4 uk-margin-medium-bottom">Let’s set up a Gateway for your Community
|
||||
<b>Together</b></h1>
|
||||
<div class="uk-width-4-5@m uk-width-1-1@s uk-h5">
|
||||
<div class="uk-margin-bottom">You don’t have to go alone.</div>
|
||||
<div>
|
||||
We work with you in <b>4 collaborative steps</b> to identify your needs, putting in practice our
|
||||
expertise on open science so you get the most out of OpenAIRE’s operational services.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top uk-width-expand">
|
||||
<img width="308" height="285" src="assets/connect-assets/banner/together.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-container uk-container-large uk-section uk-padding-remove-top">
|
||||
<ul class="uk-breadcrumb">
|
||||
<li><a routerLinkActive="router-link-active" routerLink="/about">About</a></li>
|
||||
<li><span class="active">Learn in-depth</span></li>
|
||||
</ul>
|
||||
<div uk-grid>
|
||||
<div class="uk-width-1-6 uk-position-relative uk-flex uk-flex-column">
|
||||
<img src="assets/connect-assets/about/1.png" class="uk-align-center" width="100px" height="100px">
|
||||
<img src="assets/connect-assets/sketch_line_arrow.svg" class="uk-align-center">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-medium uk-text-bold uk-h4">1. Analyse your needs</div>
|
||||
<i>Identify the scope and goals. Understand open science practices within EOSC and the OpenAIRE
|
||||
services</i>
|
||||
|
||||
<p>
|
||||
In this stage, you get to talk to the OpenAIRE team.
|
||||
Share your expectations with us and let us give you all the details about the operational OpenAIRE
|
||||
services, which will be integrated into the Gateway for your community.
|
||||
</p>
|
||||
<p>
|
||||
Here are the most important questions that the OpenAIRE team will ask you, in order to understand your
|
||||
scope and goals:
|
||||
</p>
|
||||
<ul class="uk-list uk-list-bullet">
|
||||
<li>
|
||||
Do you want a gateway, where researchers can have access to all research products of a discipline?
|
||||
Do you want a gateway that gathers any research outcome, produced thanks to the funding and services
|
||||
of a given research infrastructure?
|
||||
</li>
|
||||
<li>
|
||||
Is your community (in)formally organized in sub-communities?
|
||||
Would you like to browse research products and get statistics also for these sub-communities?
|
||||
For example, the European Grid Infrastructure (EGI) features “virtual organizations” that represent
|
||||
discipline-specific communities and/or specific research projects.
|
||||
The research infrastructure DARIAH, on the other hand, is organised in national nodes (e.g.
|
||||
DARIAH-IT, DARIAH-DE).
|
||||
</li>
|
||||
<li>
|
||||
How can the OpenAIRE team identify the research products of your community, among all those
|
||||
available in the OpenAIRE Graph?
|
||||
Through a series of steps: set of keywords, acknowledgment statements, set of projects, set of
|
||||
repositories, etc.
|
||||
This can be partial and provisional information that will serve as a starting point to the OpenAIRE
|
||||
team.
|
||||
You will be able to refine and update this information, in the second phase “Develop a pilot”.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div uk-grid uk-height-match>
|
||||
<div class="uk-width-1-6 uk-position-relative uk-flex uk-flex-column">
|
||||
<img src="assets/connect-assets/about/2.png" class="uk-align-center" width="100px" height="100px">
|
||||
<img src="assets/connect-assets/sketch_line_arrow.svg" class="uk-align-center">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-medium uk-text-bold uk-h4">2. Develop a pilot</div>
|
||||
<i>We translate your needs into rules and processes and we configure operational OpenAIRE services.</i>
|
||||
|
||||
<p>
|
||||
Based on the information gathered in phase 1 “Analyse your needs”, the OpenAIRE team will set up a
|
||||
pilot Gateway.
|
||||
We will configure the OpenAIRE mining algorithms to identify research products of the OpenAIRE Graph
|
||||
that are relevant to your community.
|
||||
Those, together with some basic statistics, will be available in the pilot version of the Community
|
||||
Gateway that will be deployed on the OpenAIRE BETA infrastructure.
|
||||
</p>
|
||||
<p>
|
||||
The OpenAIRE team will give you a demo of the Community Gateway, with details on how to refine and
|
||||
update the configuration of the Community Gateway, both in terms of criteria for including research
|
||||
products and in terms of logo and visible portal pages.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div uk-grid uk-height-match>
|
||||
<div class="uk-width-1-6 uk-position-relative uk-flex uk-flex-column">
|
||||
<img src="assets/connect-assets/about/3.png" class="uk-align-center" width="100px" height="100px">
|
||||
<img src="assets/connect-assets/sketch_line_arrow_large.svg" class="uk-align-center">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-medium uk-text-bold uk-h4">3. Test and Validate</div>
|
||||
<i>You validate and test your new Community Gateway (portal). If needed, we further refine and adapt to
|
||||
your needs</i>
|
||||
|
||||
<p>
|
||||
Upon the completion of phase 2, take the time you need to test all its features, from search and
|
||||
browse for research products, to addition/removal of statistics from the portal.
|
||||
You can report any issue you might find and ask questions directly to the dedicated OpenAIRE team, via
|
||||
a specially designed collaboration tool.
|
||||
</p>
|
||||
<p>
|
||||
Typically, this phase takes some months, as you will have to go through certain procedures.
|
||||
Change the configuration of the criteria to include research products, wait for the new configuration
|
||||
to be applied on the OpenAIRE graph and validate the results, before you actually decide that the
|
||||
coverage of research products for your community is adequate.
|
||||
</p>
|
||||
<p>
|
||||
For some communities, the OpenAIRE team may also be able to implement dedicated mining algorithms
|
||||
(e.g. to find acknowledgement statements to your community/infrastructure in the full-texts of
|
||||
research articles) that may require several rounds of application, validation, and fine-tuning, before
|
||||
it reaches a high precision and recall.
|
||||
Your feedback is very important to minimize the effort and time needed for this process to complete.
|
||||
</p>
|
||||
|
||||
<div class="uk-width-1-1 uk-text-center uk-margin-medium ">
|
||||
<img src="assets/connect-assets/OpenAIRE-RCD_howtos.png" width="auto" height="auto">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div uk-grid uk-height-match>
|
||||
<div class="uk-width-1-6 uk-position-relative">
|
||||
<img src="assets/connect-assets/about/4.png" class="uk-align-center" width="100px" height="100px">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-margin-medium uk-text-bold uk-h4">4. Roll out the service</div>
|
||||
<i>We jointly roll out your new portal. You take over the business operations and start engaging your
|
||||
researchers</i>
|
||||
|
||||
<p>
|
||||
Here we are: the coverage of research products is good, interesting statistics and charts have been
|
||||
selected, and the portal pages available for end-users are ready.
|
||||
We can roll out the Community Gateway and make it available to all the researchers of the community!
|
||||
</p>
|
||||
<p>
|
||||
You, as a Community manager, become the main “promoter” of the Community Gateway.
|
||||
Engage the researchers of your community and, when applicable, inform the managers of the research
|
||||
infrastructure about the availability of tools for impact monitoring.
|
||||
</p>
|
||||
<p>
|
||||
Remember that you will still be able to change the configuration of the Community Gateway in order to
|
||||
address any issue that may arise and to follow the evolution of the community (e.g. a new project or a
|
||||
new content provider that was not previously available in OpenAIRE).
|
||||
</p>
|
||||
<p>
|
||||
Remember that you don’t have to go alone: the dedicated issue tracker you used in the “Test and
|
||||
Validate” phase is always available for you to contact the OpenAIRE team and ask for support.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background-color: #CFDEF1;"
|
||||
class="uk-background-norepeat uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
||||
<div class="uk-text-center uk-width-1-1@s uk-width-1-2@m">
|
||||
<img width="329" height="250" src="assets/connect-assets/contact/2.png">
|
||||
</div>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-text-bold uk-h4">
|
||||
<div>Let us help you develop a collaborative Open Science Gateway for your community. It is fast. It
|
||||
is reliable.
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-medium">Get in touch with our team to find out how.</div>
|
||||
<div class="uk-inline">
|
||||
<a class="uk-button portal-button" routerLink="/contact-us" routerLinkActive="router-link-active">
|
||||
CONTACT
|
||||
US</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class LearnInDepthComponent {
|
||||
public piwiksub: any;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
public url: string = null;
|
||||
public pageTitle: string = "OpenAIRE - Connect | Learn In Depth";
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
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 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'");
|
||||
}
|
||||
}
|
|
@ -1,31 +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 {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";
|
||||
import {Schema2jsonldModule} from "../../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, LearnInDepthRoutingModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule
|
||||
],
|
||||
declarations: [
|
||||
LearnInDepthComponent
|
||||
],
|
||||
exports: [
|
||||
LearnInDepthComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder, PiwikService, IsRouteEnabled
|
||||
]
|
||||
})
|
||||
export class LearnInDepthModule { }
|
|
@ -1,19 +1,23 @@
|
|||
<aside id="sidebar_main">
|
||||
<!-- <div class="sidebar_main_header">-->
|
||||
<!-- <div *ngIf="name" class="uk-margin-top uk-margin-left">-->
|
||||
<!-- <div class="uk-text-bold">{{name}}</div>-->
|
||||
<!-- <div>Monitor Dashboard</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="menu_section" >
|
||||
<div class="sidebar_main_header">
|
||||
<div *ngIf="name" class="uk-padding-small">
|
||||
<div class="uk-text-bold">{{name}}</div>
|
||||
<div>Monitor Dashboard</div>
|
||||
</div>
|
||||
<div *ngIf="header" class="uk-padding-small">
|
||||
<img *ngIf="header.logoUrl" [src]="header.logoUrl">
|
||||
<div class="uk-text-bold uk-margin-top">{{header.name}}</div>
|
||||
<div>{{header.dashboard}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu_section">
|
||||
<ul>
|
||||
<ng-template ngFor [ngForOf]="items" let-item let-i="index">
|
||||
<li [class.current_section]="isTheActiveMenu(item.route)"
|
||||
[class.art_section]="item.open"
|
||||
[class.act_section]="item.open"
|
||||
[title]="item.name"
|
||||
[class.submenu_trigger]="item.items.length > 1">
|
||||
<a *ngIf="item.items.length < 1 && item.route" [routerLink]="item.route">
|
||||
<a *ngIf="item.items.length <= 1 && item.route" [routerLink]="item.route">
|
||||
<span *ngIf="item.icon" class="menu_icon"><i class="material-icons">{{item.icon}}</i></span>
|
||||
<span class="menu_title">{{item.name}}</span>
|
||||
</a>
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {Router} from "@angular/router";
|
||||
import {Item} from "../../utils/entities/sidebar";
|
||||
import {Header, Item} from "../../../utils/entities/sidebar";
|
||||
|
||||
@Component({
|
||||
selector: 'dashboard-sidebar',
|
||||
|
@ -8,7 +8,9 @@ import {Item} from "../../utils/entities/sidebar";
|
|||
})
|
||||
export class SideBarComponent implements OnInit {
|
||||
@Input() items: Item[] = [];
|
||||
// TODO remove it
|
||||
@Input() name = null;
|
||||
@Input() header: Header = null;
|
||||
|
||||
constructor(private router: Router) {
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {BehaviorSubject, Observable} from "rxjs";
|
||||
import {Header, Item} from "../../../utils/entities/sidebar";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SideBarService {
|
||||
|
||||
private openSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private hasSidebarSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
get open(): boolean {
|
||||
return this.openSubject.getValue();
|
||||
}
|
||||
|
||||
setOpen(value: boolean) {
|
||||
this.openSubject.next(value);
|
||||
}
|
||||
|
||||
get hasSidebar(): Observable<boolean> {
|
||||
return this.hasSidebarSubject.asObservable();
|
||||
}
|
||||
|
||||
setHasSidebar(value: boolean) {
|
||||
this.hasSidebarSubject.next(value);
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {BehaviorSubject} from "rxjs";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SidebarOpenService {
|
||||
|
||||
private openSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
|
||||
constructor() {}
|
||||
|
||||
get open(): boolean {
|
||||
return this.openSubject.getValue();
|
||||
}
|
||||
|
||||
setOpen(value: boolean) {
|
||||
this.openSubject.next(value);
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ import {StakeholderService} from "../services/stakeholder.service";
|
|||
import {Category, IndicatorPath, Stakeholder, SubCategory, Topic} from "../utils/entities/stakeholder";
|
||||
import {StatisticsService} from "../utils/services/statistics.service";
|
||||
import {Item, Sidebar} from "../utils/entities/sidebar";
|
||||
import {SidebarOpenService} from "../library/sidebar/sidebar-open.service";
|
||||
import {SideBarService} from "../library/sharedComponents/sidebar/sideBar.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor',
|
||||
|
@ -46,7 +46,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
private helper: HelperService,
|
||||
private stakeholderService: StakeholderService,
|
||||
private statisticsService: StatisticsService,
|
||||
private sidebarOpenService: SidebarOpenService,
|
||||
private sideBarService: SideBarService,
|
||||
private seoService: SEOService,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private sanitizer: DomSanitizer) {
|
||||
|
@ -93,14 +93,14 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
public get open() {
|
||||
return this.sidebarOpenService.open;
|
||||
return this.sideBarService.open;
|
||||
}
|
||||
|
||||
public toggleOpen(event = null) {
|
||||
if(!event) {
|
||||
this.sidebarOpenService.setOpen(!this.open);
|
||||
this.sideBarService.setOpen(!this.open);
|
||||
} else if(event && event['value'] === true) {
|
||||
this.sidebarOpenService.setOpen(false);
|
||||
this.sideBarService.setOpen(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
|
|||
subItems, null, open));
|
||||
}
|
||||
});
|
||||
this.sideBar = new Sidebar(items);
|
||||
this.sideBar = new Sidebar(items, null);
|
||||
}
|
||||
|
||||
private setIndicators() {
|
||||
|
|
|
@ -13,9 +13,8 @@ import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2js
|
|||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {MonitorRoutingModule} from "./monitor-routing.module";
|
||||
import {MonitorComponent} from "./monitor.component";
|
||||
import {StakeholderService} from "../services/stakeholder.service";
|
||||
import {StatisticsService} from "../utils/services/statistics.service";
|
||||
import {SideBarModule} from "../library/sidebar/sideBar.module";
|
||||
import {SideBarModule} from "../library/sharedComponents/sidebar/sideBar.module";
|
||||
import {ModalModule} from "../openaireLibrary/utils/modal/modal.module";
|
||||
|
||||
@NgModule({
|
||||
|
@ -28,7 +27,7 @@ import {ModalModule} from "../openaireLibrary/utils/modal/modal.module";
|
|||
],
|
||||
providers: [
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
PiwikService, StakeholderService,
|
||||
PiwikService,
|
||||
StatisticsService
|
||||
],
|
||||
exports: [
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BehaviorSubject, Observable} from "rxjs";
|
||||
import {Indicator, Stakeholder} from "../utils/entities/stakeholder";
|
||||
import {map} from "rxjs/operators";
|
||||
import {Stakeholder} from "../utils/entities/stakeholder";
|
||||
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: "root"
|
||||
})
|
||||
export class StakeholderService {
|
||||
|
||||
private stakeholderSubject: BehaviorSubject<Stakeholder> = null;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
this.stakeholderSubject = new BehaviorSubject<Stakeholder>(null);
|
||||
}
|
||||
|
||||
getStakeholder(alias: string): Observable<Stakeholder> {
|
||||
/*return this.http.get<any>('./assets/stakeholders.json').pipe(map(json => {
|
||||
let stakeholder = json.stakeholders.filter(stakeholder => stakeholder.alias === alias)[0];
|
||||
if (stakeholder) {
|
||||
stakeholder.topics = stakeholder.topics.filter(topic => topic.isActive && topic.isPublic);
|
||||
return stakeholder;
|
||||
} else {
|
||||
throw new HttpErrorResponse({
|
||||
error: {
|
||||
message: 'No Stakeholder has been found',
|
||||
status: 404
|
||||
}
|
||||
})
|
||||
}
|
||||
}));*/
|
||||
return new BehaviorSubject<Stakeholder>(Stakeholder.createECStakeholder()).asObservable();
|
||||
}
|
||||
|
||||
getStakeholderAsObservable(): Observable<Stakeholder> {
|
||||
return this.stakeholderSubject.asObservable();
|
||||
}
|
||||
|
||||
get stakeholder(): Stakeholder {
|
||||
return this.stakeholderSubject.getValue();
|
||||
}
|
||||
|
||||
setStakeholder(stakeholder: Stakeholder) {
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,41 @@
|
|||
import {ElementRef, TemplateRef} from "@angular/core";
|
||||
|
||||
export class Header {
|
||||
name: string;
|
||||
dashboard: string;
|
||||
logoUrl: string;
|
||||
|
||||
constructor(name: string, dashboard: string, logoUrl: string = null) {
|
||||
this.name = name;
|
||||
this.dashboard = dashboard;
|
||||
this.logoUrl = logoUrl
|
||||
}
|
||||
}
|
||||
|
||||
export class Item {
|
||||
name: string;
|
||||
route: string;
|
||||
items: Item[];
|
||||
icon: string;
|
||||
open: boolean;
|
||||
action: TemplateRef<ElementRef>;
|
||||
|
||||
constructor(name: string, route: string, items: Item[], icon, open: boolean) {
|
||||
constructor(name: string, route: string, items: Item[], icon, open: boolean, action: TemplateRef<ElementRef> = null) {
|
||||
this.name = name;
|
||||
this.route = route;
|
||||
this.items = items;
|
||||
this.icon = icon;
|
||||
this.open = open;
|
||||
this.action = action;
|
||||
}
|
||||
}
|
||||
|
||||
export class Sidebar {
|
||||
items: Item[];
|
||||
header: Header;
|
||||
|
||||
constructor(items: Item[]) {
|
||||
constructor(items: Item[], header: Header) {
|
||||
this.items = items;
|
||||
this.header = header;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,3 +17,7 @@
|
|||
--connect-portal-lower-tone: #b48536;
|
||||
--develop-portal-lower-tone: #9f4e7e;
|
||||
}
|
||||
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue