From 607ef67a40fa18daff48eaa2ea3cb66555a7be69 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 11 Aug 2004 14:01:15 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@179 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/Main/ChangeLog | 3 ++ SOGo/Main/GNUmakefile | 4 +++ SOGo/Main/SOGoGroupPage.m | 35 +++++++++++++++++++++ SOGo/Main/SOGoGroupPage.wox | 26 +++++++++++++++ SOGo/Main/SOGoGroupsPage.m | 35 +++++++++++++++++++++ SOGo/Main/SOGoGroupsPage.wox | 17 ++++++++++ SOGo/Main/TODO | 6 ---- SOGo/Main/Version | 2 +- SOGo/Main/product.plist | 8 +++++ SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m | 27 +++++++++++++--- 10 files changed, 151 insertions(+), 12 deletions(-) create mode 100644 SOGo/Main/SOGoGroupPage.m create mode 100644 SOGo/Main/SOGoGroupPage.wox create mode 100644 SOGo/Main/SOGoGroupsPage.m create mode 100644 SOGo/Main/SOGoGroupsPage.wox diff --git a/SOGo/Main/ChangeLog b/SOGo/Main/ChangeLog index 18be6aa4..5b066117 100644 --- a/SOGo/Main/ChangeLog +++ b/SOGo/Main/ChangeLog @@ -1,5 +1,8 @@ 2004-08-11 Helge Hess + * added SOGoGroupPage and SOGoGroupsPage (default views for the group + folders) (v0.9.7) + * sogod.m: do not set SoRootURL manually (v0.9.6) 2004-08-10 Marcus Mueller diff --git a/SOGo/Main/GNUmakefile b/SOGo/Main/GNUmakefile index cedd1b32..1d3a0ddb 100644 --- a/SOGo/Main/GNUmakefile +++ b/SOGo/Main/GNUmakefile @@ -13,6 +13,8 @@ sogod_OBJC_FILES += \ \ SOGoRootPage.m \ SOGoUserHomePage.m \ + SOGoGroupPage.m \ + SOGoGroupsPage.m \ sogod_RESOURCE_FILES += \ Version \ @@ -20,6 +22,8 @@ sogod_RESOURCE_FILES += \ \ SOGoRootPage.wox \ SOGoUserHomePage.wox \ + SOGoGroupPage.wox \ + SOGoGroupsPage.wox \ sogod_LOCALIZED_RESOURCE_FILES += \ Locale diff --git a/SOGo/Main/SOGoGroupPage.m b/SOGo/Main/SOGoGroupPage.m new file mode 100644 index 00000000..cb70b59d --- /dev/null +++ b/SOGo/Main/SOGoGroupPage.m @@ -0,0 +1,35 @@ +/* + Copyright (C) 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: SOGoGroupPage.m 106 2004-06-30 09:44:35Z helge $ + +#include + +@interface SOGoGroupPage : SoComponent +{ +} + +@end + +#include "common.h" + +@implementation SOGoGroupPage + +@end /* SOGoGroupPage */ diff --git a/SOGo/Main/SOGoGroupPage.wox b/SOGo/Main/SOGoGroupPage.wox new file mode 100644 index 00000000..a1d16866 --- /dev/null +++ b/SOGo/Main/SOGoGroupPage.wox @@ -0,0 +1,26 @@ + + +

+ OpenGroupware.org: + +

+ +

Actions

+ + +

Group Members

+
    + +
  • +
    +
+ +
diff --git a/SOGo/Main/SOGoGroupsPage.m b/SOGo/Main/SOGoGroupsPage.m new file mode 100644 index 00000000..fe6e10eb --- /dev/null +++ b/SOGo/Main/SOGoGroupsPage.m @@ -0,0 +1,35 @@ +/* + Copyright (C) 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: SOGoGroupsPage.m 106 2004-06-30 09:44:35Z helge $ + +#include + +@interface SOGoGroupsPage : SoComponent +{ +} + +@end + +#include "common.h" + +@implementation SOGoGroupsPage + +@end /* SOGoGroupsPage */ diff --git a/SOGo/Main/SOGoGroupsPage.wox b/SOGo/Main/SOGoGroupsPage.wox new file mode 100644 index 00000000..4328209c --- /dev/null +++ b/SOGo/Main/SOGoGroupsPage.wox @@ -0,0 +1,17 @@ + + +

+ OpenGroupware.org: + +

+ +

+ This is an (intentionally) empty page, go back. +

+
diff --git a/SOGo/Main/TODO b/SOGo/Main/TODO index b377c1e8..fbbab2d1 100644 --- a/SOGo/Main/TODO +++ b/SOGo/Main/TODO @@ -1,7 +1 @@ # $Id$ - -- add a 'view' page for Groups (SOGoGroupsFolder) - (initially empty ...) - -- add a 'view' page for custom groups (SOGoCustomGroupFolder) - - or: a generic one for groups? diff --git a/SOGo/Main/Version b/SOGo/Main/Version index 0eb47da3..cab297dc 100644 --- a/SOGo/Main/Version +++ b/SOGo/Main/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=6 +SUBMINOR_VERSION:=7 diff --git a/SOGo/Main/product.plist b/SOGo/Main/product.plist index d2e944f5..b6b86737 100644 --- a/SOGo/Main/product.plist +++ b/SOGo/Main/product.plist @@ -60,11 +60,19 @@ SOGoGroupsFolder = { superclass = "SOGoObject"; methods = { + index = { + protectedBy = "View"; + pageName = "SOGoGroupsPage"; + }; }; }; SOGoGroupFolder = { superclass = "SOGoObject"; methods = { + index = { + protectedBy = "View"; + pageName = "SOGoGroupPage"; + }; }; }; SOGoCustomGroupFolder = { diff --git a/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m b/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m index daa365d6..2a8a8e9e 100644 --- a/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m +++ b/SOGo/SoObjects/SOGo/SOGoCustomGroupFolder.m @@ -68,16 +68,33 @@ static NSString *SOGoUIDSeparator = @","; /* display name */ - (NSString *)davDisplayName { - NSArray *a; + NSArray *a; + unsigned count; a = [self uids]; - if ([a count] == 0) + if ((count = [a count]) == 0) return @"empty"; - if ([a count] == 1) + if (count == 1) return [a objectAtIndex:0]; -#warning TODO: localize - return @"Custom"; + if (count < 6) { + NSMutableString *ms; + unsigned i; + + ms = [NSMutableString stringWithCapacity:64]; + for (i = 0; i < count; i++) { + if (i != 0) [ms appendString:@"|"]; + [ms appendString:[a objectAtIndex:i]]; + if ([ms length] > 60) { + ms = nil; + break; + } + } + if (ms != nil) return ms; + } + +#warning TODO: localize 'members' + return [NSString stringWithFormat:@"Members: %d", count]; } @end /* SOGoCustomGroupFolder */ -- 2.39.5