From: znek Date: Wed, 30 Jun 2004 15:35:54 +0000 (+0000) Subject: newAction for SOGo X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c70b50bf73da39fdfd575aca71f096a74c2286e;p=scalable-opengroupware.org newAction for SOGo git-svn-id: http://svn.opengroupware.org/SOGo/trunk@128 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index 43eabf86..2870cd2a 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -199,6 +199,30 @@ } +/* 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 */ diff --git a/SOGo/UI/Scheduler/product.plist b/SOGo/UI/Scheduler/product.plist index a04edd38..d1839ec5 100644 --- a/SOGo/UI/Scheduler/product.plist +++ b/SOGo/UI/Scheduler/product.plist @@ -46,6 +46,7 @@ "new" = { protectedBy = "View"; pageName = "UIxAppointmentEditor"; + actionName = "new"; }; }; };