Monotone-Parent: c33c456b52c6e6d4ee1f29bfd9ca57096b8d13be
Monotone-Revision: 5539e3c473023281dd04f7cb8a8fee051ac0735d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-11T19:08:58 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
828d3b2818
commit
e09ac2e383
|
@ -38,11 +38,17 @@
|
|||
|
||||
#import "SOGo/SOGoFolder.h"
|
||||
|
||||
@class NSString, NSArray, NSCalendarDate, NSException, NSMutableDictionary;
|
||||
@class NSArray;
|
||||
@class NSCalendarDate;
|
||||
@class NSException;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class NSTimeZone;
|
||||
@class GCSFolder;
|
||||
|
||||
@interface SOGoAppointmentFolder : SOGoFolder
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
NSMutableDictionary *uidToFilename;
|
||||
}
|
||||
|
||||
|
@ -106,7 +112,7 @@
|
|||
|
||||
- (NSArray *) fetchAllSOGoAppointments;
|
||||
|
||||
- (NSArray *) calendarFoldersInContext: (WOContext *) context;
|
||||
- (NSArray *) calendarFolders;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -84,12 +84,23 @@ static NSNumber *sharedYes = nil;
|
|||
// SOGoRole_Assistant, nil]
|
||||
// asDefaultForPermission: SoPerm_View];
|
||||
|
||||
sharedYes = [[NSNumber numberWithBool:YES] retain];
|
||||
sharedYes = [[NSNumber numberWithBool: YES] retain];
|
||||
}
|
||||
|
||||
- (id) initWithName: (NSString *) name
|
||||
inContainer: (id) newContainer
|
||||
{
|
||||
if ((self = [super initWithName: name inContainer: newContainer]))
|
||||
{
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[self->uidToFilename release];
|
||||
[uidToFilename release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -108,8 +119,7 @@ static NSNumber *sharedYes = nil;
|
|||
NSString *s;
|
||||
|
||||
s = [[self container] nameInContainer];
|
||||
#warning HH DEBUG
|
||||
[self logWithFormat:@"CAL UID: %@", s];
|
||||
// [self logWithFormat:@"CAL UID: %@", s];
|
||||
return [s isNotNull] ? [NSArray arrayWithObjects:&s count:1] : nil;
|
||||
}
|
||||
|
||||
|
@ -237,7 +247,6 @@ static NSNumber *sharedYes = nil;
|
|||
|
||||
- (void) _appendComponentsMatchingFilters: (NSArray *) filters
|
||||
toResponse: (WOResponse *) response
|
||||
inContext: (WOContext *) context
|
||||
{
|
||||
NSArray *apts;
|
||||
unsigned int count, max;
|
||||
|
@ -266,7 +275,7 @@ static NSNumber *sharedYes = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (id) davCalendarQuery: (id) context
|
||||
- (id) davCalendarQuery: (id) queryContext
|
||||
{
|
||||
WOResponse *r;
|
||||
NSArray *filters;
|
||||
|
@ -285,8 +294,7 @@ static NSNumber *sharedYes = nil;
|
|||
document = [[context request] contentAsDOMDocument];
|
||||
filters = [self _parseCalendarFilters: [document documentElement]];
|
||||
[self _appendComponentsMatchingFilters: filters
|
||||
toResponse: r
|
||||
inContext: context];
|
||||
toResponse: r];
|
||||
[r appendContentString:@"</D:multistatus>\r\n"];
|
||||
|
||||
return r;
|
||||
|
@ -342,7 +350,6 @@ static NSNumber *sharedYes = nil;
|
|||
}
|
||||
|
||||
- (BOOL) requestNamedIsHandledLater: (NSString *) name
|
||||
inContext: (WOContext *) context
|
||||
{
|
||||
return [name isEqualToString: @"OPTIONS"];
|
||||
}
|
||||
|
@ -356,7 +363,7 @@ static NSNumber *sharedYes = nil;
|
|||
BOOL handledLater;
|
||||
|
||||
/* first check attributes directly bound to the application */
|
||||
handledLater = [self requestNamedIsHandledLater: _key inContext: _ctx];
|
||||
handledLater = [self requestNamedIsHandledLater: _key];
|
||||
if (handledLater)
|
||||
obj = nil;
|
||||
else
|
||||
|
@ -467,7 +474,7 @@ static NSNumber *sharedYes = nil;
|
|||
|
||||
if (![_uid isNotNull])
|
||||
return nil;
|
||||
if ((rname = [self->uidToFilename objectForKey:_uid]) != nil)
|
||||
if ((rname = [uidToFilename objectForKey:_uid]) != nil)
|
||||
return [rname isNotNull] ? rname : nil;
|
||||
|
||||
if ((folder = [self ocsFolder]) == nil) {
|
||||
|
@ -476,13 +483,13 @@ static NSNumber *sharedYes = nil;
|
|||
return nil;
|
||||
}
|
||||
|
||||
if (self->uidToFilename == nil)
|
||||
self->uidToFilename = [[NSMutableDictionary alloc] initWithCapacity:16];
|
||||
if (uidToFilename == nil)
|
||||
uidToFilename = [[NSMutableDictionary alloc] initWithCapacity:16];
|
||||
|
||||
if ((rname = [self resourceNameForEventUID:_uid inFolder:folder]) == nil)
|
||||
[self->uidToFilename setObject:[NSNull null] forKey:_uid];
|
||||
[uidToFilename setObject:[NSNull null] forKey:_uid];
|
||||
else
|
||||
[self->uidToFilename setObject:rname forKey:_uid];
|
||||
[uidToFilename setObject:rname forKey:_uid];
|
||||
|
||||
return rname;
|
||||
}
|
||||
|
@ -527,7 +534,7 @@ static NSNumber *sharedYes = nil;
|
|||
if ((tmp = [_record objectForKey:@"startdate"])) {
|
||||
tmp = [[NSCalendarDate alloc] initWithTimeIntervalSince1970:
|
||||
(NSTimeInterval)[tmp unsignedIntValue]];
|
||||
[tmp setTimeZone: [self userTimeZone]];
|
||||
[tmp setTimeZone: timeZone];
|
||||
if (tmp) [md setObject:tmp forKey:@"startDate"];
|
||||
[tmp release];
|
||||
}
|
||||
|
@ -537,7 +544,7 @@ static NSNumber *sharedYes = nil;
|
|||
if ((tmp = [_record objectForKey:@"enddate"])) {
|
||||
tmp = [[NSCalendarDate alloc] initWithTimeIntervalSince1970:
|
||||
(NSTimeInterval)[tmp unsignedIntValue]];
|
||||
[tmp setTimeZone: [self userTimeZone]];
|
||||
[tmp setTimeZone: timeZone];
|
||||
if (tmp) [md setObject:tmp forKey:@"endDate"];
|
||||
[tmp release];
|
||||
}
|
||||
|
@ -557,15 +564,41 @@ static NSNumber *sharedYes = nil;
|
|||
|
||||
/* cycle is in _r */
|
||||
tmp = [_r startDate];
|
||||
[tmp setTimeZone:[self userTimeZone]];
|
||||
[tmp setTimeZone: timeZone];
|
||||
[md setObject:tmp forKey:@"startDate"];
|
||||
tmp = [_r endDate];
|
||||
[tmp setTimeZone:[self userTimeZone]];
|
||||
[tmp setTimeZone: timeZone];
|
||||
[md setObject:tmp forKey:@"endDate"];
|
||||
|
||||
return md;
|
||||
}
|
||||
|
||||
- (NSArray *) fixupRecords: (NSArray *) records
|
||||
fetchRange: (NGCalendarDateRange *) r
|
||||
{
|
||||
// TODO: is the result supposed to be sorted by date?
|
||||
NSMutableArray *ma;
|
||||
unsigned count, max;
|
||||
id row; // TODO: what is the type of the record?
|
||||
|
||||
if (records)
|
||||
{
|
||||
max = [records count];
|
||||
ma = [NSMutableArray arrayWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
row = [self fixupRecord: [records objectAtIndex: count]
|
||||
fetchRange: r];
|
||||
if (row)
|
||||
[ma addObject: row];
|
||||
}
|
||||
}
|
||||
else
|
||||
ma = nil;
|
||||
|
||||
return ma;
|
||||
}
|
||||
|
||||
- (void) _flattenCycleRecord: (NSDictionary *) _row
|
||||
forRange: (NGCalendarDateRange *) _r
|
||||
intoArray: (NSMutableArray *) _ma
|
||||
|
@ -611,28 +644,6 @@ static NSNumber *sharedYes = nil;
|
|||
}
|
||||
}
|
||||
|
||||
- (NSArray *) fixupRecords: (NSArray *) _records
|
||||
fetchRange: (NGCalendarDateRange *) _r
|
||||
{
|
||||
// TODO: is the result supposed to be sorted by date?
|
||||
NSMutableArray *ma;
|
||||
unsigned i, count;
|
||||
|
||||
if (_records == nil) return nil;
|
||||
if ((count = [_records count]) == 0)
|
||||
return _records;
|
||||
|
||||
ma = [NSMutableArray arrayWithCapacity:count];
|
||||
for (i = 0; i < count; i++) {
|
||||
id row; // TODO: what is the type of the record?
|
||||
|
||||
row = [_records objectAtIndex:i];
|
||||
row = [self fixupRecord:row fetchRange:_r];
|
||||
if (row != nil) [ma addObject:row];
|
||||
}
|
||||
return ma;
|
||||
}
|
||||
|
||||
- (NSArray *) fixupCyclicRecords: (NSArray *) _records
|
||||
fetchRange: (NGCalendarDateRange *) _r
|
||||
{
|
||||
|
@ -692,10 +703,8 @@ static NSNumber *sharedYes = nil;
|
|||
- (NSString *) _privacySqlString
|
||||
{
|
||||
NSString *privacySqlString, *owner, *currentUser, *email;
|
||||
WOContext *context;
|
||||
SOGoUser *activeUser;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
activeUser = [context activeUser];
|
||||
currentUser = [activeUser login];
|
||||
owner = [self ownerInContext: context];
|
||||
|
@ -876,10 +885,8 @@ static NSNumber *sharedYes = nil;
|
|||
Class objectClass;
|
||||
unsigned int count, max;
|
||||
NSString *currentId, *currentUser;
|
||||
WOContext *context;
|
||||
id deleteObject;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
currentUser = [[context activeUser] login];
|
||||
|
||||
max = [ids count];
|
||||
|
@ -927,11 +934,9 @@ static NSNumber *sharedYes = nil;
|
|||
if (![_uid isNotNull])
|
||||
return nil;
|
||||
|
||||
if (_ctx == nil) _ctx = [[WOApplication application] context];
|
||||
|
||||
/* create subcontext, so that we don't destroy our environment */
|
||||
|
||||
if ((ctx = [_ctx createSubContext]) == nil) {
|
||||
if ((ctx = [context createSubContext]) == nil) {
|
||||
[self errorWithFormat:@"could not create SOPE subcontext!"];
|
||||
return nil;
|
||||
}
|
||||
|
@ -1166,7 +1171,7 @@ static NSNumber *sharedYes = nil;
|
|||
return firstShouldBeActive;
|
||||
}
|
||||
|
||||
- (NSArray *) calendarFoldersInContext: (WOContext *) context
|
||||
- (NSArray *) calendarFolders
|
||||
{
|
||||
NSMutableDictionary *userCalendar, *calendarDict;
|
||||
NSMutableArray *calendarFolders;
|
||||
|
@ -1177,7 +1182,6 @@ static NSNumber *sharedYes = nil;
|
|||
[calendarFolders autorelease];
|
||||
|
||||
activeUser = [context activeUser];
|
||||
|
||||
userCalendar = [NSMutableDictionary new];
|
||||
[userCalendar autorelease];
|
||||
[userCalendar setObject: @"/" forKey: @"folder"];
|
||||
|
|
|
@ -48,22 +48,18 @@
|
|||
|
||||
/* folder management */
|
||||
|
||||
- (id) lookupHomeFolderForUID: (NSString *) _uid inContext: (id)_ctx;
|
||||
- (id) lookupHomeFolderForUID: (NSString *) _uid
|
||||
inContext: (id) _ctx;
|
||||
- (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
|
||||
inContext: (id) _ctx;
|
||||
|
||||
/* "iCal multifolder saves" */
|
||||
|
||||
- (NSException *) saveContentString: (NSString *)_iCal
|
||||
- (NSException *) saveContentString: (NSString *) _iCal
|
||||
baseSequence: (int) _v;
|
||||
- (NSException *) deleteWithBaseSequence: (int) _v;
|
||||
|
||||
- (NSException *) saveContentString: (NSString *) _iCalString;
|
||||
|
||||
- (NSException *) changeParticipationStatus: (NSString *) _status
|
||||
inContext: (id) _ctx;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Appointments_SOGoAppointmentObject_H__ */
|
||||
|
|
|
@ -112,11 +112,8 @@
|
|||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject]) != nil) {
|
||||
NSException *error;
|
||||
|
@ -125,7 +122,7 @@
|
|||
if (![folder isNotNull]) /* no folder was found for given UID */
|
||||
continue;
|
||||
|
||||
apt = [folder lookupName: [self nameInContainer] inContext:ctx
|
||||
apt = [folder lookupName: [self nameInContainer] inContext: context
|
||||
acquire: NO];
|
||||
if ([apt isKindOfClass: [NSException class]])
|
||||
{
|
||||
|
@ -160,17 +157,14 @@
|
|||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject])) {
|
||||
NSException *error;
|
||||
SOGoAppointmentObject *apt;
|
||||
|
||||
apt = [folder lookupName:[self nameInContainer] inContext:ctx
|
||||
apt = [folder lookupName:[self nameInContainer] inContext: context
|
||||
acquire:NO];
|
||||
if ([apt isKindOfClass: [NSException class]]) {
|
||||
[self logWithFormat: @"%@", [(NSException *) apt reason]];
|
||||
|
@ -428,57 +422,6 @@
|
|||
return [self saveContentString: _iCalString baseSequence: 0];
|
||||
}
|
||||
|
||||
- (NSException *) changeParticipationStatus: (NSString *) _status
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
iCalEvent *apt;
|
||||
iCalPerson *p;
|
||||
NSString *newContent;
|
||||
NSException *ex;
|
||||
NSString *myEMail;
|
||||
|
||||
ex = nil;
|
||||
|
||||
// TODO: do we need to use SOGoAppointment? (prefer iCalEvent?)
|
||||
apt = (iCalEvent *) [self component: NO];
|
||||
|
||||
if (apt)
|
||||
{
|
||||
myEMail = [[_ctx activeUser] email];
|
||||
p = [apt findParticipantWithEmail: myEMail];
|
||||
if (p)
|
||||
{
|
||||
// TODO: send iMIP reply mails?
|
||||
|
||||
[p setPartStat:_status];
|
||||
newContent = [[apt parent] versitString];
|
||||
if (newContent)
|
||||
{
|
||||
ex = [self saveContentString:newContent];
|
||||
if (ex)
|
||||
// TODO: why is the exception wrapped?
|
||||
/* Server Error */
|
||||
ex = [NSException exceptionWithHTTPStatus: 500
|
||||
reason: [ex reason]];
|
||||
}
|
||||
else
|
||||
ex
|
||||
= [NSException exceptionWithHTTPStatus: 500 /* Server Error */
|
||||
reason: @"Could not generate iCalendar data ..."];
|
||||
}
|
||||
else
|
||||
ex = [NSException exceptionWithHTTPStatus: 404 /* Not Found */
|
||||
reason: @"user does not participate in this "
|
||||
@"appointment"];
|
||||
}
|
||||
else
|
||||
ex = [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"unable to parse appointment record"];
|
||||
|
||||
return ex;
|
||||
}
|
||||
|
||||
|
||||
/* message type */
|
||||
|
||||
- (NSString *) outlookMessageClass
|
||||
|
|
|
@ -47,14 +47,17 @@
|
|||
- (NSString *) contentAsString
|
||||
{
|
||||
NSCalendarDate *today, *startDate, *endDate;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
today = [[NSCalendarDate calendarDate] beginOfDay];
|
||||
[today setTimeZone: [self userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[today setTimeZone: timeZone];
|
||||
|
||||
startDate = [today dateByAddingYears: 0 months: 0 days: -14
|
||||
hours: 0 minutes: 0 seconds: 0];
|
||||
endDate = [startDate dateByAddingYears: 0 months: 1 days: 0
|
||||
hours: 0 minutes: 0 seconds: 0];
|
||||
|
||||
return [self contentAsStringFrom: startDate to: endDate];
|
||||
}
|
||||
|
||||
|
@ -72,16 +75,13 @@
|
|||
{
|
||||
id calFolder;
|
||||
SoSecurityManager *sm;
|
||||
WOApplication *woApp;
|
||||
NSArray *infos;
|
||||
|
||||
woApp = [WOApplication application];
|
||||
|
||||
calFolder = [container lookupName: @"Calendar" inContext: nil acquire: NO];
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if (![sm validatePermission: SOGoPerm_FreeBusyLookup
|
||||
onObject: calFolder
|
||||
inContext: [woApp context]])
|
||||
inContext: context]])
|
||||
infos = [calFolder fetchFreeBusyInfosFrom: _startDate
|
||||
to: _endDate];
|
||||
else
|
||||
|
|
|
@ -130,10 +130,8 @@
|
|||
NSMutableArray *result;
|
||||
NSMutableDictionary *uidToRecord;
|
||||
unsigned i, count;
|
||||
WOContext *context;
|
||||
SoSecurityManager *securityManager;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
securityManager = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
folders = [[self container] memberFolders];
|
||||
|
@ -166,7 +164,7 @@
|
|||
onObject: aptFolder
|
||||
inContext: context]) {
|
||||
[self debugWithFormat:@"no permission to read the content of calendar: %@",
|
||||
[folders objectAtIndex:i]];
|
||||
[folders objectAtIndex:i]];
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,19 +46,17 @@
|
|||
|
||||
/* folder management */
|
||||
|
||||
- (id)lookupHomeFolderForUID:(NSString *)_uid inContext:(id)_ctx;
|
||||
- (NSArray *)lookupCalendarFoldersForUIDs:(NSArray *)_uids inContext:(id)_ctx;
|
||||
- (id) lookupHomeFolderForUID: (NSString *) _uid
|
||||
inContext: (id) _ctx;
|
||||
- (NSArray *) lookupCalendarFoldersForUIDs: (NSArray *) _uids
|
||||
inContext: (id) _ctx;
|
||||
|
||||
/* "iCal multifolder saves" */
|
||||
|
||||
- (NSException *)saveContentString:(NSString *)_iCal baseSequence:(int)_v;
|
||||
- (NSException *)deleteWithBaseSequence:(int)_v;
|
||||
|
||||
- (NSException *)saveContentString:(NSString *)_iCalString;
|
||||
|
||||
- (NSException *)changeParticipationStatus:(NSString *)_status
|
||||
inContext:(id)_ctx;
|
||||
|
||||
- (NSException *) saveContentString: (NSString *) _iCal
|
||||
baseSequence: (int) _v;
|
||||
- (NSException *) deleteWithBaseSequence: (int) _v;
|
||||
- (NSException *) saveContentString: (NSString *) _iCalString;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
|||
// TODO: what does this do? lookup the home of the organizer?
|
||||
return [[self container] lookupHomeFolderForUID:_uid inContext:_ctx];
|
||||
}
|
||||
|
||||
- (NSArray *)lookupCalendarFoldersForUIDs:(NSArray *)_uids inContext:(id)_ctx {
|
||||
return [[self container] lookupCalendarFoldersForUIDs:_uids inContext:_ctx];
|
||||
}
|
||||
|
@ -131,11 +132,8 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
|||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs: _uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject]) != nil) {
|
||||
NSException *error;
|
||||
|
@ -173,18 +171,16 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
|||
NSEnumerator *e;
|
||||
id folder;
|
||||
NSException *allErrors = nil;
|
||||
id ctx;
|
||||
|
||||
ctx = [[WOApplication application] context];
|
||||
|
||||
e = [[self lookupCalendarFoldersForUIDs:_uids inContext:ctx]
|
||||
e = [[self lookupCalendarFoldersForUIDs: _uids inContext: context]
|
||||
objectEnumerator];
|
||||
while ((folder = [e nextObject])) {
|
||||
NSException *error;
|
||||
SOGoTaskObject *task;
|
||||
|
||||
task = [folder lookupName:[self nameInContainer] inContext:ctx
|
||||
acquire:NO];
|
||||
task = [folder lookupName: [self nameInContainer]
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
if (![task isNotNull]) {
|
||||
[self logWithFormat:@"Note: did not find '%@' in folder: %@",
|
||||
[self nameInContainer], folder];
|
||||
|
@ -452,52 +448,6 @@ static NSString *mailTemplateDefaultLanguage = nil;
|
|||
return [self saveContentString:_iCalString baseSequence:0];
|
||||
}
|
||||
|
||||
- (NSException *)changeParticipationStatus:(NSString *)_status
|
||||
inContext:(id)_ctx
|
||||
{
|
||||
iCalToDo *task;
|
||||
iCalPerson *p;
|
||||
NSString *newContent;
|
||||
NSException *ex;
|
||||
NSString *myEMail;
|
||||
|
||||
// TODO: do we need to use SOGoTask? (prefer iCalToDo?)
|
||||
task = (iCalToDo *) [self component: NO];
|
||||
|
||||
if (task == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"unable to parse task record"];
|
||||
}
|
||||
|
||||
myEMail = [[_ctx activeUser] email];
|
||||
if ((p = [task findParticipantWithEmail:myEMail]) == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"user does not participate in this "
|
||||
@"task"];
|
||||
}
|
||||
|
||||
[p setPartStat:_status];
|
||||
newContent = [[task parent] versitString];
|
||||
|
||||
// TODO: send iMIP reply mails?
|
||||
|
||||
// [task release]; task = nil;
|
||||
|
||||
if (newContent == nil) {
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:@"Could not generate iCalendar data ..."];
|
||||
}
|
||||
|
||||
if ((ex = [self saveContentString:newContent]) != nil) {
|
||||
// TODO: why is the exception wrapped?
|
||||
return [NSException exceptionWithHTTPStatus:500 /* Server Error */
|
||||
reason:[ex reason]];
|
||||
}
|
||||
|
||||
return nil /* means: no error */;
|
||||
}
|
||||
|
||||
|
||||
/* message type */
|
||||
|
||||
- (NSString *)outlookMessageClass {
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) initContactSourcesInContext: (WOContext *) context;
|
||||
- (void) initContactSources
|
||||
{
|
||||
if (!contactFolders)
|
||||
{
|
||||
|
@ -180,18 +180,18 @@
|
|||
}
|
||||
|
||||
- (id) lookupName: (NSString *) name
|
||||
inContext: (WOContext *) context
|
||||
inContext: (WOContext *) lookupContext
|
||||
acquire: (BOOL) acquire
|
||||
{
|
||||
id obj;
|
||||
id folder;
|
||||
|
||||
/* first check attributes directly bound to the application */
|
||||
obj = [super lookupName: name inContext: context acquire: NO];
|
||||
obj = [super lookupName: name inContext: lookupContext acquire: NO];
|
||||
if (!obj)
|
||||
{
|
||||
if (!contactFolders)
|
||||
[self initContactSourcesInContext: context];
|
||||
[self initContactSources];
|
||||
|
||||
folder = [contactFolders objectForKey: name];
|
||||
obj = ((folder)
|
||||
|
@ -204,32 +204,21 @@
|
|||
|
||||
- (NSArray *) toManyRelationshipKeys
|
||||
{
|
||||
WOContext *context;
|
||||
|
||||
if (!contactFolders)
|
||||
{
|
||||
context = [[WOApplication application] context];
|
||||
[self initContactSourcesInContext: context];
|
||||
}
|
||||
[self initContactSources];
|
||||
|
||||
return [contactFolders allKeys];
|
||||
}
|
||||
|
||||
- (NSArray *) contactFolders
|
||||
{
|
||||
WOContext *context;
|
||||
|
||||
if (!contactFolders)
|
||||
{
|
||||
context = [[WOApplication application] context];
|
||||
[self initContactSourcesInContext: context];
|
||||
}
|
||||
[self initContactSources];
|
||||
|
||||
return [contactFolders allValues];
|
||||
}
|
||||
|
||||
- (NSString *) roleOfUser: (NSString *) uid
|
||||
inContext: (WOContext *) context
|
||||
{
|
||||
NSArray *roles, *traversalPath;
|
||||
NSString *objectName, *role;
|
||||
|
|
|
@ -281,7 +281,7 @@
|
|||
}
|
||||
|
||||
- (id) lookupName: (NSString *) name
|
||||
inContext: (WOContext *) context
|
||||
inContext: (WOContext *) lookupContext
|
||||
acquire: (BOOL) acquire
|
||||
{
|
||||
id obj;
|
||||
|
@ -290,7 +290,7 @@
|
|||
// NSLog (@"looking up name '%@'...", name);
|
||||
|
||||
/* first check attributes directly bound to the application */
|
||||
obj = [super lookupName: name inContext: context acquire: NO];
|
||||
obj = [super lookupName: name inContext: lookupContext acquire: NO];
|
||||
if (!obj)
|
||||
{
|
||||
[self _loadEntries: name];
|
||||
|
|
|
@ -241,7 +241,6 @@
|
|||
|
||||
/* security */
|
||||
- (NSArray *) rolesOfUser: (NSString *) login
|
||||
inContext: (WOContext *) context
|
||||
{
|
||||
NSMutableArray *sogoRoles;
|
||||
SOGoUser *user;
|
||||
|
|
|
@ -67,10 +67,10 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (SOGoGroupsFolder *) lookupGroupsFolder
|
||||
{
|
||||
return [self lookupName: @"Groups" inContext: nil acquire: NO];
|
||||
}
|
||||
// - (SOGoGroupsFolder *) lookupGroupsFolder
|
||||
// {
|
||||
// return [self lookupName: @"Groups" inContext: nil acquire: NO];
|
||||
// }
|
||||
|
||||
/* pathes */
|
||||
|
||||
|
@ -131,11 +131,11 @@
|
|||
return contacts;
|
||||
}
|
||||
|
||||
- (id) groupsFolder: (NSString *) _key
|
||||
inContext: (WOContext *) _ctx
|
||||
{
|
||||
return [$(@"SOGoGroupsFolder") objectWithName: _key inContainer: self];
|
||||
}
|
||||
// - (id) groupsFolder: (NSString *) _key
|
||||
// inContext: (WOContext *) _ctx
|
||||
// {
|
||||
// return [$(@"SOGoGroupsFolder") objectWithName: _key inContainer: self];
|
||||
// }
|
||||
|
||||
- (id) mailAccountsFolder: (NSString *) _key
|
||||
inContext: (WOContext *) _ctx
|
||||
|
@ -168,12 +168,12 @@
|
|||
}
|
||||
else if ([_key isEqualToString: @"Contacts"])
|
||||
obj = [self privateContacts: _key inContext: _ctx];
|
||||
else if ([_key isEqualToString: @"Groups"])
|
||||
obj = [self groupsFolder: _key inContext: _ctx];
|
||||
// else if ([_key isEqualToString: @"Groups"])
|
||||
// obj = [self groupsFolder: _key inContext: _ctx];
|
||||
else if ([_key isEqualToString: @"Mail"])
|
||||
obj = [self mailAccountsFolder: _key inContext: _ctx];
|
||||
else if ([_key isEqualToString: @"freebusy.ifb"])
|
||||
obj = [self freeBusyObject:_key inContext:_ctx];
|
||||
obj = [self freeBusyObject:_key inContext: _ctx];
|
||||
else
|
||||
obj = [NSException exceptionWithHTTPStatus: 404 /* Not Found */];
|
||||
}
|
||||
|
@ -181,38 +181,38 @@
|
|||
return obj;
|
||||
}
|
||||
|
||||
/* FIXME: here is a vault of hackish ways to gain access to subobjects by
|
||||
granting ro access to the homepage depending on the subobject in question.
|
||||
This is wrong and dangerous. */
|
||||
- (NSString *) roleOfUser: (NSString *) uid
|
||||
inContext: (WOContext *) context
|
||||
{
|
||||
NSArray *roles, *traversalPath;
|
||||
NSString *objectName, *role;
|
||||
// /* FIXME: here is a vault of hackish ways to gain access to subobjects by
|
||||
// granting ro access to the homepage depending on the subobject in question.
|
||||
// This is wrong and dangerous. */
|
||||
// - (NSString *) roleOfUser: (NSString *) uid
|
||||
// inContext: (WOContext *) context
|
||||
// {
|
||||
// NSArray *roles, *traversalPath;
|
||||
// NSString *objectName, *role;
|
||||
|
||||
role = nil;
|
||||
traversalPath = [context objectForKey: @"SoRequestTraversalPath"];
|
||||
if ([traversalPath count] > 1)
|
||||
{
|
||||
objectName = [traversalPath objectAtIndex: 1];
|
||||
if ([objectName isEqualToString: @"Calendar"]
|
||||
|| [objectName isEqualToString: @"Contacts"])
|
||||
{
|
||||
roles = [[context activeUser]
|
||||
rolesForObject: [self lookupName: objectName
|
||||
inContext: context
|
||||
acquire: NO]
|
||||
inContext: context];
|
||||
if ([roles containsObject: SOGoRole_Assistant]
|
||||
|| [roles containsObject: SOGoRole_Delegate])
|
||||
role = SOGoRole_Assistant;
|
||||
}
|
||||
else if ([objectName isEqualToString: @"freebusy.ifb"])
|
||||
role = SOGoRole_Assistant;
|
||||
}
|
||||
// role = nil;
|
||||
// traversalPath = [context objectForKey: @"SoRequestTraversalPath"];
|
||||
// if ([traversalPath count] > 1)
|
||||
// {
|
||||
// objectName = [traversalPath objectAtIndex: 1];
|
||||
// if ([objectName isEqualToString: @"Calendar"]
|
||||
// || [objectName isEqualToString: @"Contacts"])
|
||||
// {
|
||||
// roles = [[context activeUser]
|
||||
// rolesForObject: [self lookupName: objectName
|
||||
// inContext: context
|
||||
// acquire: NO]
|
||||
// inContext: context];
|
||||
// if ([roles containsObject: SOGoRole_Assistant]
|
||||
// || [roles containsObject: SOGoRole_Delegate])
|
||||
// role = SOGoRole_Assistant;
|
||||
// }
|
||||
// else if ([objectName isEqualToString: @"freebusy.ifb"])
|
||||
// role = SOGoRole_Assistant;
|
||||
// }
|
||||
|
||||
return role;
|
||||
}
|
||||
// return role;
|
||||
// }
|
||||
|
||||
/* WebDAV */
|
||||
|
||||
|
@ -244,10 +244,8 @@
|
|||
collections itself. So for use its the home folder, the
|
||||
public folder and the groups folder.
|
||||
*/
|
||||
WOContext *context;
|
||||
NSArray *tag;
|
||||
|
||||
context = [[WOApplication application] context];
|
||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
||||
[self baseURLInContext: context], nil];
|
||||
|
||||
|
|
|
@ -154,19 +154,27 @@
|
|||
return self->item;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)startTime {
|
||||
- (NSCalendarDate *) startTime
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
date = [[self authorativeEvent] startDate];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endTime {
|
||||
- (NSCalendarDate *) endTime
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
date = [[self authorativeEvent] endDate];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#import <NGExtensions/NSCalendarDate+misc.h>
|
||||
|
||||
#import <Appointments/SOGoFreeBusyObject.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
|
@ -112,9 +113,11 @@
|
|||
NSCalendarDate *startDate, *endDate;
|
||||
NSString *queryDay, *additionalDays;
|
||||
NSTimeZone *uTZ;
|
||||
SOGoUser *user;
|
||||
|
||||
co = [self clientObject];
|
||||
uTZ = [co userTimeZone];
|
||||
user = [context activeUser];
|
||||
uTZ = [user timeZone];
|
||||
|
||||
queryDay = [self queryParameterForKey: @"sday"];
|
||||
if ([queryDay length])
|
||||
|
|
|
@ -17,13 +17,9 @@
|
|||
};
|
||||
SOGoUserFolder = {
|
||||
superclass = "SOGoFolder";
|
||||
protectedBy = "<public>";
|
||||
defaultAccess = "allow";
|
||||
/* protectedBy = "HomePage Access"; */
|
||||
defaultRoles = {
|
||||
"Homepage Access" = ( "Owner", "Assistant", "Delegate", "FreeBusy" );
|
||||
"WebDAV Access" = ( "Owner", "Assistant", "Delegate", "FreeBusy" );
|
||||
"Access Contents Information" = ( "Owner", "Assistant", "Delegate",
|
||||
"FreeBusy" );
|
||||
};
|
||||
};
|
||||
SOGoFolder = {
|
||||
superclass = "SOGoObject";
|
||||
|
@ -68,12 +64,6 @@
|
|||
SOGoRootPage = {
|
||||
};
|
||||
SOGoUserFolder = {
|
||||
methods = {
|
||||
view = {
|
||||
protectedBy = "View";
|
||||
pageName = "SOGoUserHomePage";
|
||||
};
|
||||
};
|
||||
};
|
||||
SOGoGroupsFolder = {
|
||||
methods = {
|
||||
|
|
|
@ -19,22 +19,25 @@
|
|||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import "SOGoJSStringFormatter.h"
|
||||
#import "common.h"
|
||||
|
||||
#import <Foundation/NSException.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSKeyValueCoding.h>
|
||||
#import <NGObjWeb/SoHTTPAuthenticator.h>
|
||||
#import <NGObjWeb/SoObjects.h>
|
||||
#import <NGObjWeb/WOResourceManager.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoObject.h>
|
||||
#import <SOGo/SOGoCustomGroupFolder.h>
|
||||
#import <SOGo/NSCalendarDate+SOGo.h>
|
||||
|
||||
#import "UIxJSClose.h"
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSURL+misc.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoObject.h>
|
||||
#import <SoObjects/SOGo/SOGoCustomGroupFolder.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
|
||||
#import "UIxComponent.h"
|
||||
#import "UIxJSClose.h"
|
||||
|
||||
@interface UIxComponent (PrivateAPI)
|
||||
- (void)_parseQueryString:(NSString *)_s;
|
||||
|
@ -370,13 +373,16 @@ static BOOL uixDebugEnabled = NO;
|
|||
|
||||
- (NSCalendarDate *) selectedDate
|
||||
{
|
||||
NSTimeZone *userTimeZone;
|
||||
|
||||
if (!_selectedDate)
|
||||
{
|
||||
userTimeZone = [[context activeUser] timeZone];
|
||||
_selectedDate
|
||||
= [NSCalendarDate
|
||||
dateFromShortDateString: [self queryParameterForKey: @"day"]
|
||||
andShortTimeString: [self queryParameterForKey: @"hm"]
|
||||
inTimeZone: [[self clientObject] userTimeZone]];
|
||||
inTimeZone: userTimeZone];
|
||||
[_selectedDate retain];
|
||||
}
|
||||
|
||||
|
@ -385,7 +391,10 @@ static BOOL uixDebugEnabled = NO;
|
|||
|
||||
- (NSString *) dateStringForDate: (NSCalendarDate *) _date
|
||||
{
|
||||
[_date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
NSTimeZone *userTimeZone;
|
||||
|
||||
userTimeZone = [[context activeUser] timeZone];
|
||||
[_date setTimeZone: userTimeZone];
|
||||
|
||||
return [_date descriptionWithCalendarFormat:@"%Y%m%d"];
|
||||
}
|
||||
|
|
|
@ -249,13 +249,15 @@
|
|||
- (NSCalendarDate *) newStartDate
|
||||
{
|
||||
NSCalendarDate *newStartDate, *now;
|
||||
NSTimeZone *timeZone;
|
||||
int hour;
|
||||
|
||||
newStartDate = [self selectedDate];
|
||||
if ([[self queryParameterForKey: @"hm"] length] == 0)
|
||||
{
|
||||
now = [NSCalendarDate calendarDate];
|
||||
[now setTimeZone: [[self clientObject] userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[now setTimeZone: timeZone];
|
||||
if ([now isDateOnSameDay: newStartDate])
|
||||
{
|
||||
hour = [now hourOfDay];
|
||||
|
@ -365,23 +367,23 @@
|
|||
|
||||
// TODO: add tentatively
|
||||
|
||||
- (id) acceptOrDeclineAction: (BOOL) _accept
|
||||
- (id) acceptOrDeclineAction: (BOOL) accept
|
||||
{
|
||||
[[self clientObject] changeParticipationStatus:
|
||||
_accept ? @"ACCEPTED" : @"DECLINED"
|
||||
inContext: [self context]];
|
||||
[[self clientObject] changeParticipationStatus: (accept
|
||||
? @"ACCEPTED"
|
||||
: @"DECLINED")];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) acceptAction
|
||||
{
|
||||
return [self acceptOrDeclineAction:YES];
|
||||
return [self acceptOrDeclineAction: YES];
|
||||
}
|
||||
|
||||
- (id) declineAction
|
||||
{
|
||||
return [self acceptOrDeclineAction:NO];
|
||||
return [self acceptOrDeclineAction: NO];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -170,30 +170,44 @@
|
|||
[self setStartDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
|
||||
[self setStartDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
|
||||
}
|
||||
- (NSCalendarDate *)startDate {
|
||||
|
||||
- (NSCalendarDate *) startDate
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
|
||||
return [NSCalendarDate dateWithYear:[[self startDateYear] intValue]
|
||||
month:[[self startDateMonth] intValue]
|
||||
day:[[self startDateDay] intValue]
|
||||
hour:[[self startDateHour] intValue]
|
||||
minute:[[self startDateMinute] intValue]
|
||||
second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
}
|
||||
- (void)setEndDate:(NSCalendarDate *)_date {
|
||||
|
||||
- (void) setEndDate: (NSCalendarDate *) _date
|
||||
{
|
||||
[self setEndDateHour:[NSNumber numberWithInt:[_date hourOfDay]]];
|
||||
[self setEndDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]];
|
||||
[self setEndDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]];
|
||||
[self setEndDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
|
||||
[self setEndDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
|
||||
}
|
||||
- (NSCalendarDate *)endDate {
|
||||
|
||||
- (NSCalendarDate *) endDate
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
|
||||
return [NSCalendarDate dateWithYear:[[self endDateYear] intValue]
|
||||
month:[[self endDateMonth] intValue]
|
||||
day:[[self endDateDay] intValue]
|
||||
hour:[[self endDateHour] intValue]
|
||||
minute:[[self endDateMinute] intValue]
|
||||
second:59
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
}
|
||||
|
||||
- (void)setDuration:(id)_duration {
|
||||
|
@ -273,28 +287,31 @@
|
|||
// TODO: from startdate to enddate
|
||||
NSMutableArray *ma;
|
||||
NSCalendarDate *base, *stop, *current;
|
||||
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
base = [NSCalendarDate dateWithYear:[[self startDateYear] intValue]
|
||||
month:[[self startDateMonth] intValue]
|
||||
day:[[self startDateDay] intValue]
|
||||
hour:12 minute:0 second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
stop = [NSCalendarDate dateWithYear:[[self endDateYear] intValue]
|
||||
month:[[self endDateMonth] intValue]
|
||||
day:[[self endDateDay] intValue]
|
||||
hour:12 minute:0 second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
|
||||
ma = [NSMutableArray arrayWithCapacity:16];
|
||||
timeZone: timeZone];
|
||||
ma = [NSMutableArray arrayWithCapacity: 16];
|
||||
|
||||
current = base;
|
||||
while ([current compare:stop] != NSOrderedDescending) {
|
||||
[current setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[ma addObject:current];
|
||||
while ([current compare:stop] != NSOrderedDescending)
|
||||
{
|
||||
[current setTimeZone: timeZone];
|
||||
[ma addObject:current];
|
||||
|
||||
/* Note: remember the timezone behaviour of the method below! */
|
||||
current = [current dateByAddingYears:0 months:0 days:1];
|
||||
}
|
||||
current = [current dateByAddingYears:0 months:0 days:1];
|
||||
}
|
||||
|
||||
return ma;
|
||||
}
|
||||
|
||||
|
@ -323,6 +340,7 @@
|
|||
- (BOOL)isSlotRangeGreen:(NGCalendarDateRange *)_slotRange {
|
||||
NGCalendarDateRange *aptRange;
|
||||
NSCalendarDate *aptStartDate, *aptEndDate;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
if (_slotRange == nil)
|
||||
return NO;
|
||||
|
@ -334,8 +352,9 @@
|
|||
aptEndDate = [[NSCalendarDate alloc] initWithTimeIntervalSince1970:
|
||||
[aptStartDate timeIntervalSince1970]
|
||||
+ [self durationAsTimeInterval]];
|
||||
[aptStartDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[aptEndDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[aptStartDate setTimeZone: timeZone];
|
||||
[aptEndDate setTimeZone: timeZone];
|
||||
aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate:aptStartDate
|
||||
endDate:aptEndDate];
|
||||
[aptEndDate release]; aptEndDate = nil;
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
id item;
|
||||
}
|
||||
|
||||
- (iCalEvent *)appointment;
|
||||
- (iCalEvent *) appointment;
|
||||
|
||||
/* permissions */
|
||||
- (BOOL)canAccessApt;
|
||||
- (BOOL)canEditApt;
|
||||
- (BOOL) canAccessApt;
|
||||
- (BOOL) canEditApt;
|
||||
|
||||
- (SOGoDateFormatter *)dateFormatter;
|
||||
- (NSCalendarDate *)startTime;
|
||||
- (NSCalendarDate *)endTime;
|
||||
- (SOGoDateFormatter *) dateFormatter;
|
||||
- (NSCalendarDate *) startTime;
|
||||
- (NSCalendarDate *) endTime;
|
||||
|
||||
- (NSString *)attributesTabLink;
|
||||
- (NSString *)participantsTabLink;
|
||||
- (NSString *) attributesTabLink;
|
||||
- (NSString *) participantsTabLink;
|
||||
|
||||
- (NSString *)completeHrefForMethod:(NSString *)_method
|
||||
withParameter:(NSString *)_param
|
||||
forKey:(NSString *)_key;
|
||||
- (NSString *) completeHrefForMethod: (NSString *) _method
|
||||
withParameter: (NSString *) _param
|
||||
forKey: (NSString *) _key;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -97,17 +97,23 @@
|
|||
|
||||
- (NSCalendarDate *)startTime {
|
||||
NSCalendarDate *date;
|
||||
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
date = [[self appointment] startDate];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endTime {
|
||||
NSCalendarDate *date;
|
||||
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
date = [[self appointment] endDate];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
date = [NSCalendarDate dateWithTimeIntervalSince1970:
|
||||
[[currentAppointment objectForKey: @"startdate"]
|
||||
intValue]];
|
||||
[date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return [[self itemDateFormatter] stringForObjectValue: date];
|
||||
}
|
||||
|
@ -141,7 +141,7 @@
|
|||
date = [NSCalendarDate dateWithTimeIntervalSince1970:
|
||||
[[currentAppointment objectForKey: @"enddate"]
|
||||
intValue]];
|
||||
[date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return [[self itemDateFormatter] stringForObjectValue: date];
|
||||
}
|
||||
|
@ -158,7 +158,7 @@
|
|||
|
||||
intDate = [[currentAppointment objectForKey: @"startdate"] intValue];
|
||||
date = [NSCalendarDate dateWithTimeIntervalSince1970: intDate];
|
||||
[date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return [NSString stringWithFormat: @"%d%.2d%.2d",
|
||||
[date yearOfCommonEra],
|
||||
|
@ -173,7 +173,7 @@
|
|||
|
||||
intDate = [[currentAppointment objectForKey: @"startdate"] intValue];
|
||||
date = [NSCalendarDate dateWithTimeIntervalSince1970: intDate];
|
||||
[date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return [NSString stringWithFormat: @"%.2d%.2d",
|
||||
[date hourOfDay],
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
- (void) setSelectedDate: (NSCalendarDate *) _date
|
||||
{
|
||||
ASSIGN (selectedDate, _date);
|
||||
[selectedDate setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[selectedDate setTimeZone: timeZone];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) selectedDate
|
||||
|
|
|
@ -36,14 +36,10 @@
|
|||
|
||||
- (id) init
|
||||
{
|
||||
NSTimeZone *tz;
|
||||
|
||||
if ((self = [super init]))
|
||||
{
|
||||
tz = [[self clientObject] userTimeZone];
|
||||
|
||||
monthAptFormatter
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: tz];
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
|
||||
[monthAptFormatter setShortMonthTitleOnly];
|
||||
dateFormatter = [[SOGoDateFormatter alloc]
|
||||
initWithLocale: [self locale]];
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@class NSDictionary;
|
||||
@class NSMutableDictionary;
|
||||
@class NSString;
|
||||
@class NSTimeZone;
|
||||
|
||||
@class SOGoAptFormatter;
|
||||
@class SOGoAppointmentFolder;
|
||||
|
@ -29,6 +30,7 @@
|
|||
NSArray *allDayApts;
|
||||
id appointment;
|
||||
NSCalendarDate *currentDay;
|
||||
NSTimeZone *timeZone;
|
||||
SOGoAptFormatter *aptFormatter;
|
||||
SOGoAptFormatter *aptTooltipFormatter;
|
||||
SOGoAptFormatter *privateAptFormatter;
|
||||
|
|
|
@ -43,17 +43,16 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
NSTimeZone *tz;
|
||||
|
||||
tz = [[self clientObject] userTimeZone];
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
[timeZone retain];
|
||||
aptFormatter
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: tz];
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
|
||||
aptTooltipFormatter
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: tz];
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
|
||||
privateAptFormatter
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: tz];
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
|
||||
privateAptTooltipFormatter
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: tz];
|
||||
= [[SOGoAptFormatter alloc] initWithDisplayTimeZone: timeZone];
|
||||
[self configureFormatters];
|
||||
componentsData = [NSMutableDictionary new];
|
||||
}
|
||||
|
@ -72,6 +71,7 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
[aptTooltipFormatter release];
|
||||
[privateAptFormatter release];
|
||||
[privateAptTooltipFormatter release];
|
||||
[timeZone release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -322,8 +322,8 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
|
||||
- (void) setCurrentDay:(NSCalendarDate *) _day
|
||||
{
|
||||
[_day setTimeZone: [[self clientObject] userTimeZone]];
|
||||
ASSIGN(currentDay, _day);
|
||||
[_day setTimeZone: timeZone];
|
||||
ASSIGN (currentDay, _day);
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) currentDay
|
||||
|
@ -478,8 +478,7 @@ static BOOL shouldDisplayWeekend = NO;
|
|||
|
||||
clientObject = [self clientObject];
|
||||
|
||||
folders = [[clientObject calendarFoldersInContext: context]
|
||||
objectEnumerator];
|
||||
folders = [[clientObject calendarFolders] objectEnumerator];
|
||||
currentFolderDict = [folders nextObject];
|
||||
while (currentFolderDict)
|
||||
{
|
||||
|
|
|
@ -112,8 +112,7 @@ colorForNumber (unsigned int number)
|
|||
NSDictionary *currentFolder;
|
||||
unsigned int count;
|
||||
|
||||
calendarFolders
|
||||
= [[self clientObject] calendarFoldersInContext: context];
|
||||
calendarFolders = [[self clientObject] calendarFolders];
|
||||
if (!colors)
|
||||
{
|
||||
colors = [NSMutableDictionary new];
|
||||
|
|
|
@ -310,8 +310,7 @@
|
|||
{
|
||||
calendarList = [NSMutableArray new];
|
||||
folder = [[self clientObject] container];
|
||||
allCalendars
|
||||
= [[folder calendarFoldersInContext: context] objectEnumerator];
|
||||
allCalendars = [[folder calendarFolders] objectEnumerator];
|
||||
currentCalendar = [allCalendars nextObject];
|
||||
while (currentCalendar)
|
||||
{
|
||||
|
@ -743,7 +742,7 @@
|
|||
|
||||
co = [self clientObject];
|
||||
if (![co
|
||||
respondsToSelector: @selector(changeParticipationStatus:inContext:)])
|
||||
respondsToSelector: @selector(changeParticipationStatus:)])
|
||||
return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
|
||||
reason:
|
||||
@"method cannot be invoked on the specified object"];
|
||||
|
|
|
@ -290,12 +290,15 @@
|
|||
{
|
||||
NSCalendarDate *newStartDate, *now;
|
||||
int hour;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
|
||||
newStartDate = [self selectedDate];
|
||||
if ([[self queryParameterForKey: @"hm"] length] == 0)
|
||||
{
|
||||
now = [NSCalendarDate calendarDate];
|
||||
[now setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[now setTimeZone: timeZone];
|
||||
if ([now isDateOnSameDay: newStartDate])
|
||||
{
|
||||
hour = [now hourOfDay];
|
||||
|
@ -434,20 +437,19 @@
|
|||
- (id) acceptOrDeclineAction: (BOOL) _accept
|
||||
{
|
||||
[[self clientObject] changeParticipationStatus:
|
||||
_accept ? @"ACCEPTED" : @"DECLINED"
|
||||
inContext: [self context]];
|
||||
_accept ? @"ACCEPTED" : @"DECLINED"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) acceptAction
|
||||
{
|
||||
return [self acceptOrDeclineAction:YES];
|
||||
return [self acceptOrDeclineAction: YES];
|
||||
}
|
||||
|
||||
- (id) declineAction
|
||||
{
|
||||
return [self acceptOrDeclineAction:NO];
|
||||
return [self acceptOrDeclineAction: NO];
|
||||
}
|
||||
|
||||
- (id) changeStatusAction
|
||||
|
|
|
@ -170,30 +170,44 @@
|
|||
[self setStartDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
|
||||
[self setStartDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
|
||||
}
|
||||
- (NSCalendarDate *)startDate {
|
||||
|
||||
- (NSCalendarDate *) startDate
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
|
||||
return [NSCalendarDate dateWithYear:[[self startDateYear] intValue]
|
||||
month:[[self startDateMonth] intValue]
|
||||
day:[[self startDateDay] intValue]
|
||||
hour:[[self startDateHour] intValue]
|
||||
minute:[[self startDateMinute] intValue]
|
||||
second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
}
|
||||
- (void)setEndDate:(NSCalendarDate *)_date {
|
||||
|
||||
- (void) setEndDate: (NSCalendarDate *) _date
|
||||
{
|
||||
[self setEndDateHour:[NSNumber numberWithInt:[_date hourOfDay]]];
|
||||
[self setEndDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]];
|
||||
[self setEndDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]];
|
||||
[self setEndDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
|
||||
[self setEndDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
|
||||
}
|
||||
- (NSCalendarDate *)endDate {
|
||||
|
||||
- (NSCalendarDate *) endDate
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
|
||||
return [NSCalendarDate dateWithYear:[[self endDateYear] intValue]
|
||||
month:[[self endDateMonth] intValue]
|
||||
day:[[self endDateDay] intValue]
|
||||
hour:[[self endDateHour] intValue]
|
||||
minute:[[self endDateMinute] intValue]
|
||||
second:59
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
}
|
||||
|
||||
- (void)setDuration:(id)_duration {
|
||||
|
@ -269,32 +283,36 @@
|
|||
return ma;
|
||||
}
|
||||
|
||||
- (NSArray *)days {
|
||||
- (NSArray *) days
|
||||
{
|
||||
// TODO: from startdate to enddate
|
||||
NSMutableArray *ma;
|
||||
NSCalendarDate *base, *stop, *current;
|
||||
|
||||
base = [NSCalendarDate dateWithYear:[[self startDateYear] intValue]
|
||||
month:[[self startDateMonth] intValue]
|
||||
day:[[self startDateDay] intValue]
|
||||
hour:12 minute:0 second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
stop = [NSCalendarDate dateWithYear:[[self endDateYear] intValue]
|
||||
month:[[self endDateMonth] intValue]
|
||||
day:[[self endDateDay] intValue]
|
||||
hour:12 minute:0 second:0
|
||||
timeZone:[[self clientObject] userTimeZone]];
|
||||
NSCalendarDate *base, *stop, *current;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
base = [NSCalendarDate dateWithYear: [[self startDateYear] intValue]
|
||||
month: [[self startDateMonth] intValue]
|
||||
day: [[self startDateDay] intValue]
|
||||
hour: 12 minute: 0 second: 0
|
||||
timeZone: timeZone];
|
||||
stop = [NSCalendarDate dateWithYear: [[self endDateYear] intValue]
|
||||
month: [[self endDateMonth] intValue]
|
||||
day: [[self endDateDay] intValue]
|
||||
hour: 12 minute: 0 second: 0
|
||||
timeZone: timeZone];
|
||||
|
||||
ma = [NSMutableArray arrayWithCapacity:16];
|
||||
|
||||
current = base;
|
||||
while ([current compare:stop] != NSOrderedDescending) {
|
||||
[current setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[current setTimeZone: timeZone];
|
||||
[ma addObject:current];
|
||||
|
||||
/* Note: remember the timezone behaviour of the method below! */
|
||||
current = [current dateByAddingYears:0 months:0 days:1];
|
||||
}
|
||||
|
||||
return ma;
|
||||
}
|
||||
|
||||
|
@ -320,27 +338,32 @@
|
|||
return idx == NSNotFound ? YES : NO;
|
||||
}
|
||||
|
||||
- (BOOL)isSlotRangeGreen:(NGCalendarDateRange *)_slotRange {
|
||||
- (BOOL)isSlotRangeGreen: (NGCalendarDateRange *) _slotRange
|
||||
{
|
||||
NGCalendarDateRange *aptRange;
|
||||
NSCalendarDate *aptStartDate, *aptEndDate;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
if (_slotRange == nil)
|
||||
return NO;
|
||||
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
/* calculate the interval requested by the user (can be larger) */
|
||||
|
||||
aptStartDate = [_slotRange startDate];
|
||||
// TODO: gives warning on MacOSX
|
||||
aptEndDate = [[NSCalendarDate alloc] initWithTimeIntervalSince1970:
|
||||
[aptStartDate timeIntervalSince1970]
|
||||
+ [self durationAsTimeInterval]];
|
||||
[aptStartDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[aptEndDate setTimeZone:[[self clientObject] userTimeZone]];
|
||||
aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate:aptStartDate
|
||||
endDate:aptEndDate];
|
||||
[aptEndDate release]; aptEndDate = nil;
|
||||
aptEndDate
|
||||
= [[NSCalendarDate alloc]
|
||||
initWithTimeIntervalSince1970: ([aptStartDate timeIntervalSince1970]
|
||||
+ [self durationAsTimeInterval])];
|
||||
[aptStartDate setTimeZone: timeZone];
|
||||
[aptEndDate setTimeZone: timeZone];
|
||||
aptRange = [NGCalendarDateRange calendarDateRangeWithStartDate: aptStartDate
|
||||
endDate: aptEndDate];
|
||||
[aptEndDate release];
|
||||
aptEndDate = nil;
|
||||
|
||||
return [self isRangeGreen:aptRange];
|
||||
return [self isRangeGreen: aptRange];
|
||||
}
|
||||
|
||||
- (BOOL)isFirstHalfGreen {
|
||||
|
|
|
@ -95,19 +95,27 @@
|
|||
return dateFormatter;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)startTime {
|
||||
- (NSCalendarDate *) startTime
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
date = [[self task] startDate];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endTime {
|
||||
- (NSCalendarDate *) endTime
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
date = [[self task] due];
|
||||
[date setTimeZone:[[self clientObject] userTimeZone]];
|
||||
[date setTimeZone: timeZone];
|
||||
|
||||
return date;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,12 +69,15 @@
|
|||
return label;
|
||||
}
|
||||
|
||||
- (void)setDate:(NSCalendarDate *)_date {
|
||||
NSLog (@"^^^^^^ %@: setDate: %@", self, _date);
|
||||
- (void) setDate: (NSCalendarDate *) _date
|
||||
{
|
||||
NSTimeZone *timeZone;
|
||||
int minuteValue;
|
||||
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
if (!_date)
|
||||
_date = [NSCalendarDate date];
|
||||
[_date setTimeZone: [[self clientObject] userTimeZone]];
|
||||
[_date setTimeZone: timeZone];
|
||||
[self _setDate: _date];
|
||||
|
||||
minuteValue = [_date minuteOfHour];
|
||||
|
@ -251,8 +254,9 @@
|
|||
{
|
||||
NSCalendarDate *d;
|
||||
unsigned _year, _month, _day, _hour, _minute, _second;
|
||||
NSTimeZone *timeZone;
|
||||
|
||||
NSLog (@"******************** %@: take values...", self);
|
||||
timeZone = [[context activeUser] timeZone];
|
||||
/* call super, so that the form values are applied on the popups */
|
||||
[super takeValuesFromRequest:_rq inContext:_ctx];
|
||||
|
||||
|
@ -270,7 +274,7 @@
|
|||
|
||||
d = [NSCalendarDate dateWithYear: _year month:_month day:_day
|
||||
hour:_hour minute:_minute second:_second
|
||||
timeZone: [[self clientObject] userTimeZone]];
|
||||
timeZone: timeZone];
|
||||
[self _setDate: d];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,216 +0,0 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<var:component 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"
|
||||
className="UIxPageFrame"
|
||||
title="name"
|
||||
>
|
||||
|
||||
<table id="skywintable"
|
||||
class="wintable"
|
||||
cellspacing="0"
|
||||
cellpadding="5"
|
||||
width="100%"
|
||||
>
|
||||
<tr>
|
||||
<td class="window_label">
|
||||
<var:component className="UIxCalDateLabel"
|
||||
startDate="startDate"
|
||||
endDate="endDate"
|
||||
const:selection="month"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="skywinbodycell" class="wincontent">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr bgcolor="#e8e8e0">
|
||||
<td align="left">
|
||||
<var:component className="UIxCalBackForthNavView"
|
||||
methodName="ownMethodName"
|
||||
prevQueryParameters="prevMonthQueryParameters"
|
||||
currentQueryParameters="todayQueryParameters"
|
||||
nextQueryParameters="nextMonthQueryParameters"
|
||||
label:label="this month"
|
||||
/>
|
||||
</td>
|
||||
<td align="right" valign="middle" width="80%">
|
||||
<var:component className="UIxContactSelector"
|
||||
const:selectorId="uids" />
|
||||
<!-- <var:component className="AnaisUidSelector"
|
||||
calendarUIDs="clientObject.calendarUIDs"
|
||||
/> -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="skywinbodycell" class="wincontent">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<var:component className="UIxCalSelectTab"
|
||||
const:selection="month"
|
||||
currentDate="selectedDate"
|
||||
>
|
||||
<table border="0" cellpadding="4" width="100%" cellspacing="2">
|
||||
<tr>
|
||||
<td align="left" bgcolor="#e8e8e0" class="button_auto_env">
|
||||
<a var:href="ownMethodName"
|
||||
class="button_auto"
|
||||
var:queryDictionary="toggleShowRejectedAptsQueryParameters"
|
||||
label:string="$toggleShowRejectedAptsLabel"
|
||||
/>
|
||||
</td>
|
||||
<td align="right" bgcolor="#e8e8e0">
|
||||
<table border="0" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<td class="button_auto_env"
|
||||
nowrap="true"
|
||||
valign="middle"
|
||||
align="center"
|
||||
>
|
||||
<!--<a class="button_auto"
|
||||
href="monthprintview"
|
||||
var:queryDictionary="queryParameters"
|
||||
target="SOGoPrintView"
|
||||
><var:string label:value="printview"/></a>-->
|
||||
</td>
|
||||
<td class="button_auto_env"
|
||||
nowrap="true"
|
||||
valign="middle"
|
||||
align="center"
|
||||
>
|
||||
<a class="button_auto"
|
||||
href="proposal"
|
||||
var:queryDictionary="queryParameters"
|
||||
><var:string label:value="proposal"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<var:month-overview list="appointments"
|
||||
item="appointment"
|
||||
currentDay="currentDay"
|
||||
index="dayIndex"
|
||||
year="year"
|
||||
month="month"
|
||||
const:startDateKey="startDate"
|
||||
const:endDateKey="endDate"
|
||||
const:class="monthoverview"
|
||||
contentStyle="contentStyle"
|
||||
const:width="100%"
|
||||
>
|
||||
<var:month-info>
|
||||
<var:if condition="hasHolidayInfo">
|
||||
<var:string value="holidayInfo"
|
||||
const:class="monthoverview_holidayinfo"
|
||||
/>
|
||||
</var:if>
|
||||
<var:foreach list="allDayApts" item="appointment">
|
||||
<var:component className="UIxCalInlineAptView"
|
||||
appointment="appointment"
|
||||
formatter="aptFormatter"
|
||||
tooltipFormatter="aptTooltipFormatter"
|
||||
url="appointmentViewURL"
|
||||
const:style="monthoverview"
|
||||
referenceDate="currentDay"
|
||||
canAccess="canAccessApt"
|
||||
/>
|
||||
<br />
|
||||
</var:foreach>
|
||||
</var:month-info>
|
||||
<var:month-label const:orientation="top"
|
||||
dayOfWeek="dayOfWeek"
|
||||
const:class="monthoverview_title"
|
||||
>
|
||||
<var:string value="localizedDayOfWeekName"/>
|
||||
</var:month-label>
|
||||
<var:month-label const:orientation="left"
|
||||
weekOfYear="weekOfYear"
|
||||
class="weekStyle"
|
||||
>
|
||||
<a href="weekoverview"
|
||||
var:queryDictionary="currentWeekQueryParameters"
|
||||
><var:string value="weekOfYear"/></a>
|
||||
</var:month-label>
|
||||
<var:month-title class="contentStyle">
|
||||
<span class="monthoverview_day">
|
||||
<a href="dayoverview"
|
||||
var:queryDictionary="currentDayQueryParameters"
|
||||
><var:string value="currentDay.dayOfMonth"/></a>
|
||||
</span>
|
||||
<!-- removed for 0.8
|
||||
<br/>
|
||||
<span class="monthoverview_day_new">
|
||||
<a href="new"
|
||||
var:queryDictionary="currentDayQueryParameters"
|
||||
>[<var:string label:value="new"/>]</a>
|
||||
</span>-->
|
||||
</var:month-title>
|
||||
<var:month class="contentStyle">
|
||||
<var:component className="UIxCalInlineAptView"
|
||||
appointment="appointment"
|
||||
formatter="aptFormatter"
|
||||
tooltipFormatter="aptTooltipFormatter"
|
||||
url="appointmentViewURL"
|
||||
const:style="monthoverview"
|
||||
referenceDate="currentDay"
|
||||
canAccess="canAccessApt"
|
||||
/>
|
||||
<br />
|
||||
</var:month>
|
||||
</var:month-overview>
|
||||
</var:component>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#F5F5E9">
|
||||
<td align="left" width="10">
|
||||
<var:entity const:name="nbsp"/>
|
||||
</td>
|
||||
<td align="right">
|
||||
<img border="0"
|
||||
alt=""
|
||||
rsrc:src="corner_right.gif"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" bgcolor="#F5F5E9">
|
||||
<table border="0" width="100%" cellpadding="10" cellspacing="0">
|
||||
<tr/>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--
|
||||
<hr />
|
||||
start: <var:string value="startDate" /><br />
|
||||
end: <var:string value="endDate" /><br />
|
||||
-->
|
||||
<!--
|
||||
SOGo 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 />
|
||||
|
||||
Appointments:
|
||||
<var:component className="UIxAptTableView" appointments="appointments"/>
|
||||
-->
|
||||
<!-- pre><var:string value="appointments" const:insertBR="YES"/></pre -->
|
||||
</var:component>
|
Loading…
Reference in New Issue