]> err.no Git - scalable-opengroupware.org/commitdiff
newAction for SOGo
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 30 Jun 2004 15:35:54 +0000 (15:35 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 30 Jun 2004 15:35:54 +0000 (15:35 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@128 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Scheduler/UIxAppointmentEditor.m
SOGo/UI/Scheduler/product.plist

index 43eabf86688d4ddbf2301ebe31edef83dfee3fd5..2870cd2a2cd4aa766f320bc3feffb4d2bc39f349 100644 (file)
 }
 
 
+/* new */
+
+
+- (id)newAction {
+  WORequest *req;
+  WOResponse *r;
+  NSString *uri, *uriFormat, *objectId, *nextMethod;
+  
+  /* clientObject *is* SOGoAppointmentFolder, so this should be an instance method? */
+  objectId = [NSClassFromString(@"SOGoAppointmentFolder")
+    globallyUniqueObjectId];
+  
+  nextMethod = [NSString stringWithFormat:@"%@/edit", objectId];
+  uriFormat = [self uriAsFormat];
+  uri = [NSString stringWithFormat:uriFormat, nextMethod];
+
+  req = [[self context] request];
+  r = [WOResponse responseWithRequest:req];
+  [r setStatus:302 /* moved */];
+  [r setHeader:uri forKey:@"location"];
+  return r;
+}
+
+
 /* save */
 
 
index a04edd38190e689d40c722273be264722e621e98..d1839ec53cafa8519d80c191d54bccc81e1fdccb 100644 (file)
@@ -46,6 +46,7 @@
         "new" = { 
           protectedBy = "View";
           pageName    = "UIxAppointmentEditor"; 
+          actionName  = "new";
         };
       };
     };