[Connect|Trunk]
Add html page for connect (helptexts): Publications Add new html Pages per community (helptexts): Projects and funding National Bulletins Content (moved from connect to separate page per community) add the routes and the menu items for the above pages Use htmlComponent for pages that their main content comes from helptexts includes piwik, metatags and jsonld updates Links to community pages: for production installation go to BETA Remove unnused component AboutPageComponent Piwik: add ids for new communities Community page: add check for communities without charts add check if charts is Active git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58471 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
cf5a7a553b
commit
314504e535
|
@ -19,6 +19,9 @@ const routes: Routes = [
|
|||
{ path: 'invite', loadChildren: './utils/subscribe/invite/invite.module#InviteModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'publications', loadChildren: './htmlPages/publications/publications-page.module#PublicationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'projects', loadChildren: './htmlPages/projects/projectsPage.module#ProjectsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'national-bulletins', loadChildren: './htmlPages/nationalBulletins/nationalBulletinsPage.module#NaionalBulletinPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
{ path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
|
|
@ -186,6 +186,18 @@ export class AppComponent {
|
|||
new MenuItem("", "Learn more", this.properties.claimsInformationLink, "", false, [], [], {})
|
||||
]
|
||||
});
|
||||
this.menuItems.push(
|
||||
{
|
||||
rootItem: new MenuItem("about", "About", "", "", false, [], [], {}),
|
||||
items: [
|
||||
new MenuItem("", "Supporting organizations", "", "/organizations", false, [], ["/organizations"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Gateway curators", "", "/curators", false, [], ["/curators"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Sources and methology", "", "/content", false, [], ["/content"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "National Bulletins", "", "/national-bulletins", false, [], ["/national-bulletins"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
//new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
]
|
||||
});
|
||||
if (isCommunityManager) {
|
||||
this.menuItems.push(
|
||||
{
|
||||
|
@ -201,7 +213,12 @@ export class AppComponent {
|
|||
this.menuItems = [];
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("about", "About", "", "/about/learn-how", false, [], null, {}),
|
||||
items: []
|
||||
items: [
|
||||
new MenuItem("", "Learn the process", "", "/about/learn-how", false, [], [], {}),
|
||||
new MenuItem("", "Publications", "", "/community-publications", false, [], ["/community-publications"], this.properties.environment != "development" ? {} : {communityId: community.communityId}),
|
||||
new MenuItem("", "Roadmap", "https://trello.com/b/yfzUz0kp/openaire-connect-dashboard", "", false, [], [], {}),
|
||||
]
|
||||
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("communities", "Communities", "", "/search/find/communities", false, [], null, {}),
|
||||
|
|
|
@ -73,10 +73,10 @@
|
|||
<div>
|
||||
<div class="uk-position-small uk-position-bottom-right">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit
|
||||
Visit {{(properties.environment == 'production'?' BETA':'')}}
|
||||
</a>
|
||||
<a *ngIf="!directLink" (click)="confirmModalOpen()" class="portal-link uk-text-uppercase uk-text-bold">
|
||||
Visit
|
||||
Visit {{(properties.environment == 'production'?' BETA':'')}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,7 +49,8 @@ export class BrowseCommunityComponent {
|
|||
}
|
||||
|
||||
getProductionPrefix(): string {
|
||||
return (this.properties.environment == "beta") ? "beta." : ""
|
||||
//return (this.properties.environment == "beta") ? "beta." : ""
|
||||
return "beta.";
|
||||
}
|
||||
|
||||
public confirmModalOpen() {
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
let-allowedCharts="allowedCharts" let-chartsInfoMap="chartsInfoMap"
|
||||
let-showChartTitle="showChartTitle"
|
||||
let-showIn="showIn">
|
||||
<div *ngIf=" showIn == 'showInMonitor' && allowedCharts && allowedCharts[entity].length == 0 &&
|
||||
<div *ngIf=" showIn == 'showInMonitor' && allowedCharts && allowedCharts[entity] && allowedCharts[entity].length == 0 &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['total'][showIn] && !statisticsDisplay.entities[entity].numbers.map['project'][showIn] &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['open'][showIn] && !statisticsDisplay.entities[entity].numbers.map['closed'][showIn] &&
|
||||
!statisticsDisplay.entities[entity].numbers.map['embargo'][showIn] && !statisticsDisplay.entities[entity].numbers.map['restricted'][showIn]"
|
||||
|
@ -318,7 +318,7 @@
|
|||
</div>
|
||||
|
||||
</ng-template>
|
||||
<div class="uk-text-center">
|
||||
<div class="uk-text-center" *ngIf="statistics.statisticsDisplay && statistics.statisticsDisplay.isActive">
|
||||
<!-- <button [class]="'uk-button '+((show == 'overview')?'uk-disabled ':' uk-button-default ')"
|
||||
(click)="show='overview'">Overview
|
||||
</button>
|
||||
|
|
|
@ -4,11 +4,12 @@ import { RouterModule } from '@angular/router';
|
|||
import {ContentPageComponent} from './contentPage.component';
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: ContentPageComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: ContentPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -1,81 +1,15 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
|
||||
@Component({
|
||||
selector: 'content',
|
||||
templateUrl: './contentPage.component.html'
|
||||
template: `
|
||||
<html-page description="Sources and methology" pageTitle="Sources and methology"></html-page>
|
||||
`
|
||||
})
|
||||
export class ContentPageComponent {
|
||||
|
||||
properties: EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
public url: string = null;
|
||||
public pageTitle: string = "OpenAIRE - Connect | Content Policy";
|
||||
piwiksub: any;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService,
|
||||
private helper: HelperService) {}
|
||||
|
||||
constructor() {}
|
||||
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("content, open access");
|
||||
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
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'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,22 +7,19 @@ 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";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
import {HtmlPagesModule} from "../htmlPages/htmlPages.module";
|
||||
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ContentPageRoutingModule, RouterModule, CommonModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule
|
||||
ContentPageRoutingModule, RouterModule, CommonModule,
|
||||
HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
ContentPageComponent
|
||||
],
|
||||
providers: [FreeGuard, PreviousRouteRecorder],
|
||||
providers: [FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
ContentPageComponent
|
||||
]
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
import {Component, Input, Output, EventEmitter, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import{EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
@Component({
|
||||
selector: 'about',
|
||||
template: `
|
||||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<html-page></html-page>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class AboutPageComponent {
|
||||
properties:EnvProperties;
|
||||
|
||||
constructor ( private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title) {}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.updateUrl(data.envSpecific.baseLink+this._router.url);
|
||||
this.updateTitle("About");
|
||||
this.updateDescription("About, open access");
|
||||
});
|
||||
}
|
||||
|
||||
private updateDescription(description:string){
|
||||
this._meta.updateTag({content:description},"name='description'");
|
||||
this._meta.updateTag({content:description},"property='og:description'");
|
||||
}
|
||||
private updateTitle(title:string){
|
||||
var _prefix ="OpenAIRE | ";
|
||||
var _title = _prefix + ((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,26 +0,0 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
import {AboutPageComponent} from './aboutPage.component';
|
||||
import {AboutPageRoutingModule} from './aboutPage-routing.module';
|
||||
|
||||
import {HtmlPagesModule} from '../htmlPages.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
AboutPageRoutingModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
AboutPageComponent
|
||||
],
|
||||
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
AboutPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class AboutPageModule{}
|
|
@ -1,62 +1,87 @@
|
|||
import { Component, Input } from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import 'rxjs/Rx';
|
||||
import {HtmlPageService} from './htmlPage.service';
|
||||
import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||
import {SafeHtmlPipe} from '../openaireLibrary/utils/pipes/safeHTML.pipe';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {Meta, Title} from "@angular/platform-browser";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'html-page',
|
||||
template: `
|
||||
<div [innerHTML]="content | safeHtml"></div>
|
||||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
`
|
||||
})
|
||||
export class HtmlPageComponent {
|
||||
public content:string="";
|
||||
sub:any;
|
||||
properties:EnvProperties;
|
||||
private communityId: string = null;
|
||||
constructor (private _service: HtmlPageService, private route: ActivatedRoute,) {}
|
||||
|
||||
ngOnInit() {
|
||||
properties: EnvProperties;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
@Input() url: string = null;
|
||||
@Input() pageTitle: string;
|
||||
@Input() description: string;
|
||||
piwiksub: any;
|
||||
communityId;
|
||||
|
||||
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;
|
||||
this.route.queryParams.subscribe(
|
||||
params => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = params['communityId'];
|
||||
}
|
||||
this.properties = data.envSpecific;
|
||||
|
||||
if(!this.communityId){
|
||||
this.communityId = this.properties.adminToolsCommunity;
|
||||
}
|
||||
if(location){
|
||||
this.sub = this._service.getHtmlContent(this.properties, this.communityId, location.pathname).subscribe(
|
||||
data => {
|
||||
if(data.length > 0) {
|
||||
this.content = data[0].content;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
//console.log(err);
|
||||
this.handleError("Error getting html content with route: "+location.pathname+" for community with id: "+this.communityId, err);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe();
|
||||
}
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if (this.properties.environment == "development") {
|
||||
this.route.queryParams.subscribe(params => {
|
||||
this.communityId = (params['communityId']) ? params['communityId'] : ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
})
|
||||
}
|
||||
//TODO set the proper URL
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription(this.description);
|
||||
this.getPageContents();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(this.sub){
|
||||
this.sub.unsubscribe();
|
||||
if(this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error("Html Page: "+message, error);
|
||||
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'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
import {Injectable, Inject} from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/of';
|
||||
import 'rxjs/add/operator/do';
|
||||
import 'rxjs/add/operator/share';
|
||||
import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
@Injectable()
|
||||
export class HtmlPageService {
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
getHtmlContent (properties:EnvProperties, communityId:string, page_route: string):any {
|
||||
//console.info("get router html content for : "+router);
|
||||
|
||||
let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+page_route;
|
||||
|
||||
return this.http.get<Array<any>>((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||
//.map(res => <Array<any>> res.json());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,17 +1,20 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {HtmlPageComponent} from './htmlPage.component';
|
||||
import {HtmlPageService} from './htmlPage.service';
|
||||
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
||||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SafeHtmlPipeModule
|
||||
RouterModule, CommonModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule
|
||||
],
|
||||
declarations: [
|
||||
HtmlPageComponent
|
||||
],
|
||||
providers:[HtmlPageService],
|
||||
exports: [
|
||||
HtmlPageComponent
|
||||
]
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {NaionalBulletinPageComponent} from './nationalBulletinsPage.component';
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: NaionalBulletinPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class NaionalBulletinPageRoutingModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'natinal-bulletin',
|
||||
template: `
|
||||
<html-page description="Sources and methology" pageTitle="Sources and methology"></html-page>
|
||||
`
|
||||
})
|
||||
export class NaionalBulletinPageComponent {
|
||||
constructor() {}
|
||||
public ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
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 {NaionalBulletinPageComponent} from './nationalBulletinsPage.component';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HtmlPagesModule} from "../htmlPages.module";
|
||||
import {NaionalBulletinPageRoutingModule} from "./nationalBulletinsPage-routing.module";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
NaionalBulletinPageRoutingModule, RouterModule, CommonModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
NaionalBulletinPageComponent
|
||||
],
|
||||
providers: [FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
NaionalBulletinPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class NaionalBulletinPageModule {
|
||||
}
|
|
@ -1,9 +1,4 @@
|
|||
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',
|
||||
|
@ -12,59 +7,15 @@ import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
|||
<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 *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<html-page description="Organizations" pageTitle="Related Organizations"></html-page>
|
||||
<affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
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 helper: HelperService) {}
|
||||
|
||||
constructor () {}
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
private updateDescription(description:string){
|
||||
this._meta.updateTag({content:description},"name='description'");
|
||||
this._meta.updateTag({content:description},"property='og:description'");
|
||||
}
|
||||
private updateTitle(title:string){
|
||||
var _prefix ="OpenAIRE | ";
|
||||
var _title = _prefix + ((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'");
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,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";
|
||||
import {HtmlPagesModule} from "../htmlPages.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule
|
||||
OrganizationsPageRoutingModule, AffiliationsModule, HelperModule, CommonModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationsPageComponent
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {AboutPageComponent} from './aboutPage.component';
|
||||
import {ProjectsPageComponent} from './projectsPage.component';
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: AboutPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: ProjectsPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AboutPageRoutingModule { }
|
||||
export class ProjectsPageRoutingModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'projects',
|
||||
template: `
|
||||
<html-page description="Sources and methology" pageTitle="Sources and methology"></html-page>
|
||||
`
|
||||
})
|
||||
export class ProjectsPageComponent {
|
||||
constructor() {}
|
||||
public ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
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 {ProjectsPageComponent} from './projectsPage.component';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HtmlPagesModule} from "../htmlPages.module";
|
||||
import {ProjectsPageRoutingModule} from "./projects-routing.module";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
ProjectsPageRoutingModule, RouterModule, CommonModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
ProjectsPageComponent
|
||||
],
|
||||
providers: [FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
ProjectsPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class ProjectsPageModule {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'publications',
|
||||
template: `
|
||||
<html-page description="Publications" pageTitle="Publications"></html-page>
|
||||
`
|
||||
})
|
||||
export class PublicationsPageComponent {
|
||||
constructor() {}
|
||||
public ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
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 {PublicationsPageComponent} from './publications-page.component';
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HtmlPagesModule} from "../htmlPages.module";
|
||||
import {PublicationsPageRoutingModule} from "./publications-routing.module";
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
PublicationsPageRoutingModule, RouterModule, CommonModule, HtmlPagesModule
|
||||
],
|
||||
declarations: [
|
||||
PublicationsPageComponent
|
||||
],
|
||||
providers: [FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports: [
|
||||
PublicationsPageComponent
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
export class PublicationsPageModule {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import {PublicationsPageComponent} from './publications-page.component';
|
||||
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: PublicationsPageComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class PublicationsPageRoutingModule { }
|
|
@ -16,7 +16,9 @@ export class PiwikHelper{
|
|||
"dariah":103,
|
||||
"epos": 217,
|
||||
"beopen": 218,
|
||||
"risis":219
|
||||
"risis":219,
|
||||
"science-innovation-policy":253,
|
||||
"covid-19":267
|
||||
};
|
||||
public static siteIDsProduction={
|
||||
"connect": 112,
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
"cacheUrl" :"http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://dl170.madgik.di.uoa.gr:8080/uoa-admin-tools/",
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools/",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
|
Loading…
Reference in New Issue