sofia.baltzi 2018-12-12 13:03:12 +00:00
parent b4bdc71693
commit 8de1f08964
1 changed files with 18 additions and 18 deletions

View File

@ -6,21 +6,21 @@ export class Composer {
// TODO move to properties
private static openaireEmail = "mailto:openaire.test@gmail.com";
private static signature = "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a><br>";
private static ifYouAreNotResponsible(): string {
return "If you are not responsible for this community, please "
+ "<a href=\'" + this.openaireEmail + "\'>contact us</a>.";
return "If you are not responsible for this community, please "
+ "<a href=\'" + this.openaireEmail + "\'>contact us</a>. ";
}
private static manageNotificationSettings(): string {
// TODO take it from the method down
return "bla";
private static manageNotificationSettings(communityId: string): string {
return "Click <a href='https://beta.admin.connect.openaire.eu/manage-user-notifications?communityId="
+ communityId + "'>here</a> to manage your notification settings. ";
}
private static youAreManagerOfTheCommunity(): string {
// TODO take it from the method down
return "bla";
private static youAreManagerOfTheCommunity(communityId: string, communityName: string): string {
return "You are receiving this e-mail as manager of the community "
+ "<a href='https://beta." + communityId + ".openaire.eu/'>" + communityName + "</a>. ";
}
public static composeEmailForNewManager(communityId: string, communityName: string, newCommunityManagers: any): Email {
@ -36,7 +36,7 @@ export class Composer {
+ " or your colleagues, that already have access to the administration tool, to update your e-mail. <br>"
+ "You can access the administration tool by clicking the \"Manage\" button that will be available in the top right corner of the dashboard."
+ "</p>"
+ "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a><br>"
+ this.signature
+ "<p style='font-size:" + this.noteFontSize + "'>" + this.ifYouAreNotResponsible() + "<p>"
+ "</div>";
email.recipients = newCommunityManagers;
@ -45,20 +45,20 @@ export class Composer {
return email;
}
public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers:any) : Email {
let email: Email;
public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any) : Email {
let email: Email = new Email();
email.subject = "[OpenAIRE-Connect] " + communityName + ": Managers list notification";
email.body = "<div style='font-size:14px;'>"
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<p>There are updates in the managers list for \"" + communityName + "\" community.<br>"
+ "The list of managers is: " + managers.join(', ') + "</p>"
+ "OpenAIRE team<br>" + "<a href='https://www.openaire.eu'>www.openaire.eu</a><br>"
+ "<p style='font-size:11px;'>You are receiving this e-mail as manager of the community "
+ "<a href='https://beta." + communityId + ".openaire.eu/'>" + communityName + "</a>. "
+ this.signature
+ "<p style='font-size:" + this.noteFontSize + "'>"
+ this.youAreManagerOfTheCommunity(communityId, communityName)
+ this.ifYouAreNotResponsible()
+ "<br>"
+ "Click <a href='https://beta.admin.connect.openaire.eu/manage-user-notifications?communityId=" + communityId
+ "'>here</a> to manage your notification settings. </p>"
+ this.manageNotificationSettings(communityId)
+ "</p>"
+ "</div>";
email.recipients = firstVersionOfManagers;