[Trunk|Connect]: 1. Add is route enabled in all routes except home page. 2. Delete dropdown from invite page. 3. Add help texts in all pages.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@56645 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
1729eea27d
commit
84d0608a9d
|
@ -63,7 +63,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="(managerOfCommunities.length == 0 && subscriberOfCommunities.length == 0)" class="home-banner image-front-topbar uk-section uk-background-norepeat uk-background-bottom-center uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color" uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<div class=" uk-section uk-padding-remove-bottom">
|
||||
<div class="uk-position-cover"></div>
|
||||
|
@ -224,7 +224,7 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom']" [texts]="pageContents['bottom']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
|
||||
<div class="contact-banner uk-background-norepeat uk-background-cover uk-section-secondary uk-section-overlap uk-position-relative uk-preserve-color uk-margin-large-top">
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
<div class="uk-flex uk-flex-middle uk-padding" uk-grid>
|
||||
|
|
|
@ -82,13 +82,13 @@ export class CommunitiesComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-port
|
|||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
ManageModule, ErrorMessagesModule,
|
||||
SearchFormModule, BrowseCommunityModule, HelperModule, GifSliderModule, OtherPortalsModule,
|
||||
SearchFormModule, BrowseCommunityModule, GifSliderModule, OtherPortalsModule,
|
||||
HelperModule
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ng-template #info>
|
||||
<helper *ngIf="pageContents && pageContents['right']" [texts]="pageContents['right']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0" [texts]="pageContents['right']"></helper>
|
||||
<h1 class="uk-margin-auto-top uk-margin-remove-bottom uk-text-bold">OpenAIRE gives you the virtual environment and services designed for your community to:</h1>
|
||||
<ul class="uk-list uk-list-divider uk-padding uk-padding-remove-left uk-margin-auto-top">
|
||||
<li><h5><span class="uk-text-bold">Create and Manage</span> your
|
||||
|
|
|
@ -65,13 +65,13 @@ export class ContactComponent implements OnInit {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<!--
|
||||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
|
||||
|
||||
|
@ -16,7 +16,8 @@ export class ContentPageComponent {
|
|||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta, private _title: Title,
|
||||
private helper: HelperService) {}
|
||||
private helper: HelperService) {
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.route.data
|
||||
|
@ -34,24 +35,26 @@ export class ContentPageComponent {
|
|||
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._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
|
@ -24,4 +24,5 @@ import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
|
|||
})
|
||||
|
||||
|
||||
export class ContentPageModule{}
|
||||
export class ContentPageModule {
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class";
|
|||
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
|
||||
import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-deposit',
|
||||
template: `
|
||||
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation" [pageContents]="pageContents" [divContents]="divContents"></deposit-first-page>
|
||||
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"
|
||||
[communityId]="communityId"></deposit-first-page>
|
||||
`
|
||||
})
|
||||
|
||||
|
@ -23,17 +23,16 @@ export class OpenaireDepositComponent {
|
|||
piwikSiteId = null;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
public communityId = null;
|
||||
|
||||
|
||||
public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
|
||||
fetchZenodoInformation: FetchZenodoInformation;
|
||||
|
||||
constructor ( private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
private _zenodoCommunitieService: ZenodoCommunitiesService,
|
||||
private _communityService: CommunityService,
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
|
||||
private helper: HelperService) {
|
||||
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
|
||||
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService, this._searchZenodoCommunitiesService);
|
||||
}
|
||||
|
||||
|
@ -48,11 +47,10 @@ export class OpenaireDepositComponent {
|
|||
communityId = params['communityId'];
|
||||
}
|
||||
if (communityId != null && communityId != '') {
|
||||
this.communityId = communityId;
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI + communityId).subscribe(
|
||||
community => {
|
||||
//this.getDivContents();
|
||||
this.getPageContents(communityId);
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage+communityId;
|
||||
|
@ -78,17 +76,6 @@ export class OpenaireDepositComponent {
|
|||
});
|
||||
}
|
||||
|
||||
public getPageContents(communityId: string) {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
public getDivContents(communityId: string) {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private handleError(message: string, error) {
|
||||
console.error("Deposit First Page: "+message, error);
|
||||
|
|
|
@ -4,11 +4,12 @@ import { RouterModule } from '@angular/router';
|
|||
import {ShareInZenodoComponent} from './shareInZenodo.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: ShareInZenodoComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: ShareInZenodoComponent, canActivate: [FreeGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
|
|
|
@ -29,7 +29,7 @@ export class HelperTestComponent implements OnInit{
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
|||
<div class=" uk-section uk-margin-large-top tm-middle uk-container" id="tm-main">
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
<div class="uk-article-title custom-article-title uk-margin-bottom"> Organizations related to the community</div>
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<affiliations [fullView]="true" [getAffiliationsFromAPI]="true"></affiliations>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,13 +55,13 @@ export class OrganizationsPageComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, this.communityId).subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, this.communityId).subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-dataprovider',
|
||||
template: `<dataprovider [piwikSiteId]=piwikSiteId></dataprovider>`,
|
||||
template: `
|
||||
<dataprovider [piwikSiteId]=piwikSiteId [communityId]="communityId"></dataprovider>`,
|
||||
})
|
||||
export class OpenaireDataProviderComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -23,5 +26,4 @@ ngOnInit() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-dataset',
|
||||
template: `<dataset [piwikSiteId]=piwikSiteId></dataset>`,
|
||||
template: `
|
||||
<dataset [piwikSiteId]=piwikSiteId [communityId]="communityId"></dataset>`,
|
||||
})
|
||||
export class OpenaireDatasetComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -21,5 +25,4 @@ export class OpenaireDatasetComponent{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,16 +4,17 @@ import {PiwikHelper} from '../../utils/piwikHelper';
|
|||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
@Component({
|
||||
selector: 'openaire-htmlProjectReport',
|
||||
template: `<htmlProjectReport [piwikSiteId]=piwikSiteId></htmlProjectReport>`,
|
||||
template: `<htmlProjectReport [piwikSiteId]=piwikSiteId [communityId]="communityId"></htmlProjectReport>`,
|
||||
})
|
||||
export class OpenaireHtmlProjectReportComponent{
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
constructor (private route: ActivatedRoute ) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-organization',
|
||||
template: `<organization [piwikSiteId]=piwikSiteId></organization>`,
|
||||
template: `
|
||||
<organization [piwikSiteId]=piwikSiteId [communityId]="communityId"></organization>`,
|
||||
})
|
||||
export class OpenaireOrganizationComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -22,5 +26,4 @@ export class OpenaireOrganizationComponent{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-orp',
|
||||
template: `<orp [piwikSiteId]=piwikSiteId></orp>`,
|
||||
template: `<orp [piwikSiteId]=piwikSiteId [communityId]="communityId">></orp>`,
|
||||
})
|
||||
|
||||
export class OpenaireOrpComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
constructor (private route: ActivatedRoute ) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-project',
|
||||
template: `<project [piwikSiteId]=piwikSiteId></project>`,
|
||||
template: `
|
||||
<project [piwikSiteId]=piwikSiteId [communityId]="communityId"></project>`,
|
||||
})
|
||||
export class OpenaireProjectComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -21,5 +25,4 @@ export class OpenaireProjectComponent{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-publication',
|
||||
template: `<publication [piwikSiteId]=piwikSiteId></publication>`,
|
||||
template: `
|
||||
<publication [piwikSiteId]=piwikSiteId [communityId]="communityId"></publication>`,
|
||||
})
|
||||
export class OpenairePublicationComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -22,5 +26,4 @@ export class OpenairePublicationComponent{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
import {Component, ViewChild, ElementRef} from '@angular/core';
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-software',
|
||||
template: `<software [piwikSiteId]=piwikSiteId></software>`,
|
||||
template: `
|
||||
<software [piwikSiteId]=piwikSiteId [communityId]="communityId"></software>`,
|
||||
})
|
||||
export class OpenaireSoftwareComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: any }) => {
|
||||
|
||||
var communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(data.envSpecific.domain);
|
||||
this.piwikSiteId = PiwikHelper.siteIDs[this.communityId];
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -22,5 +26,4 @@ export class OpenaireSoftwareComponent{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|||
@Component({
|
||||
selector: 'learn-how',
|
||||
template: `
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<ng-template #one>
|
||||
<h5 class="uk-text-bold uk-margin-small-bottom">1. Understanding your needs</h5>
|
||||
<div>
|
||||
|
@ -134,13 +134,13 @@ export class LearnHowComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
|
|||
@Component({
|
||||
selector: 'learn-in-depth',
|
||||
template: `
|
||||
<helper *ngIf="pageContents && pageContents['top']" [texts]="pageContents['top']"></helper>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
||||
<div class="image-front-topbar uk-section-overlap uk-position-relative uk-preserve-color" uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light" tm-header-transparent-placeholder="">
|
||||
<div class="cloud-background uk-background-norepeat uk-background-cover uk-section uk-padding-remove-bottom" >
|
||||
<div class="uk-container uk-container-large uk-section">
|
||||
|
@ -202,13 +202,13 @@ export class LearnInDepthComponent {
|
|||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url.split('?')[0].substring(0), this.properties, 'connect').subscribe(contents => {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guar
|
|||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: InviteComponent, canActivate: [LoginGuard, IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
|
||||
{ path: '', component: InviteComponent, canActivate: [LoginGuard, /*IsRouteEnabled*/], canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
|
|
|
@ -2,15 +2,18 @@
|
|||
<div class=" uk-section uk-margin-small-top tm-middle uk-container" id="tm-main">
|
||||
|
||||
<div class="uk-container uk-margin-bottom">
|
||||
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']" styleName="uk-width-1-1"></helper>
|
||||
<div id="invite" class=" uk-card uk-card-default uk-padding uk-margin-top">
|
||||
<div class="uk-text-large uk-text-center uk-width-5-6@l uk-width ">Invite users to subscribe</div>
|
||||
<div class="uk-margin-top">
|
||||
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="missingCommunityId" class="uk-alert uk-alert-warning" role="alert">{{missingCommunityId}}</div>
|
||||
<div *ngIf="successfulSentMessage" class="uk-alert uk-alert-success" role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
|
||||
<div *ngIf="failureSentMessage" class="uk-alert uk-alert-warning" role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
|
||||
<div *ngIf="successfulSentMessage" class="uk-alert uk-alert-success"
|
||||
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
|
||||
<div *ngIf="failureSentMessage" class="uk-alert uk-alert-warning"
|
||||
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
|
||||
<div *ngIf="inviteErrorMessage" class="uk-alert uk-alert-warning" role="alert">{{inviteErrorMessage}}</div>
|
||||
<div *ngIf="communityId != null && status == errorCodes.DONE">
|
||||
<table class="uk-table uk-align-center">
|
||||
|
@ -23,22 +26,35 @@
|
|||
</td>
|
||||
</tr> -->
|
||||
<tr>
|
||||
<td for="from" class="uk-text-bold uk-width-1-4 uk-text-right">From <span class="uk-text-danger uk-text-bold">*</span> :</td>
|
||||
<td for="from" class="uk-text-bold uk-width-1-4 uk-text-right">From <span
|
||||
class="uk-text-danger uk-text-bold">*</span> :
|
||||
</td>
|
||||
<td class="uk-text-left uk-width-expand">
|
||||
<input placeholder="Type your name" type="text" (click)="resetMessages()"
|
||||
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)] = "body.fromName" id="from" required>
|
||||
<div *ngIf="!body.fromName" class="uk-width-large uk-text-danger uk-text-small">Please add your name.</div>
|
||||
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="body.fromName"
|
||||
id="from" required>
|
||||
<div *ngIf="!body.fromName" class="uk-width-large uk-text-danger uk-text-small">Please add your name.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td for="recipients" class="uk-text-bold uk-text-right">To <span class="uk-text-danger uk-text-bold">*</span> :</td>
|
||||
<td for="recipients" class="uk-text-bold uk-text-right">To <span
|
||||
class="uk-text-danger uk-text-bold">*</span> :
|
||||
</td>
|
||||
<td class="uk-text-left">
|
||||
<input placeholder="email" type="text" (click)="resetMessages(); areValid=true"
|
||||
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)] = "recipients" id="recipients"
|
||||
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)]="recipients"
|
||||
id="recipients"
|
||||
required>
|
||||
<div *ngIf="areValid && !showAddRecipientMessage" class="uk-width-medium uk-text-muted uk-text-small">separate multiple emails with a comma</div>
|
||||
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small">Please add valid email/s.</div>
|
||||
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage" class="uk-width-large uk-text-danger uk-text-small">Please add a recipient.</div>
|
||||
<div *ngIf="areValid && !showAddRecipientMessage" class="uk-width-medium uk-text-muted uk-text-small">
|
||||
separate multiple emails with a comma
|
||||
</div>
|
||||
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small">Please add
|
||||
valid email/s.
|
||||
</div>
|
||||
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
|
||||
class="uk-width-large uk-text-danger uk-text-small">Please add a recipient.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -103,90 +119,60 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td class="uk-text-bold uk-width-3-5@xl uk-width-3-5@m uk-width-3-5@s uk-text-right"></td>
|
||||
<td><div class="uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-text-danger uk-text-bold">* Required fields</div>
|
||||
<td>
|
||||
<div class="uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-text-danger uk-text-bold">*
|
||||
Required fields
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="uk-text-right"></td>
|
||||
<td>
|
||||
<div class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
|
||||
<div
|
||||
class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
|
||||
<button class="uk-button uk-button-primary" (click)="invite()">Invite</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<li>Invite by link</li>
|
||||
</td>
|
||||
</tr> -->
|
||||
<!-- <tr>
|
||||
<td for="link" class="uk-text-bold uk-text-right">Link :</td>
|
||||
<td class="uk-text-left">
|
||||
<input placeholder="link" type="text"
|
||||
class="form-control uk-input uk-width-large@l uk-width-medium@s" id="link"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="uk-text-right"></td>
|
||||
<td>
|
||||
<div class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
|
||||
<button class="uk-button" (click)="resetForm(communityId)">Cancel</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="uk-text-left">
|
||||
<span uk-icon="chevron-left"></span><span class="uk-margin-small-left">
|
||||
<a [queryParams]="communityIdParam" routerLinkActive="router-link-active" routerLink="/">Back</a>
|
||||
<a [queryParams]="communityIdParam" routerLinkActive="router-link-active"
|
||||
routerLink="/">Back</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
|
||||
[texts]="pageContents['bottom']" styleName="uk-width-1-1"></helper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="!longView"> -->
|
||||
<!-- <div class="uk-width-large@m uk-width-1-1@s">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-small"> -->
|
||||
<!-- <div class="uk-text-center uk-text-large" uk-toggle="target: #toggle-usage; animation: uk-animation-fade" style="cursor: pointer;">
|
||||
<span class="uk-margin-small-right uk-icon" >
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="social" ratio="1">
|
||||
<line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8"></line><circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="4.6" r="2.3"></circle><circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="14.8" r="2.3"></circle><circle fill="none" stroke="#000" stroke-width="1.1" cx="4.5" cy="9.8" r="2.3"></circle></svg>
|
||||
</span>
|
||||
|
||||
Invite users</div> -->
|
||||
<!-- uk-toggle="target: #toggle-usage; animation: uk-animation-fade" -->
|
||||
<button *ngIf="!longView" [class]=" ((buttonSizeSmall)?'uk-button-small':'') + ' uk-button uk-button-primary'">
|
||||
Invite users
|
||||
</button>
|
||||
<!-- <div class="uk-text-center uk-text-large" uk-toggle="target: #toggle-usage; animation: uk-animation-fade" style="cursor: pointer;">
|
||||
<span class="uk-margin-small-right uk-icon" >
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="social" ratio="1">
|
||||
<line fill="none" stroke="#000" stroke-width="1.1" x1="13.4" y1="14" x2="6.3" y2="10.7"></line><line fill="none" stroke="#000" stroke-width="1.1" x1="13.5" y1="5.5" x2="6.5" y2="8.8"></line><circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="4.6" r="2.3"></circle><circle fill="none" stroke="#000" stroke-width="1.1" cx="15.5" cy="14.8" r="2.3"></circle><circle fill="none" stroke="#000" stroke-width="1.1" cx="4.5" cy="9.8" r="2.3"></circle></svg>
|
||||
</span>
|
||||
|
||||
Invite users</div> -->
|
||||
<!-- <div class="uk-inline">
|
||||
<button class="uk-button uk-button-default" type="button">Click</button>
|
||||
<div uk-dropdown="mode: click">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</div>
|
||||
</div> -->
|
||||
<!-- hidden="hidden" -->
|
||||
<div uk-dropdown="mode: click" class="uk-form uk-margin-small uk-alert uk-background-default" id="toggle-usage" >
|
||||
<!--<div uk-dropdown="mode: click" class="uk-form uk-margin-small uk-alert uk-background-default" id="toggle-usage">
|
||||
<div class="uk-margin-top">
|
||||
<errorMessages [status]="[status]" [type]="'community'"></errorMessages>
|
||||
</div>
|
||||
<div *ngIf="missingCommunityId" class="uk-width-large uk-text-warning uk-text-small uk-margin-top" role="alert">{{missingCommunityId}}</div>
|
||||
<div *ngIf="successfulSentMessage" class="uk-width-large uk-text-success uk-text-small uk-margin-top" role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
|
||||
<div *ngIf="failureSentMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top" role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
|
||||
<div *ngIf="inviteErrorMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top" role="alert">{{inviteErrorMessage}}</div>
|
||||
<div *ngIf="missingCommunityId" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
|
||||
role="alert">{{missingCommunityId}}</div>
|
||||
<div *ngIf="successfulSentMessage" class="uk-width-large uk-text-success uk-text-small uk-margin-top"
|
||||
role="alert">{{successfulSentMessage}} {{successfulSentRecipients}}</div>
|
||||
<div *ngIf="failureSentMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
|
||||
role="alert">{{failureSentMessage}} {{failureSentRecipients}}</div>
|
||||
<div *ngIf="inviteErrorMessage" class="uk-width-large uk-text-warning uk-text-small uk-margin-top"
|
||||
role="alert">{{inviteErrorMessage}}</div>
|
||||
|
||||
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add valid email/s.</div>
|
||||
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage" class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add a recipient.</div>
|
||||
<div *ngIf="recipients && !areValid" class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add
|
||||
valid email/s.
|
||||
</div>
|
||||
<div *ngIf="isEmpty(recipients) && showAddRecipientMessage"
|
||||
class="uk-width-large uk-text-danger uk-text-small uk-margin-top">Please add a recipient.
|
||||
</div>
|
||||
<input (click)="resetMessages(); areValid=true" placeholder="Type e-mails" type="text"
|
||||
class="form-control uk-input uk-form-small uk-form" [(ngModel)]="recipients" id="recipients"
|
||||
required>
|
||||
|
@ -194,16 +180,16 @@
|
|||
<div class="uk-margin-small-top uk-text-center ">
|
||||
<button class=" uk-button uk-button-primary uk-button-small " (click)="invite()">Invite</button>
|
||||
{{" "}}
|
||||
<a class=" uk-button uk-button-default uk-button-small " [queryParams]="communityIdParam" routerLinkActive="router-link-active" routerLink="/invite">
|
||||
<a class=" uk-button uk-button-default uk-button-small " [queryParams]="communityIdParam"
|
||||
routerLinkActive="router-link-active" routerLink="/invite">
|
||||
<span class="uk-margin-xsmall-left uk-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog" ratio="0.8"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="cog"
|
||||
ratio="0.8"><circle fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path
|
||||
fill="none" stroke="#000"
|
||||
d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>
|
||||
|
||||
</span>
|
||||
Customize
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- </div>
|
||||
</div>-->
|
||||
<!-- </div> -->
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {Component, OnInit, Input, ElementRef} from '@angular/core';
|
||||
import {SimpleChanges, OnChanges} from '@angular/core';
|
||||
import {FormGroup, FormArray, FormBuilder, Validators} from "@angular/forms";
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {FormBuilder} from "@angular/forms";
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
|
||||
import {ConnectHelper} from '../../../openaireLibrary/connect/connectHelper';
|
||||
|
@ -17,6 +16,7 @@ import {ErrorCodes} from '../../../openaire
|
|||
import {ErrorMessagesComponent} from '../../../openaireLibrary/utils/errorMessages.component';
|
||||
import {Session} from '../../../openaireLibrary/login/utils/helper.class';
|
||||
import {HelperFunctions} from "../../../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {HelperService} from "../../../openaireLibrary/utils/helper/helper.service";
|
||||
|
||||
@Component({
|
||||
selector: 'invite',
|
||||
|
@ -58,13 +58,16 @@ export class InviteComponent implements OnInit {
|
|||
public status: number = 1;
|
||||
public errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private _router: Router,
|
||||
public _fb: FormBuilder,
|
||||
private _emailService: EmailService,
|
||||
private _communityService: CommunityService) {
|
||||
private _communityService: CommunityService,
|
||||
private helper: HelperService) {
|
||||
|
||||
|
||||
this.errorCodes = new ErrorCodes();
|
||||
|
@ -89,6 +92,8 @@ export class InviteComponent implements OnInit {
|
|||
|
||||
this.communityIdParam = (this.properties.environment != "development") ? {} : {communityId: this.communityId};
|
||||
if (this.communityId != null && this.communityId != '') {
|
||||
//this.getDivContents();
|
||||
this.getPageContents();
|
||||
this._communityService.getCommunity(this.properties, this.properties.communityAPI + this.communityId).subscribe(
|
||||
community => {
|
||||
this.community = community;
|
||||
|
@ -118,6 +123,18 @@ export class InviteComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
private getPageContents() {
|
||||
this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.pageContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
private getDivContents() {
|
||||
this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
|
||||
this.divContents = contents;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
public invite() {
|
||||
this.successfulSentMessage = "";
|
||||
|
@ -216,6 +233,7 @@ export class InviteComponent implements OnInit {
|
|||
public composeEmail() {
|
||||
this.email.body = Composer.formatEmailBodyForInvitation(this.body);
|
||||
}
|
||||
|
||||
/*
|
||||
public handleError(error) {
|
||||
if(error.status == '401') {
|
||||
|
|
|
@ -14,10 +14,12 @@ import {EmailService} from '../../../openaireLibrary/utils/email/e
|
|||
import {CommunityService} from '../../../openaireLibrary/connect/community/community.service';
|
||||
import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module';
|
||||
import {IsRouteEnabled} from "../../../openaireLibrary/error/isRouteEnabled.guard";
|
||||
import {HelperModule} from "../../../openaireLibrary/utils/helper/helper.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, InviteRoutingModule, CKEditorModule, ErrorMessagesModule
|
||||
CommonModule, FormsModule, RouterModule, InviteRoutingModule, CKEditorModule, ErrorMessagesModule,
|
||||
HelperModule
|
||||
],
|
||||
declarations: [
|
||||
InviteComponent
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
|
||||
|
||||
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
|
||||
"adminToolsAPIURL" :"http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
"adminToolsCommunity" :"connect",
|
||||
"datasourcesAPI": "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
|
|
Loading…
Reference in New Issue