Fixed bug 1929: Notifications about Modifications

Notifications about Modifications don't show the Calendar name.
When an email notification is selected by the user, the calendar name
from which the event was changed is added to the email.

Needs to be translated.
maint-2.0.2
Luc Charland 2012-09-19 09:18:00 -04:00
parent 9b3e4c8ab8
commit 491089e194
5 changed files with 22 additions and 1 deletions

View File

@ -16,6 +16,7 @@ vtodo_class2 = "(Confidential task)";
"The following attendees(s) were removed:" = "The following attendee(s) were removed:"; "The following attendees(s) were removed:" = "The following attendee(s) were removed:";
/* IMIP messages */ /* IMIP messages */
"calendar_label" = "Calendar:";
"startDate_label" = "Start:"; "startDate_label" = "Start:";
"endDate_label" = "End:"; "endDate_label" = "End:";
"due_label" = "Due Date:"; "due_label" = "Due Date:";

View File

@ -40,6 +40,7 @@
NSArray *updatedAttendees; NSArray *updatedAttendees;
iCalPerson *currentRecipient; iCalPerson *currentRecipient;
SOGoEventOperation operation; SOGoEventOperation operation;
NSString *calendarName;
} }
- (void) setOriginator: (NSString *) newOriginator; - (void) setOriginator: (NSString *) newOriginator;
@ -47,8 +48,10 @@
- (void) setDeletedAttendees: (NSArray *) theAttendees; - (void) setDeletedAttendees: (NSArray *) theAttendees;
- (void) setUpdatedAttendees: (NSArray *) theAttendees; - (void) setUpdatedAttendees: (NSArray *) theAttendees;
- (void) setOperation: (SOGoEventOperation) theOperation; - (void) setOperation: (SOGoEventOperation) theOperation;
- (void) setCalendarName: (NSString *) theCalendarName;
- (NSString *) aptSummary; - (NSString *) aptSummary;
- (NSString *) calendarName;
@end @end

View File

@ -64,6 +64,7 @@ static NSCharacterSet *wsSet = nil;
addedAttendees = nil; addedAttendees = nil;
deletedAttendees = nil; deletedAttendees = nil;
updatedAttendees = nil; updatedAttendees = nil;
calendarName = nil;
} }
return self; return self;
@ -75,6 +76,7 @@ static NSCharacterSet *wsSet = nil;
[addedAttendees release]; [addedAttendees release];
[deletedAttendees release]; [deletedAttendees release];
[updatedAttendees release]; [updatedAttendees release];
[calendarName release];
[super dealloc]; [super dealloc];
} }
@ -140,6 +142,16 @@ static NSCharacterSet *wsSet = nil;
operation = theOperation; operation = theOperation;
} }
- (void) setCalendarName: (NSString *) theCalendarName
{
ASSIGN (calendarName, theCalendarName);
}
- (NSString *) calendarName
{
return calendarName;
}
- (NSString *) aptSummary - (NSString *) aptSummary
{ {
NSString *s; NSString *s;

View File

@ -982,7 +982,7 @@
updatedAttendees: (NSArray *) theUpdatedAttendees updatedAttendees: (NSArray *) theUpdatedAttendees
operation: (SOGoEventOperation) theOperation operation: (SOGoEventOperation) theOperation
{ {
NSString *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail; NSString *calendarName, *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail;
NSDictionary *senderIdentity, *recipientIdentity; NSDictionary *senderIdentity, *recipientIdentity;
SOGoAptMailReceipt *page; SOGoAptMailReceipt *page;
NGMutableHashMap *headerMap; NGMutableHashMap *headerMap;
@ -990,6 +990,8 @@
SOGoUser *currentUser; SOGoUser *currentUser;
SOGoDomainDefaults *dd; SOGoDomainDefaults *dd;
calendarName = [[self container] displayName];
// We must handle three cases here: // We must handle three cases here:
// - Receive a mail when I modify my calendar // - Receive a mail when I modify my calendar
// - Receive a mail when someone else modifies my calendar // - Receive a mail when someone else modifies my calendar
@ -1003,6 +1005,7 @@
[page setDeletedAttendees: theDeletedAttendees]; [page setDeletedAttendees: theDeletedAttendees];
[page setUpdatedAttendees: theUpdatedAttendees]; [page setUpdatedAttendees: theUpdatedAttendees];
[page setOperation: theOperation]; [page setOperation: theOperation];
[page setCalendarName: calendarName];
currentUser = [context activeUser]; currentUser = [context activeUser];
senderIdentity = [currentUser primaryIdentity]; senderIdentity = [currentUser primaryIdentity];

View File

@ -23,6 +23,8 @@ h1, dd, .dl-list dt { margin-left: 130px; }
<h1><var:string value="aptSummary" const:escapeHTML="NO"/></h1> <h1><var:string value="aptSummary" const:escapeHTML="NO"/></h1>
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt><var:string label:value="calendar_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="calendarName" const:escapeHTML="NO"/></dd>
<var:if condition="apt.location.length" <var:if condition="apt.location.length"
><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt> ><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="apt.location" const:escapeHTML="NO"/></dd></var:if> <dd><var:string value="apt.location" const:escapeHTML="NO"/></dd></var:if>