]> err.no Git - scalable-opengroupware.org/blobdiff - SOGo/UI/Scheduler/UIxAppointmentPrintview.m
fixes for SOGo bug #1070
[scalable-opengroupware.org] / SOGo / UI / Scheduler / UIxAppointmentPrintview.m
index 67c357f64c8c4112f0c31e92aebc38e7ba98e2f2..9d4862f130f4325dc3c97a11885f89520ae1274d 100644 (file)
 {
 }
 
+- (BOOL)isMyApt;
+
 @end
 
 #include "common.h"
 #include <SOGo/UI/SOGoUI/SOGoDateFormatter.h>
+#include <SOGoLogic/SOGoAppointment.h>
+#include "UIxComponent+Agenor.h"
 
 @implementation UIxAppointmentPrintview
 
   return [[self dateFormatter] stringForObjectValue:[self startTime]];
 }
 
+- (BOOL)isMyApt {
+  id       apt;
+  NSString *myEmail;
+
+  apt     = [self appointment];
+  myEmail = [self emailForUser];
+#if 0 /* ZNeK 20041208 - Maxime says this isn't relevant to agenor */
+  if ([apt isOrganizer:myEmail])
+    return YES;
+#endif
+  return [apt isParticipant:myEmail];
+}
+
+- (NSString *)aptStyle {
+  if (![self isMyApt])
+    return @"aptprintview_apt_other";
+  return nil;
+}
+
 @end /* UIxAppointmentPrintview */