See ChangeLog
Monotone-Parent: 975e40192e290b5aa4bc5c5b99a12b299d84fa5a Monotone-Revision: 740654a1f1be6a68843349cf438d5a87445f489e Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-07-11T18:57:27maint-2.0.2
parent
6556c92c87
commit
2c987bae06
|
@ -8,6 +8,9 @@
|
|||
show the notification options if it's a web calendar or if the active
|
||||
user isn't the owner of the calendar.
|
||||
|
||||
* Added strings to translate and cleaned up the template to send
|
||||
HTML mails instead of text/plain.
|
||||
|
||||
2012-07-09 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Dropped old templates (SOGoAptMailDeletionReceipt.wox
|
||||
|
|
|
@ -11,18 +11,13 @@ vtodo_class2 = "(Confidential task)";
|
|||
"Title:" = "Title:";
|
||||
"Start:" = "Start:";
|
||||
"End:" = "End:";
|
||||
|
||||
"Receipt: users invited to a meeting" = "Receipt: users invited to a meeting";
|
||||
"You have invited the following attendees(s):" = "You have invited the following attendees(s):";
|
||||
"... to attend the following event:" = "... to attend the following event:";
|
||||
|
||||
"Receipt: invitation updated" = "Receipt: invitation updated";
|
||||
"The following attendees(s):" = "The following attendees(s):";
|
||||
"... have been notified of the changes to the following event:" = "... have been notified of the changes to the following event:";
|
||||
|
||||
"Receipt: attendees removed from an event" = "Receipt: attendees removed from an event";
|
||||
"You have removed the following attendees(s):" = "You have removed the following attendees(s):";
|
||||
"... from the following event:" = "... from the following event:";
|
||||
"Location:" = "Location:";
|
||||
"Receipt: event was created" = "Receipt: event was created";
|
||||
"Receipt: event was deleted" = "Receipt: event was deleted";
|
||||
"Receipt: event was updated" = "Receipt: event was updated";
|
||||
"The following attendees(s) were notified:" = "The following attendees(s) were notified:";
|
||||
"The following attendees(s) were added:" = "The following attendees(s) were added:";
|
||||
"The following attendees(s) were removed:" = "The following attendees(s) were removed:";
|
||||
|
||||
/* IMIP messages */
|
||||
"startDate_label" = "Start:";
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
NSArray *updatedAttendees;
|
||||
iCalPerson *currentRecipient;
|
||||
SOGoEventOperation operation;
|
||||
BOOL isSubject;
|
||||
}
|
||||
|
||||
- (void) setOriginator: (NSString *) newOriginator;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#import <NGCards/iCalEvent.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
|
||||
#import <SOGo/NSObject+Utilities.h>
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
#import <SOGo/SOGoDateFormatter.h>
|
||||
|
@ -61,7 +62,6 @@ static NSCharacterSet *wsSet = nil;
|
|||
addedAttendees = nil;
|
||||
deletedAttendees = nil;
|
||||
updatedAttendees = nil;
|
||||
isSubject = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -76,28 +76,6 @@ static NSCharacterSet *wsSet = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) getSubject
|
||||
{
|
||||
NSString *subject;
|
||||
|
||||
if (!values)
|
||||
[self setupValues];
|
||||
|
||||
isSubject = YES;
|
||||
subject = [[[self generateResponse] contentAsString]
|
||||
stringByTrimmingCharactersInSet: wsSet];
|
||||
if (!subject)
|
||||
{
|
||||
[self errorWithFormat:@"Failed to properly generate subject! Please check "
|
||||
@"template for component '%@'!",
|
||||
[self name]];
|
||||
subject = @"ERROR: missing subject!";
|
||||
}
|
||||
|
||||
return [subject asQPSubjectString: @"utf-8"];
|
||||
}
|
||||
|
||||
- (NSString *) getBody
|
||||
{
|
||||
NSString *body;
|
||||
|
@ -105,8 +83,6 @@ static NSCharacterSet *wsSet = nil;
|
|||
if (!values)
|
||||
[self setupValues];
|
||||
|
||||
isSubject = NO;
|
||||
|
||||
body = [[self generateResponse] contentAsString];
|
||||
|
||||
return [body stringByTrimmingCharactersInSet: wsSet];
|
||||
|
@ -168,19 +144,19 @@ static NSCharacterSet *wsSet = nil;
|
|||
switch (operation)
|
||||
{
|
||||
case EventCreated:
|
||||
s = @"Receipt: event was created";
|
||||
s = [self labelForKey: @"Receipt: event was created" inContext: context];
|
||||
break;
|
||||
|
||||
case EventDeleted:
|
||||
s = @"Receipt: event was deleted";
|
||||
s = [self labelForKey: @"Receipt: event was deleted" inContext: context];
|
||||
break;
|
||||
|
||||
case EventUpdated:
|
||||
default:
|
||||
s = @"Receipt: event was updated";
|
||||
s = [self labelForKey: @"Receipt: event was updated" inContext: context];
|
||||
}
|
||||
|
||||
return s;
|
||||
return [[s stringByTrimmingCharactersInSet: wsSet] asQPSubjectString: @"utf-8"];
|
||||
}
|
||||
|
||||
- (NSString *) _formattedUserDate: (NSCalendarDate *) date
|
||||
|
|
|
@ -1048,9 +1048,9 @@ static inline BOOL _occurenceHasID (iCalRepeatableEntityObject *occurence,
|
|||
|
||||
mailDate = [[NSCalendarDate date] rfc822DateString];
|
||||
[headerMap setObject: mailDate forKey: @"date"];
|
||||
[headerMap setObject: [page getSubject] forKey: @"subject"];
|
||||
[headerMap setObject: [page subject] forKey: @"subject"];
|
||||
[headerMap setObject: @"1.0" forKey: @"MIME-Version"];
|
||||
[headerMap setObject: @"text/plain; charset=utf-8"
|
||||
[headerMap setObject: @"text/html; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
msg = [NGMimeMessage messageWithHeader: headerMap];
|
||||
|
||||
|
|
|
@ -1,54 +1,58 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<!DOCTYPE container>
|
||||
<container
|
||||
<html
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:var="http://www.skyrix.com/od/binding"
|
||||
xmlns:const="http://www.skyrix.com/od/constant"
|
||||
xmlns:rsrc="OGo:url"
|
||||
xmlns:label="OGo:label">
|
||||
|
||||
<var:if condition="isSubject">
|
||||
<var:string value="subject"
|
||||
<var:string label:value="Event details:" const:escapeHTML="NO"/>
|
||||
<br/>
|
||||
|
||||
<var:string label:value="Title:" const:escapeHTML="NO"/> <var:string
|
||||
value="apt.summary" const:escapeHTML="NO"/>
|
||||
<br/>
|
||||
|
||||
<var:if condition="apt.location.length">
|
||||
<var:string label:value="Location:" const:escapeHTML="NO"/> <var:string
|
||||
value="apt.location" const:escapeHTML="NO"/>
|
||||
</var:if>
|
||||
<br/>
|
||||
|
||||
<var:string label:value="Start:" const:escapeHTML="NO"/> <var:string
|
||||
value="aptStartDate" const:escapeHTML="NO"/>
|
||||
<br/>
|
||||
|
||||
<var:string label:value="End:" const:escapeHTML="NO"/> <var:string
|
||||
value="aptEndDate" const:escapeHTML="NO"/>
|
||||
<br/>
|
||||
|
||||
<var:if condition="updatedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were notified:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="updatedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
<br/>
|
||||
|
||||
<var:if condition="isSubject" const:negate="YES">
|
||||
<var:string label:value="Event details:" const:escapeHTML="NO"/>
|
||||
|
||||
<var:string label:value="Title:" const:escapeHTML="NO"/> <var:string
|
||||
value="apt.summary" const:escapeHTML="NO"/>
|
||||
<var:if condition="apt.location.length">
|
||||
<var:string label:value="Location:" const:escapeHTML="NO"/> <var:string
|
||||
value="apt.location" const:escapeHTML="NO"/>
|
||||
</var:if>
|
||||
<var:string label:value="Start:" const:escapeHTML="NO"/> <var:string
|
||||
value="aptStartDate" const:escapeHTML="NO"/>
|
||||
<var:string label:value="End:" const:escapeHTML="NO"/> <var:string
|
||||
value="aptEndDate" const:escapeHTML="NO"/>
|
||||
|
||||
<var:if condition="updatedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were notified:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="updatedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
|
||||
<var:if condition="addedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were added:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="addedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
|
||||
<var:if condition="deletedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were removed:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="deletedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
|
||||
<var:if condition="addedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were added:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="addedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
</container>
|
||||
<br/>
|
||||
|
||||
<var:if condition="deletedAttendees.count">
|
||||
<var:string label:value="The following attendees(s) were removed:"
|
||||
const:escapeHTML="NO"/>
|
||||
<var:foreach list="deletedAttendees" item="currentRecipient">
|
||||
<var:string value="currentRecipient.mailAddress" const:escapeHTML="NO"
|
||||
/></var:foreach>
|
||||
</var:if>
|
||||
<br/>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue