Merge remote-tracking branch 'origin/develop' into angular-16

This commit is contained in:
Konstantinos Triantafyllou 2023-10-10 17:12:58 +03:00
commit 22366f5813
2 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import {StringUtils} from "../../utils/string-utils.class";
import {properties} from "../../../../environments/environment";
import {SelectionCriteria} from "../../utils/entities/contentProvider";
import tryThese = CKEDITOR.tools.tryThese;
export class CommunityInfo {
title: string;
@ -36,6 +37,11 @@ export class CommunityInfo {
}
return response;
}
public isOpen() {
return !(this.membership && this.membership === 'byInvitation');
}
public isPublic(){
return this.status == "all" || this.status == "PUBLIC";
}

View File

@ -302,21 +302,23 @@ export class Composer {
return message;
}
public static composeEmailForCommunityDashboard(name: string, recipient: string) {
public static composeEmailForCommunityDashboard(name: string, role: "manager" | "member", recipient: string) {
let email: Email = new Email();
email.subject = 'OpenAIRE Connect | ' + name;
email.body = this.composeMessageForCommunityDashboard(name);
email.body = this.composeMessageForCommunityDashboard(name, role);
email.recipient = recipient;
return email;
}
public static composeMessageForCommunityDashboard(name: string, user: string = null, invitation: any = null) {
public static composeMessageForCommunityDashboard(name: string, role: "manager" | "member", user: string = null, invitation: any = null) {
let message = '<p>Dear ((__user__)),</p>' +
'<p>You have been invited to be a manager of the OpenAIRE Research Community Dashboard for the ' + name + '.</p>' +
'<p>You have been invited to be a ' + role + ' of the OpenAIRE Research Community Dashboard for the ' + name + '.</p>' +
'<p>Click <a href="((__link__))" target="_blank">this URL</a> and use the verification code below to accept the invitation.</p>' +
'<p>The verification code is <b>((__code__))</b>.</p>' +
(role === 'manager'?
'<p>As a manager of the OpenAIRE Research Community Dashboard, you will have access to the administration part of the dashboard, ' +
'where you will be able to customize and manage the content of the ' + name + '.</p>' +
'where you will be able to customize and manage the content of the ' + name + '.</p>':
'<p>As a member of the OpenAIRE Research Community Dashboard, you will have access to the community dashboard and link research results with projects, communities and other research projects.</p>') +
'<p>Please contact us at <a href="mailto:' + properties.helpdeskEmail+'">' + properties.helpdeskEmail +
'</a> if you have any questions or concerns.</p>' +
'<p>Kind Regards<br>The OpenAIRE Team</p>' +