]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1153 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Aug 2007 17:33:19 +0000 (17:33 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Aug 2007 17:33:19 +0000 (17:33 +0000)
45 files changed:
ChangeLog
SoObjects/Appointments/SOGoAptMailDeletion.m
SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.html [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.html [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.html [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.html [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod [new file with mode: 0644]
SoObjects/Appointments/SOGoAptMailInvitation.m
SoObjects/Appointments/SOGoAptMailRemoval.m
SoObjects/Appointments/SOGoCalendarComponent.m
SoObjects/Mailer/GNUmakefile
SoObjects/Mailer/SOGoDraftObject.m
SoObjects/Mailer/SOGoMailForward.h [moved from UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m with 60% similarity]
SoObjects/Mailer/SOGoMailForward.m [new file with mode: 0644]
SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.html [new file with mode: 0644]
SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod [new file with mode: 0644]
SoObjects/Mailer/SOGoMailObject+Draft.h
SoObjects/Mailer/SOGoMailObject+Draft.m
SoObjects/Mailer/SOGoMailObject.h
SoObjects/Mailer/SOGoMailObject.m
SoObjects/SOGo/SOGoUser.h
SoObjects/SOGo/SOGoUser.m
UI/PreferencesUI/English.lproj/Localizable.strings
UI/PreferencesUI/French.lproj/Localizable.strings
UI/PreferencesUI/UIxPreferences.m
UI/SOGoUI/GNUmakefile
UI/SOGoUI/SOGoACLAdvisory.h
UI/SOGoUI/SOGoACLAdvisory.m
UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.h [deleted file]
UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.h [deleted file]
UI/SOGoUI/SOGoACLEnglishRemovalAdvisory.m [deleted file]
UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.h [deleted file]
UI/SOGoUI/SOGoACLFrenchAdditionAdvisory.m [deleted file]
UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.h [deleted file]
UI/SOGoUI/SOGoACLFrenchRemovalAdvisory.m [deleted file]
UI/SOGoUI/UIxComponent.m
UI/Templates/MailerUI/UIxMailEditor.wox
UI/Templates/MailerUI/UIxMailToSelection.wox
UI/Templates/PreferencesUI/UIxPreferences.wox
UI/Templates/SOGoACLGermanAdditionAdvisory.wox [new file with mode: 0644]
UI/Templates/SOGoACLGermanRemovalAdvisory.wox [new file with mode: 0644]
UI/WebServerResources/MailerUI.css

index 4c51a028744d541ee2e05cd721a19eebbc196f2c..0bcd7abee819e5e782999b2ded6d2c97c7238c23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2007-08-22  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * 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  <wsourdeau@inverse.ca>
 
        * UI/SOGoElements/SOGoIEConditional.m: new extension module class
index dec1e8c040f3bb21e7e5eb7cd7e8ee4730672878..e0c13c8ee88fcaf97258f12fcf3843cd6094f096 100644 (file)
 #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 (file)
index 0000000..5653d74
--- /dev/null
@@ -0,0 +1,4 @@
+<#IsSubject>Der Termin am <#AptStartDate /> um <#AptStartTime /> wurde gelöscht.</#IsSubject>
+<#IsBody>
+Der Termin am <#AptStartDate /> um <#AptStartTime /> wurde von <#Organizer /> gelöscht.
+</#IsBody>
diff --git a/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod b/SoObjects/Appointments/SOGoAptMailGermanDeletion.wo/SOGoAptMailGermanDeletion.wod
new file mode 100644 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..982c66a
--- /dev/null
@@ -0,0 +1,7 @@
+<#IsSubject>Termin am <#AptStartDate /> um <#AptStartTime /></#IsSubject>
+<#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 />.
+</#HasHomePageURL>
+</#IsBody>
diff --git a/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod b/SoObjects/Appointments/SOGoAptMailGermanInvitation.wo/SOGoAptMailGermanInvitation.wod
new file mode 100644 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..3133ccc
--- /dev/null
@@ -0,0 +1,4 @@
+<#IsSubject>Von dem Termin am <#AptStartDate /> um <#AptStartTime /> gelöscht</#IsSubject>
+<#IsBody>
+Sie sind nicht mehr eingeladen zu dem Termin am <#AptStartDate /> um <#AptStartTime /> organisiert von <#Organizer />.
+</#IsBody>
diff --git a/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod b/SoObjects/Appointments/SOGoAptMailGermanRemoval.wo/SOGoAptMailGermanRemoval.wod
new file mode 100644 (file)
index 0000000..3e37496
--- /dev/null
@@ -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 (file)
index 0000000..b0fd4dc
--- /dev/null
@@ -0,0 +1,5 @@
+<#IsSubject>Veränderung des Termins am <#OldAptStartDate /> um <#OldAptStartTime /></#IsSubject>
+<#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 />.
+</#IsBody>
diff --git a/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod b/SoObjects/Appointments/SOGoAptMailGermanUpdate.wo/SOGoAptMailGermanUpdate.wod
new file mode 100644 (file)
index 0000000..3dccef2
--- /dev/null
@@ -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;
+}
index 64f8a8b7517b75ef05106627b77a3812de78b013..84d4b3f7cfb82f66655de3b40abbf2cf624bb384 100644 (file)
   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
index d10493f811f1a6f07e92a5e991ef9cf5d8ad2678..0053ce4beb3aea828c6e9b64ab89417b7764152b 100644 (file)
   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
index 200346d31922dd9411b01c463a87118af0b6ff3b..73f9766d67ac42d3aae249edb299c94e22882daf 100644 (file)
@@ -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];
index a0fc74d4dfabf667547622cd9acf2992aa2bfcc1..2abb34c71ea9c7035af924d4f69d0c9aa26ebac2 100644 (file)
@@ -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
index 55b98302fa75b59c1b47b772d0b3702083f484a1..6c49beb97d42bd72b4b67ca7fd384c980b3f4f0b 100644 (file)
@@ -29,7 +29,7 @@
 
 #import <NGObjWeb/NSException+HTTP.h>
 #import <NGObjWeb/SoObject+SoDAV.h>
-#import <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WOContext+SoObjects.h>
 #import <NGObjWeb/WORequest+So.h>
 #import <NGObjWeb/WOResponse.h>
 #import <NGExtensions/NGBase64Coding.h>
@@ -54,6 +54,7 @@
 #import <SoObjects/SOGo/NSArray+Utilities.h>
 #import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
 #import <SoObjects/SOGo/SOGoMailer.h>
+#import <SoObjects/SOGo/SOGoUser.h>
 #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];
 }
 
similarity index 60%
rename from UI/SOGoUI/SOGoACLEnglishAdditionAdvisory.m
rename to SoObjects/Mailer/SOGoMailForward.h
index 323684dc791f0bbadad43ae1e9918e2980bb83e6..d5da454946a0c8ea65917b77102886eaafdeffbd 100644 (file)
@@ -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
  *
  * Boston, MA 02111-1307, USA.
  */
 
-#import "SOGoACLEnglishAdditionAdvisory.h"
+#ifndef SOGOMAILFORWARD_H
+#define SOGOMAILFORWARD_H
 
-@implementation SOGoACLEnglishAdditionAdvisory
+#import <NGObjWeb/SoComponent.h>
 
-- (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 (file)
index 0000000..ce3545d
--- /dev/null
@@ -0,0 +1,161 @@
+/* SOGoMailForward.m - this file is part of SOGo
+ *
+ * Copyright (C) 2007 Inverse groupe conseil
+ *
+ * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
+ *
+ * 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 <NGObjWeb/WOContext+SoObjects.h>
+
+#import <SoObjects/SOGo/SOGoDateFormatter.h>
+#import <SoObjects/SOGo/SOGoUser.h>
+
+#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 (file)
index 0000000..26fa080
--- /dev/null
@@ -0,0 +1,8 @@
+-------- Original E-Mail --------
+Betreff: <#subject/>
+Datum: <#date/>
+Sender: <#from/>
+<#hasReplyTo>Antworten an: <#replyTo/></#hasReplyTo><#hasOrganization>Organisation: <#organization/></#hasOrganization>An: <#to/>
+<#hasCc>Kopie: <#cc/></#hasCc><#hasNewsGroups>Newsgroup: <#newsgroups/></#hasNewsGroups><#hasReferences>Referenzen: <#references/></#hasReferences>
+
+<#messageBody/>
diff --git a/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod b/SoObjects/Mailer/SOGoMailGermanForward.wo/SOGoMailGermanForward.wod
new file mode 100644 (file)
index 0000000..517bc8c
--- /dev/null
@@ -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;
+}
index ddc534adc457c9dbfdbe12ff2f654e5140ba4dba..706e1ca80caeec4e5cd971a0168870f338889385 100644 (file)
@@ -35,6 +35,7 @@
 
 - (NSString *) subjectForForward;
 - (NSString *) filenameForForward;
+- (NSString *) contentForInlineForward;
 
 @end
 
index 12e9341b6f8335b99f823c8daf22f417001d8721..18e6e0f2f4d0d7e6bbfb41655dcfb26d944e2ca1 100644 (file)
 
 #import <Foundation/NSArray.h>
 
+#import <NGObjWeb/WOApplication.h>
+#import <NGObjWeb/WOContext+SoObjects.h>
 #import <NGExtensions/NSString+misc.h>
 #import <NGExtensions/NSObject+Logs.h>
 
+#import <SoObjects/SOGo/SOGoUser.h>
+
+#import "SOGoMailForward.h"
 #import "SOGoMailObject+Draft.h"
 
 #define maxFilenameLength 64
   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
index 2dd21d42b4119a294cdef807f69ec59099f3d094..c81e4103db2c4d36ba0f7fea176674160f916c2b 100644 (file)
@@ -63,6 +63,8 @@
 - (NSArray *)toEnvelopeAddresses;
 - (NSArray *)ccEnvelopeAddresses;
 
+- (NSDictionary *) mailHeaders;
+
 - (id)bodyStructure;
 - (id)lookupInfoForBodyPart:(id)_path;
 
index c99b1b0b304b33fbe616f100cf68dcdfd6e9b830..0f152a4fc6f09cfdc59d4025d127cff8c5326504 100644 (file)
@@ -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: @"<http://"];
 }
-- (NSString *)mailingListSubscribeURL {
+
+- (NSString *) mailingListSubscribeURL
+{
   return [self scanListHeaderValue:
                 [[self mailHeaders] objectForKey: @"list-subscribe"]
               forFieldWithPrefix: @"<http://"];
 }
-- (NSString *)mailingListUnsubscribeURL {
+
+- (NSString *) mailingListUnsubscribeURL
+{
   return [self scanListHeaderValue:
                 [[self mailHeaders] objectForKey: @"list-unsubscribe"]
               forFieldWithPrefix: @"<http://"];
@@ -1065,7 +1095,8 @@ static BOOL debugSoParts       = NO;
 
 /* etag support */
 
-- (id)davEntityTag {
+- (id) davEntityTag
+{
   /*
     Note: There is one thing which *can* change for an existing message,
           those are the IMAP4 flags (and annotations, which we do not use).
@@ -1074,13 +1105,16 @@ static BOOL debugSoParts       = NO;
   */
   return mailETag;
 }
-- (int)zlGenerationCount {
+
+- (int) zlGenerationCount
+{
   return 0; /* mails never change */
 }
 
 /* Outlook mail tagging */
 
-- (NSString *)outlookMessageClass {
+- (NSString *) outlookMessageClass
+{
   NSString *type;
   
   if ((type = [[self mailHeaders] objectForKey: @"x-kolab-type"]) != nil) {
@@ -1106,7 +1140,8 @@ static BOOL debugSoParts       = NO;
 
 /* debugging */
 
-- (BOOL)isDebuggingEnabled {
+- (BOOL) isDebuggingEnabled
+{
   return debugOn;
 }
 
index 5d4bd9ad33ce46a20f5079fbb32bd83e4c6fa4ed..335e371ec01cc42c016f2a4f5fed5a59abe6f7e0 100644 (file)
@@ -103,6 +103,7 @@ extern NSString *SOGoWeekStartFirstFullWeek;
 - (NSArray *) mailAccounts;
 - (NSArray *) allIdentities;
 - (NSDictionary *) primaryIdentity;
+- (NSString *) messageForwarding;
 
 /* folders */
 
index 3dc5273a521c290c6e923bf6ec3ace314310fe12..9dedfae46808e707f0e13b8471de759809625c40 100644 (file)
@@ -25,6 +25,8 @@
 #import <Foundation/NSUserDefaults.h>
 #import <Foundation/NSValue.h>
 #import <NGObjWeb/WOApplication.h>
+#import <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WORequest.h>
 #import <NGObjWeb/SoObject.h>
 #import <NGExtensions/NSNull+misc.h>
 
@@ -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
index bbf714638020017dea11bada93602ba5ce17fcfb..2e42755400b9137112c07fba96ed0395f22dce0b 100644 (file)
@@ -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 */
 "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:";
index f61bb331e04c0d7cb2772f2a6c0a0caa98247122..3cf0d7128399fae6d47c39b1530e9da27d1b13a3 100644 (file)
@@ -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 */
 "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 :";
index 4fb12e88d5e0c23e133dc31c996cbf10ead159b2..4131db0a575aed26d27c582930548d16f3bc1551 100644 (file)
@@ -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 <WOActionResults>) defaultAction
 {
   id <WOActionResults> results;
index 554741b55b6eed9173ccd8bad5aa631dd52160e6..034e2764c445e2ca9448233f589f690b8dee7896 100644 (file)
@@ -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
 
index 788a49a02ed254d19026bdfbdb0ddb9ac0b97912..c6ac9b664524ba1b91dc08f79e3e10cbeb33c035 100644 (file)
 
 @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 */
index 31b42ad6c997ceb0058b89e2e199cdb374719117..12c2be31b3514139237f688a72d2a591ceb95d50 100644 (file)
 }
 
 @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 (file)
index cfc2bc5..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SOGoACLEnglishAdditionAdvisory.h - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index 7590f10..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SOGoACLEnglishRemovalAdvisory.h - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index f5eacbc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* SOGoACLEnglishRemovalAdvisory.m - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index 2b482ac..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SOGoACLFrenchAdditionAdvisory.h - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index 229dcbc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* SOGoACLFrenchAdditionAdvisory.m - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index 9a6c963..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* SOGoACLFrenchRemovalAdvisory.h - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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 (file)
index 050d2cf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* SOGoACLFrenchRemovalAdvisory.m - this file is part of SOGo
- *
- * Copyright (C) 2007 Inverse groupe conseil
- *
- * Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
- *
- * 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
index e0b7f2cab0f838dde3a5ab98f9d58e0e5447cf52..0e8e45cdbd2ba47a7f33024f9784e77e873adea2 100644 (file)
@@ -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
index 2106c7ba9a6e9bd5f26abe1e850a9343e2bb4df1..10ef59a97759136d7ef8b0ff5e9afba3780d59c0 100644 (file)
@@ -21,7 +21,7 @@
     </ul>
   </div>
 
-  <form name="pageform" enctype="multipart/form-data" accept-charset="UTF-8">
+  <form const:href="send" name="pageform" enctype="multipart/form-data">
     <div id="headerArea">
       <div id="attachmentsArea">
        <var:string label:value="Attachments:" />
index 40d503e22d8c8a0b5f0266afa6ee6136c4b7b333..ebde46970387e979dd69c51fd13e66ec65cfd18e 100644 (file)
@@ -18,7 +18,7 @@
             <var:popup name="currentPopUpId"
               list="headers"
               item="item"
-              label:string="$item"
+              label:displayString="$item"
               selection="currentHeader"
               />
             </span>
@@ -41,7 +41,7 @@
               const:disabled="1"
               list="headers"
               item="item"
-              label:string="$item"
+              label:displayString="$item"
               />
         </span>
         <span class="headerInput">
index 6d97ce4a35a6bb83bf3878d3672cf470778b85e6..c941cf91fdee31f49551a676d41bede3e9eacdf1 100644 (file)
@@ -19,6 +19,8 @@
            label:value="Date and Time"/></li>
        <li target="calendarOptionsView"><var:string
            label:value="Calendar Options"/></li>
+       <li target="mailOptionsView"><var:string
+           label:value="Mail Options"/></li>
        <var:if condition="shouldDisplayPasswordChange">
          <li target="passwordView"><var:string label:value="Password"/></li>
        </var:if>
          <var:popup list="reminderTimesList" item="item"
            string="itemReminderTimeText" selection="userReminderTime"/></label>
       </div>
+      <div id="mailOptionsView" class="tab">
+       <label><var:string label:value="Forward messages:"/>
+         <var:popup list="messageForwardingList" item="item"
+           string="itemMessageForwardingText" selection="userMessageForwarding"/></label><br/>
+      </div>
       <var:if condition="shouldDisplayPasswordChange">
        <div id="passwordView" class="tab">
          <label><var:string label:value="New password:"
diff --git a/UI/Templates/SOGoACLGermanAdditionAdvisory.wox b/UI/Templates/SOGoACLGermanAdditionAdvisory.wox
new file mode 100644 (file)
index 0000000..313f9a4
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE container>
+<container 
+  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">
+    Zugangserlaubniss von <var:string value="currentUserName"/> erstellt
+</var:if>
+
+<var:if condition="isBody">
+<var:string value="currentUserName"/> hat Ihnen den Zugang zu seinem Ordner '<var:string value="resourceName"/>' erlaubt.
+Folgende URL erlaubt Ihnen, sich sofort an diesem Ordner zu abonnieren:
+    <var:string value="httpAdvisoryURL"/>unsubscribe?mail-invitation=YES
+
+Sie können sich auch später immer noch durch die SOGo Webseiten abonnieren.
+</var:if>
+
+</container>
diff --git a/UI/Templates/SOGoACLGermanRemovalAdvisory.wox b/UI/Templates/SOGoACLGermanRemovalAdvisory.wox
new file mode 100644 (file)
index 0000000..9638f65
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE container>
+<container 
+  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">
+    Zugangserlaubniss von <var:string value="currentUserName"/> gelöscht
+</var:if>
+
+<var:if condition="isBody">
+<var:string value="currentUserName"/> erlaubt Ihnen nicht mehr den Zugang zu seinem Order '<var:string value="resourceName"/>'.
+Sie können sich sofort an folgender URL von diesem Order des-abonnieren:
+    <var:string value="httpAdvisoryURL"/>unsubscribe?mail-invitation=YES
+
+Sich können sich auch später immer noch durch die SOGo Webseiten des-abonnieren.</var:if>
+
+</container>
index 1c2f2e72953e33ad390434572a611d2fed6c450a..5b0f932f4874ec37947b387fdf9f8d07a2321dc0 100644 (file)
@@ -366,7 +366,7 @@ img.mailer_imagecontent
 DIV.mailer_plaincontent
 { 
   font-family: monospace, fixed;
-  white-space: normal;
+  white-space: pre;
   font-size: inherit;
   margin: 0px;
   padding: 0px;