From dc7b9c5639c38ec11c6d6663e6e3539eda4e8c2a Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 11 Aug 2004 12:52:46 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@177 d1b88da0-ebda-0310-925b-ed51d893ca5b --- .../Appointments/SOGoGroupAppointmentFolder.m | 11 ++- SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m | 15 ++++ SOGo/UI/Common/ChangeLog | 10 ++- SOGo/UI/Common/UIxPageFrame.m | 75 ++++++++++++------- SOGo/UI/Common/UIxPageFrame.wox | 12 +-- SOGo/UI/Common/Version | 2 +- 6 files changed, 82 insertions(+), 43 deletions(-) diff --git a/SOGo/SoObjects/Appointments/SOGoGroupAppointmentFolder.m b/SOGo/SoObjects/Appointments/SOGoGroupAppointmentFolder.m index 7b85a73a..f8592fae 100644 --- a/SOGo/SoObjects/Appointments/SOGoGroupAppointmentFolder.m +++ b/SOGo/SoObjects/Appointments/SOGoGroupAppointmentFolder.m @@ -25,12 +25,19 @@ @implementation SOGoGroupAppointmentFolder -#warning TODO: implement aggregation based on the container - /* looking up shared objects */ - (SOGoGroupsFolder *)lookupGroupsFolder { return [[self container] lookupGroupsFolder]; } +/* functionality */ + +- (NSArray *)fetchCoreInfosFrom:(NSCalendarDate *)_startDate + to:(NSCalendarDate *)_endDate +{ +#warning TODO: implement aggregation based on the container + return [NSArray array]; +} + @end /* SOGoGroupAppointmentFolder */ diff --git a/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m b/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m index 7683829d..daa365d6 100644 --- a/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m +++ b/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m @@ -65,4 +65,19 @@ static NSString *SOGoUIDSeparator = @","; return self->uids; } +/* display name */ + +- (NSString *)davDisplayName { + NSArray *a; + + a = [self uids]; + if ([a count] == 0) + return @"empty"; + if ([a count] == 1) + return [a objectAtIndex:0]; + +#warning TODO: localize + return @"Custom"; +} + @end /* SOGoCustomGroupFolder */ diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index c155e092..f9a7ee8c 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,10 +1,12 @@ +2004-08-11 + + * UIxPageFrame: minor fixes to UI (v0.9.8) + 2004-08-05 Marcus Mueller - * v0.9.7 - * calendar.css: commented some styles out, because they don't really do - what I think they should do. Someone with better knowledge of CSS should - look into this. + what I think they should do. Someone with better knowledge of CSS + should look into this. (v0.9.7) 2004-08-02 Marcus Mueller diff --git a/SOGo/UI/Common/UIxPageFrame.m b/SOGo/UI/Common/UIxPageFrame.m index 089440db..a4a4d47a 100644 --- a/SOGo/UI/Common/UIxPageFrame.m +++ b/SOGo/UI/Common/UIxPageFrame.m @@ -40,47 +40,66 @@ } - (SoUser *)user { - WOContext *ctx; + WOContext *ctx; - ctx = [self context]; - return [[[self clientObject] authenticatorInContext:ctx] - userInContext:ctx]; + ctx = [self context]; + return [[[self clientObject] authenticatorInContext:ctx] + userInContext:ctx]; } -- (NSString *)rootURL { - WOContext *ctx; - NSArray *traversalObjects; +- (NSString *)shortUserNameForDisplay { + // TODO: better use a SoUser formatter? + NSString *s; + NSRange r; + + s = [[self user] login]; + if ([s length] < 10) + return s; + + // TODO: algorithm might be inappropriate, depends on the actual UID + + r = [s rangeOfString:@"."]; + if (r.length == 0) + return s; + + return [s substringToIndex:r.location]; +} - if(self->rootURL) - return self->rootURL; +/* URL generation */ + +- (NSString *)rootURL { + WOContext *ctx; + NSArray *traversalObjects; - ctx = [self context]; - traversalObjects = [ctx objectTraversalStack]; - self->rootURL = [[[traversalObjects objectAtIndex:0] - rootURLInContext:ctx] - retain]; + if (self->rootURL) return self->rootURL; + + ctx = [self context]; + traversalObjects = [ctx objectTraversalStack]; + self->rootURL = [[[traversalObjects objectAtIndex:0] + rootURLInContext:ctx] + retain]; + return self->rootURL; } - (NSString *)userRootURL { - WOContext *ctx; - NSArray *traversalObjects; - - if(self->userRootURL) - return self->userRootURL; - - ctx = [self context]; - traversalObjects = [ctx objectTraversalStack]; - self->userRootURL = [[[[traversalObjects objectAtIndex:1] - baseURLInContext:ctx] - stringByAppendingString:@"/"] - retain]; + WOContext *ctx; + NSArray *traversalObjects; + + if (self->userRootURL) return self->userRootURL; + + ctx = [self context]; + traversalObjects = [ctx objectTraversalStack]; + self->userRootURL = [[[[traversalObjects objectAtIndex:1] + baseURLInContext:ctx] + stringByAppendingString:@"/"] + retain]; + return self->userRootURL; } - (NSString *)calendarRootURL { - return [[self userRootURL] stringByAppendingString:@"Calendar/"]; + return [[self userRootURL] stringByAppendingString:@"Calendar/"]; } - @end /* UIxPageFrame */ diff --git a/SOGo/UI/Common/UIxPageFrame.wox b/SOGo/UI/Common/UIxPageFrame.wox index 263c0d50..82b6d2dd 100644 --- a/SOGo/UI/Common/UIxPageFrame.wox +++ b/SOGo/UI/Common/UIxPageFrame.wox @@ -38,15 +38,11 @@ - - + - +
- - + - -
@@ -88,7 +84,7 @@ SOGo () + >SOGo () diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index cab297dc..28292b54 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=7 +SUBMINOR_VERSION:=8 -- 2.39.5