--- /dev/null
+2004-06-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * Scheduler/OGoCalWeekOverview.m: moved navigation URL generation to
+ superclass (now generic because we use the 'ownMethodName'). Could
+ even be moved to OGoCalView?
+
+ * Scheduler/OGoCalMonthView.m: added next/prev month URL generation
+ methods, calculate startdate from form value
+
+ * Scheduler/OGoCalView.m: added -ownMethodName method to return the
+ last path component of the request URL (the SOPE method), eg
+ 'weekoverview' for OGoCalWeekView, added
+ -dateNavigationURLWithNewStartDate: method to calculate 'startDate'
+ URLs (should be improved to include existing query parameters!)
+
+ * Scheduler/OGoCalWeekOverview.m: minor tweaks ;-)
+
+2004-06-03 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * Scheduler/OGoCalWeekView.m: construct startDate from formValue,
+ otherwise use current week's monday as startDate.
+
+ * Scheduler/OGoCalWeekOverview.wox: switch back/forth
+
+ * Scheduler/OGoCalWeekOverview.m: provide URLs for switching back/forth
+ weekoverview.
+
+ * Scheduler/OGoCalView.[hm]: methods for converting dates into strings
+ and vice versa.
+
+ * Scheduler/OGoAppointmentView.m, Scheduler/OGoCalView.m: fixed include
+
+ * ChangeLog: created
--- /dev/null
+# $Id: GNUmakefile,v 1.4 2004/06/04 16:15:23 znek Exp $
+
+include $(GNUSTEP_MAKEFILES)/common.make
+
+BUNDLE_NAME = SchedulerUI
+BUNDLE_EXTENSION = .zsp
+BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/ZideStore12
+
+SchedulerUI_PRINCIPAL_CLASS = SchedulerUIProduct
+
+SchedulerUI_OBJC_FILES = \
+ SchedulerUIProduct.m \
+ OGoCalView.m \
+ OGoCalWeekView.m \
+ OGoCalMonthView.m \
+ OGoAptTableView.m \
+ \
+ OGoCalWeekOverview.m \
+ OGoCalMonthOverview.m \
+ OGoAppointmentView.m \
+
+SchedulerUI_RESOURCE_FILES += \
+ Version \
+ product.plist \
+ \
+ OGoAptTableView.wox \
+ OGoCalWeekOverview.wox \
+ OGoCalMonthOverview.wox \
+ OGoAppointmentView.wox \
+ images/next_week.gif \
+ images/previous_week.gif \
+
+ZIDESTORE=../..
+
+ADDITIONAL_INCLUDE_DIRS += \
+ -I. \
+ -I$(ZIDESTORE)/Frontend -I$(ZIDESTORE)/Backend -I$(ZIDESTORE)
+
+# make
+
+-include GNUmakefile.preamble
+include $(GNUSTEP_MAKEFILES)/bundle.make
+-include GNUmakefile.postamble
+
+ifneq ($(GNUSTEP_BUILD_DIR),)
+after-all ::
+ @(cp bundle-info.plist \
+ $(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION))
+else
+after-all ::
+ @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
+ cp ../bundle-info.plist .)
+endif
--- /dev/null
+# $Id: GNUmakefile.postamble,v 1.1 2004/05/12 14:45:56 helge Exp $
+
+validate-wox:
+ xmllint --noout *.wox
+
+before-all :: validate-wox
+
+after-all ::
+ @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\
+ cp ../bundle-info.plist .)
--- /dev/null
+// $Id: NOTES,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+URLs
+====
+
+/zidestore/ControlPanel/ => SoControlPanel
+/zidestore/ControlPanel/Products => SoProductRegistry
+/zidestore/ControlPanel/Products/ZideStoreUI => SoProduct
+/zidestore/ControlPanel/Products/ZideStoreUI/Resources/
+=> SoProductResourceManager
+/zidestore/ControlPanel/Products/ZideStoreUI/Resources/calendar.css
+=> resource
--- /dev/null
+// $Id: OGoAppointmentView.h,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+#ifndef __ZideStoreUI_OGoAppointmentView_H__
+#define __ZideStoreUI_OGoAppointmentView_H__
+
+#include <NGObjWeb/SoComponent.h>
+
+@interface OGoAppointmentView : SoComponent
+{
+}
+
+@end
+
+#endif /* __ZideStoreUI_OGoAppointmentView_H__ */
--- /dev/null
+// $Id: OGoAppointmentView.m,v 1.2 2004/06/03 16:42:38 znek Exp $
+
+#include "OGoAppointmentView.h"
+#include "common.h"
+#include <Backend/SxAptManager.h>
+
+@interface NSObject(UsedPrivates)
+- (SxAptManager *)aptManagerInContext:(id)_ctx;
+@end
+
+@implementation OGoAppointmentView
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+/* backend */
+
+- (SxAptManager *)aptManager {
+ return [[self clientObject] aptManagerInContext:[self context]];
+}
+
+@end /* OGoAppointmentView */
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+<var:component className="OGoPageFrame" title="name"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+>
+ <a href="../weekoverview" >week</a>
+ <a href="../monthoverview">month</a>
+ <br />
+ <h4>Appointment Viewer</h4>
+ OGo ZideStore Server - <var:string value="name"/>
+ <br />
+ Client: <var:string value="clientObject"/>
+ <br />
+ Group: <var:string value="clientObject.group"/><br />
+ Deletable: <var:string value="clientObject.isDeletionAllowed"/><br />
+ Generation: <var:string value="clientObject.zlGenerationCount"/><br />
+ MsgClass: <var:string value="clientObject.outlookMessageClass"/><br />
+
+ <hr />
+
+ As iCal:<br />
+ <pre><var:string value="clientObject.iCalString"/></pre>
+
+ <hr />
+
+ As Mail:<br />
+ <pre><var:string value="clientObject.iCalMailString"/></pre>
+</var:component>
--- /dev/null
+/*
+ Copyright (C) 2000-2003 SKYRIX Software AG
+
+ This file is part of OGo
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo 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 Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+// $Id: OGoAptTableView.m,v 1.1 2003/11/24 01:37:06 helge Exp $
+
+#include <NGObjWeb/SoComponent.h>
+
+@class NSArray, NSCalendarDate;
+
+@interface OGoAptTableView : SoComponent
+{
+ NSArray *appointments;
+ id appointment;
+}
+
+/* accessors */
+
+- (NSArray *)appointments;
+- (id)appointment;
+
+@end
+
+#include "common.h"
+
+@implementation OGoAptTableView
+
+- (void)dealloc {
+ [self->appointment release];
+ [self->appointments release];
+ [super dealloc];
+}
+
+/* accessors */
+
+- (void)setAppointments:(NSArray *)_apts {
+ ASSIGN(self->appointments, _apts);
+}
+- (NSArray *)appointments {
+ return self->appointments;
+}
+
+- (void)setAppointment:(id)_apt {
+ ASSIGN(self->appointment, _apt);
+}
+- (id)appointment {
+ return self->appointment;
+}
+
+- (NSString *)appointmentViewURL {
+ id pkey;
+
+ if ((pkey = [[self appointment] valueForKey:@"dateId"]) == nil)
+ return nil;
+
+ return [NSString stringWithFormat:@"%@/view", pkey];
+}
+
+@end /* OGoAptTableView */
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+<table
+ style="font-size: 11px;"
+ border="0" cellspacing="0" cellpadding="2"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+>
+ <tr>
+ <th>ID</th>
+ <th>Title</th>
+ <th>Time</th>
+ <th>Version</th>
+ <th>Location</th>
+ </tr>
+ <var:foreach list="appointments" item="appointment">
+ <tr>
+ <td><var:string value="appointment.dateId"/></td>
+ <td>
+ <a var:href="appointmentViewURL"
+ ><var:string value="appointment.title"/></a>
+ </td>
+ <td>
+ <var:string value="appointment.startDate"
+ const:dateformat="%Y-%m-%d %H:%M" />
+ -
+ <var:string value="appointment.endDate"
+ const:dateformat="%Y-%m-%d %H:%M" />
+ </td>
+ <td><var:string value="appointment.objectVersion"/></td>
+ <td><var:string value="appointment.location"/></td>
+ </tr>
+ </var:foreach>
+</table>
--- /dev/null
+// $Id: OGoCalMonthOverview.m,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+#include "OGoCalMonthView.h"
+
+@interface OGoCalMonthOverview : OGoCalMonthView
+{
+}
+
+@end
+
+#include "common.h"
+
+@implementation OGoCalMonthOverview
+
+- (NSArray *)appointments {
+ return [self fetchCoreInfos];
+}
+
+@end /* OGoCalMonthOverview */
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+<var:component className="OGoPageFrame" title="name"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+>
+ <a href="weekoverview">week</a>
+ <br />
+ OGo ZideStore Server - <var:string value="name"/>
+ <br />
+ Client: <var:string value="clientObject"/>
+ <br />
+ Appointments: #<var:string value="appointments.count"/>
+ from <var:string value="startDate" />
+ to <var:string value="endDate" />
+ <br />
+
+ <hr />
+
+ <a var:href="prevMonthURL"><var:entity const:name="lt" /><var:entity const:name="lt" /></a>
+ <a var:href="thisMonthURL">*</a>
+ <a var:href="nextMonthURL"><var:entity const:name="gt" /><var:entity const:name="gt" /></a>
+ <br />
+ <var:month-overview
+ list="appointments"
+ item="appointment"
+ weekStart="weekStart"
+ const:startDateKey = "startDate"
+ const:endDateKey = "endDate"
+ const:titleColor = "#7799FF"
+ const:contentColor = "#5577FF"
+ >
+ <var:month>
+ <a var:href="appointmentViewURL"
+ ><var:string value="appointment.title" /></a>
+ </var:month>
+ </var:month-overview>
+
+ <hr />
+
+ Appointments:
+ <var:component className="OGoAptTableView" appointments="appointments"/>
+
+ <!-- pre><var:string value="appointments" const:insertBR="YES"/></pre -->
+</var:component>
--- /dev/null
+// $Id: OGoCalMonthView.h,v 1.2 2004/06/03 21:56:44 helge Exp $
+
+#ifndef __ZideStoreUI_OGoCalMonthView_H__
+#define __ZideStoreUI_OGoCalMonthView_H__
+
+#include "OGoCalView.h"
+
+/*
+ OGoCalMonthView
+
+ Abstract superclass for views which display months.
+*/
+
+@interface OGoCalMonthView : OGoCalView
+{
+}
+
+@end
+
+#endif /* __ZideStoreUI_OGoCalMonthView_H__ */
--- /dev/null
+// $Id: OGoCalMonthView.m,v 1.2 2004/06/03 21:56:44 helge Exp $
+
+#include "OGoCalMonthView.h"
+#include "common.h"
+
+@implementation OGoCalMonthView
+
+// TODO: look how to properly calculate month range!
+
+- (NSCalendarDate *)startDate {
+ // TODO: copy of the startdate method
+ NSCalendarDate *startDate;
+ NSString *dateString;
+
+ dateString = [[[self context] request] formValueForKey:@"startDate"];
+ startDate = dateString
+ ? [self dateForDateString:dateString]
+ : [[NSCalendarDate date] mondayOfWeek];
+
+ return startDate;
+}
+- (NSCalendarDate *)endDate {
+ return [[self startDate] dateByAddingYears:0 months:0 days:31
+ hours:0 minutes:0 seconds:0];
+}
+
+/* URLs (TODO: fix scroll ranges for months!) */
+
+- (NSString *)prevMonthURL {
+ NSCalendarDate *newMonthDate;
+
+ newMonthDate = [[self startDate] dateByAddingYears:0 months:0 days:-31
+ hours:0 minutes:0 seconds:0];
+ return [self dateNavigationURLWithNewStartDate:newMonthDate];
+}
+
+- (NSString *)nextMonthURL {
+ NSCalendarDate *newMonthDate;
+
+ newMonthDate = [[self startDate] dateByAddingYears:0 months:0 days:31
+ hours:0 minutes:0 seconds:0];
+ return [self dateNavigationURLWithNewStartDate:newMonthDate];
+}
+
+- (NSString *)thisMonthURL {
+ NSCalendarDate *newMonthDate;
+
+ newMonthDate = [[NSCalendarDate date] mondayOfWeek];
+ return [self dateNavigationURLWithNewStartDate:newMonthDate];
+}
+
+@end /* OGoCalMonthView */
--- /dev/null
+// $Id: OGoCalView.h,v 1.3 2004/06/03 21:56:44 helge Exp $
+
+#ifndef __ZideStoreUI_OGoCalView_H__
+#define __ZideStoreUI_OGoCalView_H__
+
+#include <NGObjWeb/SoComponent.h>
+
+@class NSArray, NSCalendarDate;
+@class SxAptManager, SxAptSetIdentifier;
+
+@interface OGoCalView : SoComponent
+{
+ NSArray *appointments;
+ id appointment;
+}
+
+/* accessors */
+
+- (NSArray *)appointments;
+- (id)appointment;
+
+/* URLs */
+
+- (NSString *)appointmentViewURL;
+- (NSString *)ownMethodName;
+- (NSString *)dateNavigationURLWithNewStartDate:(NSCalendarDate *)_newDate;
+
+/* backend */
+
+- (SxAptManager *)aptManager;
+- (SxAptSetIdentifier *)aptSetID;
+
+/* fetching */
+
+- (NSCalendarDate *)startDate;
+- (NSCalendarDate *)endDate;
+- (NSArray *)fetchGIDs;
+- (NSArray *)fetchCoreInfos;
+
+/* date selection */
+- (NSString *)dateStringForDate:(NSCalendarDate *)_date;
+- (NSCalendarDate *)dateForDateString:(NSString *)_dateString;
+
+@end
+
+#endif /* __ZideStoreUI_OGoCalView_H__ */
--- /dev/null
+// $Id: OGoCalView.m,v 1.3 2004/06/03 21:56:44 helge Exp $
+
+#include "OGoCalView.h"
+#include "common.h"
+#include <Backend/SxAptManager.h>
+
+@interface NSObject(UsedPrivates)
+- (SxAptManager *)aptManagerInContext:(id)_ctx;
+@end
+
+@implementation OGoCalView
+
+- (void)dealloc {
+ [self->appointment release];
+ [self->appointments release];
+ [super dealloc];
+}
+
+/* accessors */
+
+- (void)setAppointments:(NSArray *)_apts {
+ ASSIGN(self->appointments, _apts);
+}
+- (NSArray *)appointments {
+ return self->appointments;
+}
+
+- (void)setAppointment:(id)_apt {
+ ASSIGN(self->appointment, _apt);
+}
+- (id)appointment {
+ return self->appointment;
+}
+
+/* URLs */
+
+- (NSString *)appointmentViewURL {
+ id pkey;
+
+ if ((pkey = [[self appointment] valueForKey:@"dateId"]) == nil)
+ return nil;
+
+ return [NSString stringWithFormat:@"%@/view", pkey];
+}
+
+- (NSString *)ownMethodName {
+ NSString *uri;
+ NSRange r;
+
+ uri = [[[self context] request] uri];
+
+ /* first: cut off query parameters */
+
+ r = [uri rangeOfString:@"?" options:NSBackwardsSearch];
+ if (r.length > 0)
+ uri = [uri substringToIndex:r.location];
+
+ /* next: strip trailing slash */
+
+ if ([uri hasSuffix:@"/"]) uri = [uri substringToIndex:([uri length] - 1)];
+ r = [uri rangeOfString:@"/" options:NSBackwardsSearch];
+
+ /* then: cut of last path component */
+
+ if (r.length == 0) // no slash? are we at root?
+ return @"/";
+
+ return [uri substringFromIndex:(r.location + 1)];
+}
+
+- (NSString *)dateNavigationURLWithNewStartDate:(NSCalendarDate *)_newDate {
+ return [NSString stringWithFormat:@"%@?startDate=%@",
+ [self ownMethodName],
+ [self dateStringForDate:_newDate]];
+}
+
+/* backend */
+
+- (SxAptManager *)aptManager {
+ return [[self clientObject] aptManagerInContext:[self context]];
+}
+- (SxAptSetIdentifier *)aptSetID {
+ return [[self clientObject] aptSetID];
+}
+
+/* resource URLs (TODO?) */
+
+- (NSString *)resourcePath {
+ return @"/ZideStore.woa/WebServerResources/";
+}
+
+- (NSString *)favIconPath {
+ return [[self resourcePath] stringByAppendingPathComponent:@"favicon.ico"];
+}
+- (NSString *)cssPath {
+ NSString *path;
+
+ // TODO: there should be reusable functionality for that!
+ path = @"ControlPanel/Products/ZideStoreUI/Resources/zidestoreui.css";
+ return [[self context] urlWithRequestHandlerKey:@"so"
+ path:path
+ queryString:nil];
+}
+
+- (NSString *)calCSSPath {
+ NSString *path;
+
+ // TODO: there should be reusable functionality for that!
+ path = @"ControlPanel/Products/ZideStoreUI/Resources/calendar.css";
+ return [[self context] urlWithRequestHandlerKey:@"so"
+ path:path
+ queryString:nil];
+}
+
+/* fetching */
+
+- (NSCalendarDate *)startDate {
+ return [NSCalendarDate date];
+}
+- (NSCalendarDate *)endDate {
+ return [[NSCalendarDate date] tomorrow];
+}
+
+- (NSArray *)fetchGIDs {
+ return [[self aptManager] gidsOfAppointmentSet:[self aptSetID]
+ from:[self startDate] to:[self endDate]];
+}
+
+- (NSArray *)fetchCoreInfos {
+ NSArray *gids;
+
+ if (self->appointments)
+ return self->appointments;
+
+ [self logWithFormat:@"fetching (%@ => %@) ...",
+ [self startDate], [self endDate]];
+ gids = [self fetchGIDs];
+ [self logWithFormat:@" %i GIDs ...", [gids count]];
+
+ self->appointments =
+ [[[self aptManager] coreInfoOfAppointmentsWithGIDs:gids
+ inSet:[self aptSetID]] retain];
+
+ [self logWithFormat:@"fetched %i records.", [self->appointments count]];
+ return self->appointments;
+}
+
+- (NSString *)dateStringForDate:(NSCalendarDate *)_date {
+ return [_date descriptionWithCalendarFormat:@"%Y%m%d"];
+}
+
+- (NSCalendarDate *)dateForDateString:(NSString *)_dateString {
+ return [NSCalendarDate dateWithString:_dateString calendarFormat:@"%Y%m%d"];
+}
+
+@end /* OGoCalView */
--- /dev/null
+/*
+ Copyright (C) 2000-2004 SKYRIX Software AG
+
+ This file is part of OpenGroupware.org.
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo 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 Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+// $Id: OGoCalWeekOverview.m,v 1.3 2004/06/03 21:56:44 helge Exp $
+
+#include "OGoCalWeekView.h"
+
+@interface OGoCalWeekOverview : OGoCalWeekView
+{
+}
+
+@end
+
+#include "common.h"
+#include <Backend/SxAptManager.h>
+
+@implementation OGoCalWeekOverview
+
+- (NSArray *)appointments {
+ return [self fetchCoreInfos];
+}
+
+@end /* OGoCalWeekOverview */
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+<var:component className="OGoPageFrame" title="name"
+ 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"
+>
+ <a href="monthoverview">month</a>
+ <br />
+ OGo ZideStore Server - <var:string value="name"/>
+ <br />
+ Client: <var:string value="clientObject"/>
+ <br />
+ Appointments: #<var:string value="appointments.count"/>
+ <br />
+
+ <hr />
+
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr bgcolor="#E0E0E0">
+ <td align="left" valign="middle" width="80%">other stuff</td> <!-- 99% -->
+ <td align="right"><table border="0"><tr>
+ <td align="right" valign="middle"><a var:href="prevWeekURL"><img rsrc:src="previous_week.gif" alt="previous week" border="0" /></a></td>
+ <td align="right" valign="middle"><a var:href="thisWeekURL" class="button_auto">this<var:entity const:name="nbsp" />week</a></td>
+ <td align="right" valign="middle"><a var:href="nextWeekURL"><img rsrc:src="next_week.gif" alt="next week" border="0" /></a></td>
+ </tr></table></td>
+ </tr>
+ </table>
+ <br />
+ <var:week-overview
+ list="appointments"
+ item="appointment"
+ weekStart="startDate"
+ const:startDateKey = "startDate"
+ const:endDateKey = "endDate"
+ const:titleStyle = "weekoverview_title"
+ const:contentStyle = "weekoverview_content"
+ >
+ <var:week>
+ <a var:href="appointmentViewURL"
+ ><var:string value="appointment.title" /></a>
+ </var:week>
+ </var:week-overview>
+
+ <hr />
+
+ Appointments:
+ <var:component className="OGoAptTableView" appointments="appointments"/>
+
+ <!-- pre><var:string value="appointments" const:insertBR="YES"/></pre -->
+</var:component>
--- /dev/null
+// $Id: OGoCalWeekView.h,v 1.2 2004/06/03 21:56:44 helge Exp $
+
+#ifndef __ZideStoreUI_OGoCalWeekView_H__
+#define __ZideStoreUI_OGoCalWeekView_H__
+
+#include "OGoCalView.h"
+
+@interface OGoCalWeekView : OGoCalView
+{
+}
+
+/* URLs */
+
+- (NSString *)prevWeekURL;
+- (NSString *)nextWeekURL;
+
+@end
+
+#endif /* __ZideStoreUI_OGoCalWeekView_H__ */
--- /dev/null
+// $Id: OGoCalWeekView.m,v 1.3 2004/06/03 21:56:44 helge Exp $
+
+#include "OGoCalWeekView.h"
+#include "common.h"
+
+@implementation OGoCalWeekView
+
+- (NSCalendarDate *)startDate {
+ NSCalendarDate *startDate;
+ NSString *dateString;
+
+ dateString = [[[self context] request] formValueForKey:@"startDate"];
+ startDate = dateString
+ ? [self dateForDateString:dateString]
+ : [[NSCalendarDate date] mondayOfWeek];
+
+ return startDate;
+}
+
+- (NSCalendarDate *)endDate {
+ return [[self startDate] dateByAddingYears:0 months:0 days:7
+ hours:0 minutes:0 seconds:0];
+}
+
+/* URLs */
+
+- (NSString *)prevWeekURL {
+ NSCalendarDate *newWeekDate;
+
+ newWeekDate = [[self startDate] dateByAddingYears:0 months:0 days:-7
+ hours:0 minutes:0 seconds:0];
+ return [self dateNavigationURLWithNewStartDate:newWeekDate];
+}
+
+- (NSString *)nextWeekURL {
+ NSCalendarDate *newWeekDate;
+
+ newWeekDate = [[self startDate] dateByAddingYears:0 months:0 days:7
+ hours:0 minutes:0 seconds:0];
+ return [self dateNavigationURLWithNewStartDate:newWeekDate];
+}
+
+- (NSString *)thisWeekURL {
+ NSCalendarDate *newWeekDate;
+
+ newWeekDate = [[NSCalendarDate date] mondayOfWeek];
+ return [self dateNavigationURLWithNewStartDate:newWeekDate];
+}
+
+@end /* OGoCalWeekView */
--- /dev/null
+/*
+ Copyright (C) 2000-2003 SKYRIX Software AG
+
+ This file is part of OGo
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo 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 Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+// $Id: SchedulerUIProduct.m,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+#import <Foundation/NSObject.h>
+
+@interface SchedulerUIProduct : NSObject
+{
+}
+
+@end
+
+#include "common.h"
+
+@implementation SchedulerUIProduct
+@end /* SchedulerUIProduct */
--- /dev/null
+# $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+SUBMINOR_VERSION:=1
+
+# 1.1.0 requires NGObjWeb 4.2.202
--- /dev/null
+{
+ "__cvs__" = "$Id: bundle-info.plist,v 1.1 2003/11/24 01:24:40 helge Exp $";
+
+ requires = {
+ bundleManagerVersion = 1;
+ classes = (
+ { name = NSObject; }
+ );
+ };
+
+ provides = {
+ ZideStoreProducts = ( { name = SchedulerUIProduct; } );
+
+ classes = (
+ );
+
+ WOComponents = (
+ );
+ };
+}
--- /dev/null
+/*
+ Copyright (C) 2000-2003 SKYRIX Software AG
+
+ This file is part of OGo
+
+ OGo is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ OGo 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 Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with OGo; see the file COPYING. If not, write to the
+ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+*/
+// $Id: common.h,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+#import <Foundation/Foundation.h>
+
+#if LIB_FOUNDATION_LIBRARY
+# import <Foundation/exceptions/GeneralExceptions.h>
+#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
+# import <FoundationExt/NSObjectMacros.h>
+# import <FoundationExt/NSString+Ext.h>
+# import <FoundationExt/GeneralExceptions.h>
+#endif
+
+#include <NGExtensions/NGExtensions.h>
+#include <NGObjWeb/NGObjWeb.h>
+#include <NGObjWeb/SoObjects.h>
--- /dev/null
+{
+ requires = ( MAIN, CommonUI );
+
+ publicResources = (
+ previous_week.gif,
+ next_week.gif
+ );
+
+ factories = {
+ };
+
+ categories = {
+ SxAppointmentFolder = {
+ methods = {
+ "weekoverview" = {
+ protectedBy = "View";
+ pageName = "OGoCalWeekOverview";
+ };
+ "monthoverview" = {
+ protectedBy = "View";
+ pageName = "OGoCalMonthOverview";
+ };
+ };
+ };
+
+ SxAppointment = {
+ methods = {
+ "view" = {
+ protectedBy = "View";
+ pageName = "OGoAppointmentView";
+ };
+ };
+ };
+ };
+}