From 0d4e224ec71565d309c7e8c82c561ccb3e7448a8 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 23 Aug 2007 17:33:19 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1153 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 41 +++++ SoObjects/Appointments/SOGoAptMailDeletion.m | 10 +- .../SOGoAptMailGermanDeletion.html | 4 + .../SOGoAptMailGermanDeletion.wod | 34 ++++ .../SOGoAptMailGermanInvitation.html | 7 + .../SOGoAptMailGermanInvitation.wod | 34 ++++ .../SOGoAptMailGermanRemoval.html | 4 + .../SOGoAptMailGermanRemoval.wod | 34 ++++ .../SOGoAptMailGermanUpdate.html | 5 + .../SOGoAptMailGermanUpdate.wod | 46 +++++ .../Appointments/SOGoAptMailInvitation.m | 12 +- SoObjects/Appointments/SOGoAptMailRemoval.m | 12 +- .../Appointments/SOGoCalendarComponent.m | 11 +- SoObjects/Mailer/GNUmakefile | 11 +- SoObjects/Mailer/SOGoDraftObject.m | 23 ++- .../Mailer/SOGoMailForward.h | 28 ++- SoObjects/Mailer/SOGoMailForward.m | 161 ++++++++++++++++++ .../SOGoMailGermanForward.html | 8 + .../SOGoMailGermanForward.wod | 69 ++++++++ SoObjects/Mailer/SOGoMailObject+Draft.h | 1 + SoObjects/Mailer/SOGoMailObject+Draft.m | 21 +++ SoObjects/Mailer/SOGoMailObject.h | 2 + SoObjects/Mailer/SOGoMailObject.m | 99 +++++++---- SoObjects/SOGo/SOGoUser.h | 1 + SoObjects/SOGo/SOGoUser.m | 26 ++- .../English.lproj/Localizable.strings | 6 + .../French.lproj/Localizable.strings | 6 + UI/PreferencesUI/UIxPreferences.m | 22 +++ UI/SOGoUI/GNUmakefile | 6 +- UI/SOGoUI/SOGoACLAdvisory.h | 18 ++ UI/SOGoUI/SOGoACLAdvisory.m | 18 ++ UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h | 31 ---- UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h | 31 ---- UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m | 32 ---- UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h | 31 ---- UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m | 27 --- UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h | 31 ---- UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m | 27 --- UI/SOGoUI/UIxComponent.m | 24 +-- UI/Templates/MailerUI/UIxMailEditor.wox | 2 +- UI/Templates/MailerUI/UIxMailToSelection.wox | 4 +- UI/Templates/PreferencesUI/UIxPreferences.wox | 7 + .../SOGoACLGermanAdditionAdvisory.wox | 22 +++ UI/Templates/SOGoACLGermanRemovalAdvisory.wox | 21 +++ UI/WebServerResources/MailerUI.css | 2 +- 45 files changed, 771 insertions(+), 301 deletions(-) create mode 100644 SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.html create mode 100644 SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod create mode 100644 SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.html create mode 100644 SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod create mode 100644 SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.html create mode 100644 SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod create mode 100644 SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.html create mode 100644 SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod rename UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m => SoObjects/Mailer/SOGoMailForward.h (60%) create mode 100644 SoObjects/Mailer/SOGoMailForward.m create mode 100644 SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.html create mode 100644 SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod delete mode 100644 UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h delete mode 100644 UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h delete mode 100644 UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m delete mode 100644 UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h delete mode 100644 UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m delete mode 100644 UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h delete mode 100644 UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m create mode 100644 UI/Templates/SOGoACLGermanAdditionAdvisory.wox create mode 100644 UI/Templates/SOGoACLGermanRemovalAdvisory.wox diff --git a/ChangeLog b/ChangeLog index 4c51a028..0bcd7abe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +2007-08-22 Wolfgang Sourdeau + + * UI/PreferencesUI/UIxPreferences.m ([UIxPreferences + -messageForwardingList]) + ([UIxPreferences -itemMessageForwardingText])D + ([UIxPreferences -userMessageForwarding]) + ([UIxPreferences -setUserMessageForwarding:newMessageForwarding]): + new template methods for manage the user preference regarding + message forwarding. + + * SoObjects/SOGo/SOGoUser.m ([SOGoUser -language]): change the + algorithm to return, in order, the user's defined language or the + first browser language or, finally, the default language. + ([SOGoUser -messageForwarding]): new method that returns the user + preference for message forwarding: "inline" or "attached", + defaulting to "attached". + + * SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject + -contentForInlineForward]): new method that returns the content of + the message for inline forwarding based on the SOGoMailForward + templates. + + * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject + -fetchMailForForwarding:sourceMail]): check the user preference + for message forwarding and compose inline forwarded messages if required. + + * SoObjects/Appointments/SOGoCalendarComponent.m + ([SOGoCalendarComponent + -sendEMailUsingTemplateNamed:_pageNameforOldObject:_oldObjectandNewObject:_newObjecttoAttendees:_attendees]): + now use a template based on the language returned from the + SOGoUser object. + + * SoObjects/Mailer/SOGoMailEnglishForward.m: new module containing + a subclass of SOGoMailForward for English locale. + + * SoObjects/Mailer/SOGoMailFrenchForward.m: new module containing + a subclass of SOGoMailForward for French locale. + + * SoObjects/Mailer/SOGoMailForward.[hm]: new module class that + helps build template for inline forwarded messages. + 2007-08-21 Wolfgang Sourdeau * UI/SOGoElements/SOGoIEConditional.m: new extension module class diff --git a/SoObjects/Appointments/SOGoAptMailDeletion.m b/SoObjects/Appointments/SOGoAptMailDeletion.m index dec1e8c0..e0c13c8e 100644 --- a/SoObjects/Appointments/SOGoAptMailDeletion.m +++ b/SoObjects/Appointments/SOGoAptMailDeletion.m @@ -22,17 +22,19 @@ #include "SOGoAptMailNotification.h" @interface SOGoAptMailEnglishDeletion : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailEnglishDeletion @end @interface SOGoAptMailFrenchDeletion : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailFrenchDeletion @end + +@interface SOGoAptMailGermanDeletion : SOGoAptMailNotification +@end + +@implementation SOGoAptMailGermanDeletion +@end diff --git a/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.html b/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.html new file mode 100644 index 00000000..5653d744 --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.html @@ -0,0 +1,4 @@ +<#IsSubject>Der Termin am <#AptStartDate /> um <#AptStartTime /> wurde gelöscht. +<#IsBody> +Der Termin am <#AptStartDate /> um <#AptStartTime /> wurde von <#Organizer /> gelöscht. + diff --git a/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod b/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.html b/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.html new file mode 100644 index 00000000..982c66a1 --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.html @@ -0,0 +1,7 @@ +<#IsSubject>Termin am <#AptStartDate /> um <#AptStartTime /> +<#IsBody> +<#Organizer /> lädt Sie zu einem Termin am <#AptStartDate /> um <#AptStartTime /> ein. +<#HasHomePageURL> +Bitte benutzen Sie folgende URL, um anzugeben, ob Sie an dem Termin teilnehmen können: <#HomePageURL />. + + diff --git a/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod b/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.html b/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.html new file mode 100644 index 00000000..3133ccc6 --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.html @@ -0,0 +1,4 @@ +<#IsSubject>Von dem Termin am <#AptStartDate /> um <#AptStartTime /> gelöscht +<#IsBody> +Sie sind nicht mehr eingeladen zu dem Termin am <#AptStartDate /> um <#AptStartTime /> organisiert von <#Organizer />. + diff --git a/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod b/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod new file mode 100644 index 00000000..3e37496c --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod @@ -0,0 +1,34 @@ +AptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +AptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.html b/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.html new file mode 100644 index 00000000..b0fd4dc9 --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.html @@ -0,0 +1,5 @@ +<#IsSubject>Veränderung des Termins am <#OldAptStartDate /> um <#OldAptStartTime /> +<#IsBody> +Der Termin, der ursprünglich am <#OldAptStartDate /> um <#OldAptStartTime /> stattfinden sollte, ist jetzt für den <#NewAptStartDate /> um <#NewAptStartTime /> geplant. +Bitte geben Sie an folgender URL an, ob Sie an diesem Termin zum neuen Datum teilnehmen können: <#HomePageURL />. + diff --git a/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod b/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod new file mode 100644 index 00000000..3dccef2a --- /dev/null +++ b/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod @@ -0,0 +1,46 @@ +OldAptStartDate: WOString { + value = oldStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +OldAptStartTime: WOString { + value = oldStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +NewAptStartDate: WOString { + value = newStartDate; + dateformat = "%d/%m/%y"; + escapeHTML = NO; +} + +NewAptStartTime: WOString { + value = newStartDate; + dateformat = "%H:%M"; + escapeHTML = NO; +} + +Organizer: WOString { + value = newApt.organizer.cnWithoutQuotes; + escapeHTML = NO; +} + +HasHomePageURL: WOConditional { + condition = homePageURL.length; +} + +HomePageURL: WOString { + value = appointmentURL; + escapeHTML = NO; +} + +IsSubject: WOConditional { + condition = isSubject; +} + +IsBody: WOConditional { + condition = isSubject; + negate = YES; +} diff --git a/SoObjects/Appointments/SOGoAptMailInvitation.m b/SoObjects/Appointments/SOGoAptMailInvitation.m index 64f8a8b7..84d4b3f7 100644 --- a/SoObjects/Appointments/SOGoAptMailInvitation.m +++ b/SoObjects/Appointments/SOGoAptMailInvitation.m @@ -19,20 +19,22 @@ 02111-1307, USA. */ -#include "SOGoAptMailNotification.h" +#import "SOGoAptMailNotification.h" @interface SOGoAptMailEnglishInvitation : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailEnglishInvitation @end @interface SOGoAptMailFrenchInvitation : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailFrenchInvitation @end + +@interface SOGoAptMailGermanInvitation : SOGoAptMailNotification +@end + +@implementation SOGoAptMailGermanInvitation +@end diff --git a/SoObjects/Appointments/SOGoAptMailRemoval.m b/SoObjects/Appointments/SOGoAptMailRemoval.m index d10493f8..0053ce4b 100644 --- a/SoObjects/Appointments/SOGoAptMailRemoval.m +++ b/SoObjects/Appointments/SOGoAptMailRemoval.m @@ -19,20 +19,22 @@ 02111-1307, USA. */ -#include "SOGoAptMailNotification.h" +#import "SOGoAptMailNotification.h" @interface SOGoAptMailEnglishRemoval : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailEnglishRemoval @end @interface SOGoAptMailFrenchRemoval : SOGoAptMailNotification -{ -} @end @implementation SOGoAptMailFrenchRemoval @end + +@interface SOGoAptMailGermanRemoval : SOGoAptMailNotification +@end + +@implementation SOGoAptMailGermanRemoval +@end diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 200346d3..73f9766d 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -47,7 +47,6 @@ #import "iCalEntityObject+SOGo.h" #import "SOGoCalendarComponent.h" -static NSString *mailTemplateDefaultLanguage = nil; static BOOL sendEMailNotifications = NO; @implementation SOGoCalendarComponent @@ -62,11 +61,6 @@ static BOOL sendEMailNotifications = NO; didInit = YES; ud = [NSUserDefaults standardUserDefaults]; - mailTemplateDefaultLanguage = [[ud stringForKey:@"SOGoDefaultLanguage"] - retain]; - if (!mailTemplateDefaultLanguage) - mailTemplateDefaultLanguage = @"English"; - sendEMailNotifications = [ud boolForKey: @"SOGoAppointmentSendEMailNotifications"]; } @@ -337,7 +331,7 @@ static BOOL sendEMailNotifications = NO; WOApplication *app; unsigned i, count; iCalPerson *attendee; - NSString *recipient; + NSString *recipient, *language; SOGoAptMailNotification *p; NSString *mailDate, *subject, *text, *header; NGMutableHashMap *headerMap; @@ -380,12 +374,13 @@ static BOOL sendEMailNotifications = NO; else recipient = email; + language = [[context activeUser] language]; #warning this could be optimized in a class hierarchy common with the \ SOGoObject's acl notification mechanism /* create page name */ // TODO: select user's default language? pageName = [NSString stringWithFormat: @"SOGoAptMail%@%@", - mailTemplateDefaultLanguage, + language, _pageName]; /* construct message content */ p = [app pageWithName: pageName inContext: context]; diff --git a/SoObjects/Mailer/GNUmakefile b/SoObjects/Mailer/GNUmakefile index a0fc74d4..2abb34c7 100644 --- a/SoObjects/Mailer/GNUmakefile +++ b/SoObjects/Mailer/GNUmakefile @@ -2,7 +2,7 @@ include ../common.make -BUNDLE_NAME = Mailer +WOBUNDLE_NAME = Mailer Mailer_PRINCIPAL_CLASS = SOGoMailerProduct @@ -29,12 +29,19 @@ Mailer_OBJC_FILES += \ \ SOGoDraftsFolder.m \ SOGoDraftObject.m \ + \ + SOGoMailForward.m Mailer_RESOURCE_FILES += \ Version \ product.plist \ +Mailer_RESOURCE_FILES += \ + SOGoMailEnglishForward.wo \ + SOGoMailFrenchForward.wo \ + SOGoMailGermanForward.wo + -include GNUmakefile.preamble -include $(GNUSTEP_MAKEFILES)/bundle.make +include $(GNUSTEP_MAKEFILES)/wobundle.make -include GNUmakefile.postamble include ../../fhsbundle.make diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 55b98302..6c49beb9 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -29,7 +29,7 @@ #import #import -#import +#import #import #import #import @@ -54,6 +54,7 @@ #import #import #import +#import #import "SOGoMailAccount.h" #import "SOGoMailFolder.h" #import "SOGoMailObject.h" @@ -517,6 +518,7 @@ static BOOL showTextAttachmentsInline = NO; - (void) fetchMailForForwarding: (SOGoMailObject *) sourceMail { NSDictionary *info, *attachment; + SOGoUser *currentUser; [sourceMail fetchCoreInfos]; @@ -527,15 +529,20 @@ static BOOL showTextAttachmentsInline = NO; [self setSourceFlag: @"$Forwarded"]; /* attach message */ - + currentUser = [context activeUser]; + if ([[currentUser messageForwarding] isEqualToString: @"inline"]) + [self setText: [sourceMail contentForInlineForward]]; + else + { // TODO: use subject for filename? // error = [newDraft saveAttachment:content withName:@"forward.mail"]; - attachment = [NSDictionary dictionaryWithObjectsAndKeys: - [sourceMail filenameForForward], @"filename", - @"message/rfc822", @"mime-type", - nil]; - [self saveAttachment: [sourceMail content] - withMetadata: attachment]; + attachment = [NSDictionary dictionaryWithObjectsAndKeys: + [sourceMail filenameForForward], @"filename", + @"message/rfc822", @"mime-type", + nil]; + [self saveAttachment: [sourceMail content] + withMetadata: attachment]; + } [self storeInfo]; } diff --git a/UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m b/SoObjects/Mailer/SOGoMailForward.h similarity index 60% rename from UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m rename to SoObjects/Mailer/SOGoMailForward.h index 323684dc..d5da4549 100644 --- a/UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m +++ b/SoObjects/Mailer/SOGoMailForward.h @@ -1,4 +1,4 @@ -/* SOGoACLEnglishAdditionAdvisory.m - this file is part of SOGo +/* SOGoMailForward.h - this file is part of SOGo * * Copyright (C) 2007 Inverse groupe conseil * @@ -20,13 +20,31 @@ * Boston, MA 02111-1307, USA. */ -#import "SOGoACLEnglishAdditionAdvisory.h" +#ifndef SOGOMAILFORWARD_H +#define SOGOMAILFORWARD_H -@implementation SOGoACLEnglishAdditionAdvisory +#import -- (NSString *) aclMethod +@class SOGoMailObject; + +@interface SOGoMailForward : SoComponent { - return @"add"; + SOGoMailObject *sourceMail; + NSString *field; + NSString *currentValue; } +- (void) setForwardedMail: (SOGoMailObject *) newSourceMail; + @end + +@interface SOGoMailEnglishForward : SOGoMailForward +@end + +@interface SOGoMailFrenchForward : SOGoMailForward +@end + +@interface SOGoMailGermanForward : SOGoMailForward +@end + +#endif /* SOGOMAILFORWARD_H */ diff --git a/SoObjects/Mailer/SOGoMailForward.m b/SoObjects/Mailer/SOGoMailForward.m new file mode 100644 index 00000000..ce3545dd --- /dev/null +++ b/SoObjects/Mailer/SOGoMailForward.m @@ -0,0 +1,161 @@ +/* SOGoMailForward.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#import + +#import +#import + +#import "SOGoMailObject+Draft.h" +#import "SOGoMailForward.h" + +@implementation SOGoMailForward + +- (id) init +{ + if ((self = [super init])) + { + sourceMail = nil; + currentValue = nil; + } + + return self; +} + +- (void) dealloc +{ + [sourceMail release]; + [currentValue release]; + [super dealloc]; +} + +- (void) setForwardedMail: (SOGoMailObject *) newSourceMail +{ + ASSIGN (sourceMail, newSourceMail); +} + +- (NSString *) subject +{ + return [sourceMail subject]; +} + +- (NSString *) date +{ + SOGoDateFormatter *formatter; + + formatter = [[context activeUser] dateFormatterInContext: context]; + + return [formatter formattedDateAndTime: [sourceMail date]]; +} + +- (NSString *) from +{ + return [[sourceMail mailHeaders] objectForKey: @"from"]; +} + +- (NSString *) _headerField: (NSString *) fieldName +{ + if (![field isEqualToString: fieldName]) + { + [currentValue release]; + currentValue = [[sourceMail mailHeaders] objectForKey: fieldName]; + [currentValue retain]; + } + + return currentValue; +} + +- (BOOL) hasReplyTo +{ + return ([[self _headerField: @"reply-to"] length] > 0); +} + +- (NSString *) replyTo +{ + return ([NSString stringWithFormat: @"%@\n", + [self _headerField: @"reply-to"]]); +} + +- (BOOL) hasOrganization +{ + return ([[self _headerField: @"organization"] length] > 0); +} + +- (NSString *) organization +{ + return ([NSString stringWithFormat: @"%@\n", + [self _headerField: @"organization"]]); +} + +- (NSString *) to +{ + return [[sourceMail mailHeaders] objectForKey: @"to"]; +} + +- (BOOL) hasCc +{ + return ([[self _headerField: @"cc"] length] > 0); +} + +- (NSString *) cc +{ + return ([NSString stringWithFormat: @"%@\n", + [self _headerField: @"cc"]]); +} + +- (BOOL) hasNewsGroups +{ + return ([[self _headerField: @"newsgroups"] length] > 0); +} + +- (NSString *) newsgroups +{ + return ([NSString stringWithFormat: @"%@\n", + [self _headerField: @"newsgroups"]]); +} + +- (BOOL) hasReferences +{ + return ([[self _headerField: @"references"] length] > 0); +} + +- (NSString *) references +{ + return ([NSString stringWithFormat: @"%@\n", + [self _headerField: @"references"]]); +} + +- (NSString *) messageBody +{ + return [sourceMail contentForEditing]; +} + +@end + +@implementation SOGoMailEnglishForward +@end + +@implementation SOGoMailFrenchForward +@end + +@implementation SOGoMailGermanForward +@end diff --git a/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.html b/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.html new file mode 100644 index 00000000..26fa0803 --- /dev/null +++ b/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.html @@ -0,0 +1,8 @@ +-------- Original E-Mail -------- +Betreff: <#subject/> +Datum: <#date/> +Sender: <#from/> +<#hasReplyTo>Antworten an: <#replyTo/><#hasOrganization>Organisation: <#organization/>An: <#to/> +<#hasCc>Kopie: <#cc/><#hasNewsGroups>Newsgroup: <#newsgroups/><#hasReferences>Referenzen: <#references/> + +<#messageBody/> diff --git a/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod b/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod new file mode 100644 index 00000000..517bc8cc --- /dev/null +++ b/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod @@ -0,0 +1,69 @@ +subject: WOString { + value = subject; + escapeHTML = NO; +} + +date: WOString { + value = date; + escapeHTML = NO; +} + +from: WOString { + value = from; + escapeHTML = NO; +} + +hasReplyTo: WOConditional { + condition = hasReplyTo; +} + +replyTo: WOString { + value = replyTo; + escapeHTML = NO; +} + +hasOrganization: WOConditional { + condition = hasOrganization; +} + +organization: WOString { + value = organization; + escapeHTML = NO; +} + +to: WOString { + value = to; + escapeHTML = NO; +} + +hasCc: WOConditional { + condition = hasCc; +} + +cc: WOString { + value = cc; + escapeHTML = NO; +} + +hasNewsGroups: WOConditional { + condition = hasNewsGroups; +} + +newsgroups: WOString { + value = newsgroups; + escapeHTML = NO; +} + +hasReferences: WOConditional { + condition = hasReferences; +} + +references: WOString { + value = references; + escapeHTML = NO; +} + +messageBody: WOString { + value = messageBody; + escapeHTML = NO; +} diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.h b/SoObjects/Mailer/SOGoMailObject+Draft.h index ddc534ad..706e1ca8 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.h +++ b/SoObjects/Mailer/SOGoMailObject+Draft.h @@ -35,6 +35,7 @@ - (NSString *) subjectForForward; - (NSString *) filenameForForward; +- (NSString *) contentForInlineForward; @end diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 12e9341b..18e6e0f2 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -22,9 +22,14 @@ #import +#import +#import #import #import +#import + +#import "SOGoMailForward.h" #import "SOGoMailObject+Draft.h" #define maxFilenameLength 64 @@ -207,6 +212,22 @@ return newSubject; } +- (NSString *) contentForInlineForward +{ + SOGoUser *currentUser; + NSString *pageName; + SOGoMailForward *page; + + currentUser = [context activeUser]; + pageName = [NSString stringWithFormat: @"SOGoMail%@Forward", + [currentUser language]]; + page = [[WOApplication application] pageWithName: pageName + inContext: context]; + [page setForwardedMail: self]; + + return [[page generateResponse] contentAsString]; +} + - (void) _fetchFileAttachmentKey: (NSDictionary *) part intoArray: (NSMutableArray *) keys withPath: (NSString *) path diff --git a/SoObjects/Mailer/SOGoMailObject.h b/SoObjects/Mailer/SOGoMailObject.h index 2dd21d42..c81e4103 100644 --- a/SoObjects/Mailer/SOGoMailObject.h +++ b/SoObjects/Mailer/SOGoMailObject.h @@ -63,6 +63,8 @@ - (NSArray *)toEnvelopeAddresses; - (NSArray *)ccEnvelopeAddresses; +- (NSDictionary *) mailHeaders; + - (id)bodyStructure; - (id)lookupInfoForBodyPart:(id)_path; diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index c99b1b0b..0f152a4f 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -325,7 +325,8 @@ static BOOL debugSoParts = NO; return headers; } -- (id)lookupInfoForBodyPart:(id)_path { +- (id) lookupInfoForBodyPart: (id) _path +{ NSEnumerator *pe; NSString *p; id info; @@ -392,7 +393,8 @@ static BOOL debugSoParts = NO; /* content */ -- (NSData *)content { +- (NSData *) content +{ NSData *content; id result, fullResult; @@ -611,13 +613,15 @@ static BOOL debugSoParts = NO; return flatContents; } -- (NSDictionary *)fetchPlainTextParts { +- (NSDictionary *) fetchPlainTextParts +{ return [self fetchPlainTextParts:[self plainTextContentFetchKeys]]; } /* convert parts to strings */ -- (NSString *)stringForData:(NSData *)_data partInfo:(NSDictionary *)_info +- (NSString *) stringForData: (NSData *) _data + partInfo: (NSDictionary *) _info { NSString *charset, *encoding, *s; NSData *mailData; @@ -650,7 +654,8 @@ static BOOL debugSoParts = NO; return s; } -- (NSDictionary *)stringifyTextParts:(NSDictionary *)_datas { +- (NSDictionary *) stringifyTextParts: (NSDictionary *) _datas +{ NSMutableDictionary *md; NSEnumerator *keys; NSString *key; @@ -667,7 +672,9 @@ static BOOL debugSoParts = NO; } return md; } -- (NSDictionary *)fetchPlainTextStrings:(NSArray *)_fetchKeys { + +- (NSDictionary *) fetchPlainTextStrings: (NSArray *) _fetchKeys +{ /* The fetched parts are NSData objects, this method converts them into NSString objects based on the information inside the bodystructure. @@ -723,7 +730,10 @@ static BOOL debugSoParts = NO; return [clazz objectWithName:_key inContainer: self]; } -- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag { +- (id) lookupName: (NSString *) _key + inContext: (id) _ctx + acquire: (BOOL) _flag +{ id obj; /* first check attributes directly bound to the application */ @@ -747,34 +757,41 @@ static BOOL debugSoParts = NO; /* WebDAV */ -- (BOOL)davIsCollection { +- (BOOL) davIsCollection +{ /* while a mail has child objects, it should appear as a file in WebDAV */ return NO; } -- (id)davContentLength { +- (id) davContentLength +{ return [[self fetchCoreInfos] valueForKey: @"size"]; } -- (NSDate *)davCreationDate { +- (NSDate *) davCreationDate +{ // TODO: use INTERNALDATE once NGImap4 supports that return nil; } -- (NSDate *)davLastModified { + +- (NSDate *) davLastModified +{ return [self davCreationDate]; } -- (NSException *)davMoveToTargetObject:(id)_target newName:(NSString *)_name - inContext:(id)_ctx +- (NSException *) davMoveToTargetObject: (id) _target + newName: (NSString *) _name + inContext: (id)_ctx { [self logWithFormat: @"TODO: should move mail as '%@' to: %@", _name, _target]; - return [NSException exceptionWithHTTPStatus:501 /* Not Implemented */ + return [NSException exceptionWithHTTPStatus: 501 /* Not Implemented */ reason: @"not implemented"]; } -- (NSException *)davCopyToTargetObject:(id)_target newName:(NSString *)_name - inContext:(id)_ctx +- (NSException *) davCopyToTargetObject: (id) _target + newName: (NSString *) _name + inContext: (id)_ctx { /* Note: this is special because we create SOGoMailObject's even if they do @@ -798,7 +815,8 @@ static BOOL debugSoParts = NO; /* actions */ -- (id)GETAction:(id)_ctx { +- (id) GETAction: (id) _ctx +{ NSException *error; WOResponse *r; NSData *content; @@ -828,7 +846,8 @@ static BOOL debugSoParts = NO; /* operations */ -- (NSException *)trashInContext:(id)_ctx { +- (NSException *) trashInContext: (id) _ctx +{ /* Trashing is three actions: a) copy to trash folder @@ -938,7 +957,8 @@ static BOOL debugSoParts = NO; return nil; } -- (NSException *)delete { +- (NSException *) delete +{ /* Note: delete is different to DELETEAction: for mails! The 'delete' runs either flags a message as deleted or moves it to the Trash while @@ -953,7 +973,9 @@ static BOOL debugSoParts = NO; error = [[self imap4Connection] markURLDeleted:[self imap4URL]]; return error; } -- (id)DELETEAction:(id)_ctx { + +- (id) DELETEAction: (id) _ctx +{ NSException *error; // TODO: ensure safe HTTP method @@ -969,7 +991,8 @@ static BOOL debugSoParts = NO; /* some mail classification */ -- (BOOL)isKolabObject { +- (BOOL) isKolabObject +{ NSDictionary *h; if ((h = [self mailHeaders]) != nil) @@ -980,7 +1003,8 @@ static BOOL debugSoParts = NO; return NO; } -- (BOOL)isMailingListMail { +- (BOOL) isMailingListMail +{ NSDictionary *h; if ((h = [self mailHeaders]) == nil) @@ -989,7 +1013,8 @@ static BOOL debugSoParts = NO; return [[h objectForKey: @"list-id"] isNotEmpty]; } -- (BOOL)isVirusScanned { +- (BOOL) isVirusScanned +{ NSDictionary *h; if ((h = [self mailHeaders]) == nil) @@ -1000,8 +1025,8 @@ static BOOL debugSoParts = NO; return YES; } -- (NSString *)scanListHeaderValue:(id)_value - forFieldWithPrefix:(NSString *)_prefix +- (NSString *) scanListHeaderValue: (id) _value + forFieldWithPrefix: (NSString *) _prefix { /* Note: not very tolerant on embedded commands and <> */ // TODO: does not really belong here, should be a header-field-parser @@ -1047,17 +1072,22 @@ static BOOL debugSoParts = NO; return _value; } -- (NSString *)mailingListArchiveURL { +- (NSString *) mailingListArchiveURL +{ return [self scanListHeaderValue: [[self mailHeaders] objectForKey: @"list-archive"] forFieldWithPrefix: @" #import #import +#import +#import #import #import @@ -310,10 +312,20 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; - (NSString *) language { + NSArray *bLanguages; + WOContext *context; + if (!language) { language = [[self userDefaults] stringForKey: @"Language"]; - if (!language) + if (![language length]) + { + context = [[WOApplication application] context]; + bLanguages = [[context request] browserLanguages]; + if ([bLanguages count] > 0) + language = [bLanguages objectAtIndex: 0]; + } + if (![language length]) language = defaultLanguage; [language retain]; } @@ -452,6 +464,18 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek"; return [[defaultAccount objectForKey: @"identities"] objectAtIndex: 0]; } +- (NSString *) messageForwarding +{ + NSString *messageForwarding; + + messageForwarding + = [[self userDefaults] stringForKey: @"MessageForwarding"]; + if (![messageForwarding length]) + messageForwarding = @"attached"; + + return messageForwarding; +} + /* folders */ // TODO: those methods should check whether the traversal stack in the context diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index bbf71463..2e427554 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -6,6 +6,7 @@ "Out of Office" = "Out of Office"; "Date and Time" = "Date and Time"; "Calendar Options" = "Calendar Options"; +"Mail Options" = "Mail Options"; "Password" = "Password"; /* ooo */ @@ -67,6 +68,11 @@ "reminderTime_2400" = "1 day"; "reminderTime_4800" = "2 days"; +/* Mailer */ +"Forward messages:" = "Forward messages:"; +"messageforward_inline" = "Inline"; +"messageforward_attached" = "As Attachment"; + /* password */ "New password:" = "New password:"; "Confirmation:" = "Confirmation:"; diff --git a/UI/PreferencesUI/French.lproj/Localizable.strings b/UI/PreferencesUI/French.lproj/Localizable.strings index f61bb331..3cf0d712 100644 --- a/UI/PreferencesUI/French.lproj/Localizable.strings +++ b/UI/PreferencesUI/French.lproj/Localizable.strings @@ -6,6 +6,7 @@ "Out of Office" = "Absence du bureau"; "Date and Time" = "Date et heure"; "Calendar Options" = "Calendrier"; +"Mail Options" = "Courrier"; "Password" = "Mot de passe"; /* ooo */ @@ -64,6 +65,11 @@ "reminderTime_2400" = "1 journée"; "reminderTime_4800" = "2 journées"; +/* Mailer */ +"Forward messages:" = "Transérer les messages :"; +"messageforward_inline" = "intégrés"; +"messageforward_attached" = "en pièces jointes"; + /* password */ "New password:" = "Nouveau mot de passe :"; "Confirmation:" = "Confirmation :"; diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 4fb12e88..4131db0a 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -419,6 +419,28 @@ static BOOL shouldDisplayPasswordChange = NO; [userDefaults setObject: newTime forKey: @"ReminderTime"]; } +/* Mailer */ +- (NSArray *) messageForwardingList +{ + return [NSArray arrayWithObjects: @"inline", @"attached", nil]; +} + +- (NSString *) itemMessageForwardingText +{ + return [self labelForKey: + [NSString stringWithFormat: @"messageforward_%@", item]]; +} + +- (NSString *) userMessageForwarding +{ + return [user messageForwarding]; +} + +- (void) setUserMessageForwarding: (NSString *) newMessageForwarding +{ + [userDefaults setObject: newMessageForwarding forKey: @"MessageForwarding"]; +} + - (id ) defaultAction { id results; diff --git a/UI/SOGoUI/GNUmakefile b/UI/SOGoUI/GNUmakefile index 554741b5..034e2764 100644 --- a/UI/SOGoUI/GNUmakefile +++ b/UI/SOGoUI/GNUmakefile @@ -28,11 +28,7 @@ libSOGoUI_OBJC_FILES += \ SOGoJSStringFormatter.m \ WOContext+UIx.m \ \ - SOGoACLAdvisory.m \ - SOGoACLFrenchAdditionAdvisory.m \ - SOGoACLFrenchRemovalAdvisory.m \ - SOGoACLEnglishAdditionAdvisory.m \ - SOGoACLEnglishRemovalAdvisory.m + SOGoACLAdvisory.m # make diff --git a/UI/SOGoUI/SOGoACLAdvisory.h b/UI/SOGoUI/SOGoACLAdvisory.h index 788a49a0..c6ac9b66 100644 --- a/UI/SOGoUI/SOGoACLAdvisory.h +++ b/UI/SOGoUI/SOGoACLAdvisory.h @@ -47,4 +47,22 @@ @end +@interface SOGoACLEnglishAdditionAdvisory : SOGoACLAdvisory +@end + +@interface SOGoACLEnglishRemovalAdvisory : SOGoACLAdvisory +@end + +@interface SOGoACLFrenchAdditionAdvisory : SOGoACLAdvisory +@end + +@interface SOGoACLFrenchRemovalAdvisory : SOGoACLAdvisory +@end + +@interface SOGoACLGermanAdditionAdvisory : SOGoACLAdvisory +@end + +@interface SOGoACLGermanRemovalAdvisory : SOGoACLAdvisory +@end + #endif /* SOGOACLADVISORY_H */ diff --git a/UI/SOGoUI/SOGoACLAdvisory.m b/UI/SOGoUI/SOGoACLAdvisory.m index 31b42ad6..12c2be31 100644 --- a/UI/SOGoUI/SOGoACLAdvisory.m +++ b/UI/SOGoUI/SOGoACLAdvisory.m @@ -209,3 +209,21 @@ } @end + +@implementation SOGoACLEnglishAdditionAdvisory +@end + +@implementation SOGoACLEnglishRemovalAdvisory +@end + +@implementation SOGoACLFrenchAdditionAdvisory +@end + +@implementation SOGoACLFrenchRemovalAdvisory +@end + +@implementation SOGoACLGermanAdditionAdvisory +@end + +@implementation SOGoACLGermanRemovalAdvisory +@end diff --git a/UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h b/UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h deleted file mode 100644 index cfc2bc5c..00000000 --- a/UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SOGoACLEnglishAdditionAdvisory.h - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef SOGOACLFRENCHADDITIONADVISORY_H -#define SOGOACLFRENCHADDITIONADVISORY_H - -#import "SOGoACLAdvisory.h" - -@interface SOGoACLEnglishAdditionAdvisory : SOGoACLAdvisory -@end - -#endif /* SOGOACLFRENCHADDITIONADVISORY_H */ diff --git a/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h b/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h deleted file mode 100644 index 7590f106..00000000 --- a/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SOGoACLEnglishRemovalAdvisory.h - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef SOGOACLENGLISHREMOVALADVISORY_H -#define SOGOACLENGLISHREMOVALADVISORY_H - -#import "SOGoACLAdvisory.h" - -@interface SOGoACLEnglishRemovalAdvisory : SOGoACLAdvisory -@end - -#endif /* SOGOACLENGLISHREMOVALADVISORY_H */ diff --git a/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m b/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m deleted file mode 100644 index f5eacbcf..00000000 --- a/UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m +++ /dev/null @@ -1,32 +0,0 @@ -/* SOGoACLEnglishRemovalAdvisory.m - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#import "SOGoACLEnglishRemovalAdvisory.h" - -@implementation SOGoACLEnglishRemovalAdvisory - -- (NSString *) aclMethod -{ - return @"add"; -} - -@end diff --git a/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h b/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h deleted file mode 100644 index 2b482ac1..00000000 --- a/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SOGoACLFrenchAdditionAdvisory.h - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef SOGOACLFRENCHADDITIONADVISORY_H -#define SOGOACLFRENCHADDITIONADVISORY_H - -#import "SOGoACLAdvisory.h" - -@interface SOGoACLFrenchAdditionAdvisory : SOGoACLAdvisory -@end - -#endif /* SOGOACLFRENCHADDITIONADVISORY_H */ diff --git a/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m b/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m deleted file mode 100644 index 229dcbc9..00000000 --- a/UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m +++ /dev/null @@ -1,27 +0,0 @@ -/* SOGoACLFrenchAdditionAdvisory.m - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#import "SOGoACLFrenchAdditionAdvisory.h" - -@implementation SOGoACLFrenchAdditionAdvisory - -@end diff --git a/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h b/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h deleted file mode 100644 index 9a6c9634..00000000 --- a/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h +++ /dev/null @@ -1,31 +0,0 @@ -/* SOGoACLFrenchRemovalAdvisory.h - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#ifndef SOGOACLFRENCHREMOVALADVISORY_H -#define SOGOACLFRENCHREMOVALADVISORY_H - -#import "SOGoACLAdvisory.h" - -@interface SOGoACLFrenchRemovalAdvisory : SOGoACLAdvisory -@end - -#endif /* SOGOACLFRENCHREMOVALADVISORY_H */ diff --git a/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m b/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m deleted file mode 100644 index 050d2cfc..00000000 --- a/UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m +++ /dev/null @@ -1,27 +0,0 @@ -/* SOGoACLFrenchRemovalAdvisory.m - this file is part of SOGo - * - * Copyright (C) 2007 Inverse groupe conseil - * - * Author: Wolfgang Sourdeau - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#import "SOGoACLFrenchRemovalAdvisory.h" - -@implementation SOGoACLFrenchRemovalAdvisory - -@end diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index e0b7f2ca..0e8e45cd 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -199,7 +199,7 @@ static BOOL uixDebugEnabled = NO; queryParameters = [[NSMutableDictionary alloc] initWithCapacity:8]; - req = [[self context] request]; + req = [context request]; uri = [req uri]; r = [uri rangeOfString:@"?" options:NSBackwardsSearch]; if (r.length > 0) @@ -246,7 +246,7 @@ static BOOL uixDebugEnabled = NO; qp = [self queryParameters]; if ([qp count] > 0) { - ctx = [self context]; + ctx = context; qps = [ctx queryPathSeparator]; [ctx setQueryPathSeparator: @"&"]; qs = [ctx queryStringFromDictionary: qp]; @@ -264,7 +264,7 @@ static BOOL uixDebugEnabled = NO; NSString *uri; NSRange r; - uri = [[[self context] request] uri]; + uri = [[context request] uri]; /* first: cut off query parameters */ @@ -293,7 +293,7 @@ static BOOL uixDebugEnabled = NO; SOGoObject *currentObject; BOOL found; - ctx = [self context]; + ctx = context; objects = [[ctx objectTraversalStack] objectEnumerator]; currentObject = [objects nextObject]; found = NO; @@ -331,7 +331,7 @@ static BOOL uixDebugEnabled = NO; currentClient = parent; } - ctx = [self context]; + ctx = context; return [[currentClient baseURLInContext:ctx] hostlessURL]; } @@ -351,7 +351,7 @@ static BOOL uixDebugEnabled = NO; NSString *uri; NSRange r; - uri = [[[self context] request] uri]; + uri = [[context request] uri]; /* first: cut off query parameters */ @@ -422,7 +422,7 @@ static BOOL uixDebugEnabled = NO; { WOContext *ctx; - ctx = [self context]; + ctx = context; return [[[self clientObject] authenticatorInContext: ctx] userInContext: ctx]; } @@ -463,7 +463,7 @@ static BOOL uixDebugEnabled = NO; /* lookup languages */ - languages = [[self context] resourceLookupLanguages]; + languages = [context resourceLookupLanguages]; /* find resource manager */ @@ -530,7 +530,7 @@ static BOOL uixDebugEnabled = NO; // TODO: move to WORequest? NSString *m; - m = [[[self context] request] method]; + m = [[context request] method]; if ([m isEqualToString:@"GET"]) return YES; if ([m isEqualToString:@"HEAD"]) return YES; return NO; @@ -547,7 +547,7 @@ static BOOL uixDebugEnabled = NO; { WOResourceManager *rm; - if ((rm = [[[self context] page] resourceManager]) == nil) + if ((rm = [[context page] resourceManager]) == nil) rm = [[WOApplication application] resourceManager]; return rm; @@ -570,12 +570,12 @@ static BOOL uixDebugEnabled = NO; if (!url) { rm = [self pageResourceManager]; - page = [[self context] page]; + page = [context page]; pageBundle = [NSBundle bundleForClass: [page class]]; url = [rm urlForResourceNamed: filename inFramework: [pageBundle bundlePath] languages: nil - request: [[self context] request]]; + request: [context request]]; if (!url) url = @""; else diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox index 2106c7ba..10ef59a9 100644 --- a/UI/Templates/MailerUI/UIxMailEditor.wox +++ b/UI/Templates/MailerUI/UIxMailEditor.wox @@ -21,7 +21,7 @@ -
+
diff --git a/UI/Templates/MailerUI/UIxMailToSelection.wox b/UI/Templates/MailerUI/UIxMailToSelection.wox index 40d503e2..ebde4697 100644 --- a/UI/Templates/MailerUI/UIxMailToSelection.wox +++ b/UI/Templates/MailerUI/UIxMailToSelection.wox @@ -18,7 +18,7 @@ @@ -41,7 +41,7 @@ const:disabled="1" list="headers" item="item" - label:string="$item" + label:displayString="$item" /> diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox index 6d97ce4a..c941cf91 100644 --- a/UI/Templates/PreferencesUI/UIxPreferences.wox +++ b/UI/Templates/PreferencesUI/UIxPreferences.wox @@ -19,6 +19,8 @@ label:value="Date and Time"/>
  • +
  • @@ -89,6 +91,11 @@
    +
    +
    +