]> err.no Git - scalable-opengroupware.org/commitdiff
yearoverview and "inline" month overview
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 21 Jul 2004 21:46:55 +0000 (21:46 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 21 Jul 2004 21:46:55 +0000 (21:46 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@153 d1b88da0-ebda-0310-925b-ed51d893ca5b

16 files changed:
SOGo/SOGo.xcode/project.pbxproj
SOGo/UI/SOGoUI/ChangeLog
SOGo/UI/SOGoUI/UIxComponent.m
SOGo/UI/SOGoUI/Version
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/English.lproj/default.strings
SOGo/UI/Scheduler/French.lproj/default.strings
SOGo/UI/Scheduler/GNUmakefile
SOGo/UI/Scheduler/UIxCalInlineMonthOverview.m [new file with mode: 0644]
SOGo/UI/Scheduler/UIxCalInlineMonthOverview.wox [new file with mode: 0644]
SOGo/UI/Scheduler/UIxCalMonthOverview.h [new file with mode: 0644]
SOGo/UI/Scheduler/UIxCalMonthOverview.m
SOGo/UI/Scheduler/UIxCalYearOverview.m [new file with mode: 0644]
SOGo/UI/Scheduler/UIxCalYearOverview.wox [new file with mode: 0644]
SOGo/UI/Scheduler/Version
SOGo/UI/Scheduler/product.plist

index 79685e583e9bedd9ccd164279486cf3ac419c79e..3eaa5a1c887e007e69935cc0ece2cec25741056c 100644 (file)
                        refType = 4;
                        sourceTree = "<group>";
                };
-               ADCDE53106ADA8AC00BFCE2B = {
+               AD7379B206AEBB2500735920 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.xml;
+                       path = UIxCalInlineMonthOverview.wox;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD7379B306AEBB2500735920 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = UIxCalInlineMonthOverview.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD737A1706AEC77E00735920 = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = UIxCalMonthOverview.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD737A6906AEE8BD00735920 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.xml;
+                       path = UIxCalYearOverview.wox;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD737A6A06AEE8BD00735920 = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = UIxCalYearOverview.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               ADCDE53106ADA8AC00BFCE2B = {
+                       fileEncoding = 5;
+                       isa = PBXFileReference;
                        lastKnownFileType = text.plist.strings;
                        name = English;
                        path = English.lproj/default.strings;
                        sourceTree = "<group>";
                };
                ADCDE53306ADA8CF00BFCE2B = {
+                       fileEncoding = 5;
                        isa = PBXFileReference;
                        lastKnownFileType = text.plist.strings;
                        name = French;
                                E87208FD0692E3D30099CBBD,
                                E87208FE0692E3D30099CBBD,
                                E87208FF0692E3D30099CBBD,
-                               E87209000692E3D30099CBBD,
-                               E87209010692E3D30099CBBD,
                                E87209040692E3D30099CBBD,
                                E87209050692E3D30099CBBD,
+                               AD7379B306AEBB2500735920,
+                               AD7379B206AEBB2500735920,
                                E87209080692E3D30099CBBD,
                                E87209090692E3D30099CBBD,
+                               AD737A1706AEC77E00735920,
+                               E87209000692E3D30099CBBD,
+                               E87209010692E3D30099CBBD,
+                               AD737A6A06AEE8BD00735920,
+                               AD737A6906AEE8BD00735920,
                        );
                        isa = PBXGroup;
                        name = Components;
index da9d49fe6056bec2d2468d21d1eb3846502894bf..f66a857d0eae591ec9b369e0d8b6cf67f47ca8f7 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-21  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * UIxComponent.[hm]: renamed some of the labels to better reflect the
+         intention (and to avoid name clashes) (v0.9.4)
+
 2004-07-21  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * UIxComponent.[hm]: date specific labels (weekday names, month names)
index 2d03589277d669f140c1c75832dcd9953a620f79..9ccbe480b16212c09172e9be9490fb37f783089d 100644 (file)
@@ -58,13 +58,13 @@ static NSMutableArray *abbrMonthLabelKeys = nil;
         [dayLabelKeys addObject:@"Saturday"];
 
         abbrDayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
-        [abbrDayLabelKeys addObject:@"Sun"];
-        [abbrDayLabelKeys addObject:@"Mon"];
-        [abbrDayLabelKeys addObject:@"Tue"];
-        [abbrDayLabelKeys addObject:@"Wed"];
-        [abbrDayLabelKeys addObject:@"Thu"];
-        [abbrDayLabelKeys addObject:@"Fri"];
-        [abbrDayLabelKeys addObject:@"Sat"];
+        [abbrDayLabelKeys addObject:@"a2_Sunday"];
+        [abbrDayLabelKeys addObject:@"a2_Monday"];
+        [abbrDayLabelKeys addObject:@"a2_Tuesday"];
+        [abbrDayLabelKeys addObject:@"a2_Wednesday"];
+        [abbrDayLabelKeys addObject:@"a2_Thursday"];
+        [abbrDayLabelKeys addObject:@"a2_Friday"];
+        [abbrDayLabelKeys addObject:@"a2_Saturday"];
 
         monthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
         [monthLabelKeys addObject:@"January"];
@@ -81,18 +81,18 @@ static NSMutableArray *abbrMonthLabelKeys = nil;
         [monthLabelKeys addObject:@"December"];
 
         abbrMonthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
-        [abbrMonthLabelKeys addObject:@"Jan"];
-        [abbrMonthLabelKeys addObject:@"Feb"];
-        [abbrMonthLabelKeys addObject:@"Mar"];
-        [abbrMonthLabelKeys addObject:@"Apr"];
-        [abbrMonthLabelKeys addObject:@"May"];
-        [abbrMonthLabelKeys addObject:@"Jun"];
-        [abbrMonthLabelKeys addObject:@"Jul"];
-        [abbrMonthLabelKeys addObject:@"Aug"];
-        [abbrMonthLabelKeys addObject:@"Sep"];
-        [abbrMonthLabelKeys addObject:@"Oct"];
-        [abbrMonthLabelKeys addObject:@"Nov"];
-        [abbrMonthLabelKeys addObject:@"Dec"];
+        [abbrMonthLabelKeys addObject:@"a3_January"];
+        [abbrMonthLabelKeys addObject:@"a3_February"];
+        [abbrMonthLabelKeys addObject:@"a3_March"];
+        [abbrMonthLabelKeys addObject:@"a3_April"];
+        [abbrMonthLabelKeys addObject:@"a3_May"];
+        [abbrMonthLabelKeys addObject:@"a3_June"];
+        [abbrMonthLabelKeys addObject:@"a3_July"];
+        [abbrMonthLabelKeys addObject:@"a3_August"];
+        [abbrMonthLabelKeys addObject:@"a3_September"];
+        [abbrMonthLabelKeys addObject:@"a3_October"];
+        [abbrMonthLabelKeys addObject:@"a3_November"];
+        [abbrMonthLabelKeys addObject:@"a3_December"];
     }
 }
 
index 6300d3ac63330dd0ccd003e66c9235abcc2e52ff..38b76bc34efaa97ee15117fc1fe812f321fa9491 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
-SUBMINOR_VERSION:=3
+SUBMINOR_VERSION:=4
 
 # 1.1.0 requires NGObjWeb 4.2.202
index 3fb9b3b0fa34bac47379d4c796ebe77b5d9537a2..1681d01ee1c4aad89d3b5e715b1ccb8bc2f51f87 100644 (file)
@@ -1,3 +1,22 @@
+2004-07-21  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.4
+
+       * UIxCalMonthOverview.h: new header, required by new
+         UIxCalInlineMonthOverview component.
+
+       * UIxCalInlineMonthOverview.[m|wox]: new component rendering a month
+         overview suitable for inlining in other views. Several calendar
+         "modes" require this.
+
+       * UIxCalYearOverview.[m|wox]: new component rendering the year
+         overview.
+
+       * product.plist: yearoverview -> new method
+
+       * GNUmakefile: added UIxCalInlineMonthOverview.[m|wox] and
+         UIxCalYearOverview.[m|wox].
+
 2004-07-21  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.3
index e73e41cd00d035eca53a071a028869e4229ccabe..f0d6424122a9e2c265a36d76ad06f6b792075498 100644 (file)
@@ -2,21 +2,21 @@
 
 /* Day */
 
-"Sunday"    = "Sunday";
-"Monday"    = "Monday";
-"Tuesday"   = "Tuesday";
-"Wednesday" = "Wednesday";
-"Thursday"  = "Thursday";
-"Friday"    = "Friday";
-"Saturday"  = "Saturday";
-
-"Sun"       = "Sun";
-"Mon"       = "Mon";
-"Tue"       = "Tue";
-"Wed"       = "Wed";
-"Thu"       = "Thu";
-"Fri"       = "Fri";
-"Sat"       = "Sat";
+"Sunday"        = "Sunday";
+"Monday"        = "Monday";
+"Tuesday"       = "Tuesday";
+"Wednesday"     = "Wednesday";
+"Thursday"      = "Thursday";
+"Friday"        = "Friday";
+"Saturday"      = "Saturday";
+
+"a2_Sunday"     = "Su";
+"a2_Monday"     = "Mo";
+"a2_Tuesday"    = "Tu";
+"a2_Wednesday"  = "We";
+"a2_Thursday"   = "Th";
+"a2_Friday"     = "Fr";
+"a2_Saturday"   = "Sa";
 
 "dayLabelFormat"    = "%Y-%m-%d";
 
 "November"      = "November";
 "December"      = "December";
 
-"Jan"           = "Jan";
-"Feb"           = "Feb";
-"Mar"           = "Mar";
-"Apr"           = "Apr";
-"May"           = "May";
-"Jun"           = "Jun";
-"Jul"           = "Jul";
-"Aug"           = "Aug";
-"Sep"           = "Sep";
-"Oct"           = "Oct";
-"Nov"           = "Nov";
-"Dec"           = "Dec";
+"a3_January"    = "Jan";
+"a3_February"   = "Feb";
+"a3_March"      = "Mar";
+"a3_April"      = "Apr";
+"a3_May"        = "May";
+"a3_June"       = "Jun";
+"a3_July"       = "Jul";
+"a3_August"     = "Aug";
+"a3_September"  = "Sep";
+"a3_October"    = "Oct";
+"a3_November"   = "Nov";
+"a3_December"   = "Dec";
+
+/* Year */
+
+"this year"    = "this year";
+
 
 /* Misc */
 
index 8fa8deac81b4dcbf1e0dc429a0952bfcd4aab634..18b4e1ecc79f4848af79c5a3a0ce291d52b41659 100644 (file)
@@ -2,21 +2,21 @@
 
 /* Day */
 
-"Sunday"    = "Dimanche";
-"Monday"    = "Lundi";
-"Tuesday"   = "Mardi";
-"Wednesday" = "Mercredi";
-"Thursday"  = "Jeudi";
-"Friday"    = "Vendredi";
-"Saturday"  = "Samedi";
-
-"Sun"       = "Dim";
-"Mon"       = "Lun";
-"Tue"       = "Mar";
-"Wed"       = "Mer";
-"Thu"       = "Jeu";
-"Fri"       = "Ven";
-"Sat"       = "Sam";
+"Sunday"        = "Dimanche";
+"Monday"        = "Lundi";
+"Tuesday"       = "Mardi";
+"Wednesday"     = "Mercredi";
+"Thursday"      = "Jeudi";
+"Friday"        = "Vendredi";
+"Saturday"      = "Samedi";
+
+"a2_Sunday"     = "Di";
+"a2_Monday"     = "Lu";
+"a2_Tuesday"    = "Ma";
+"a2_Wednesday"  = "Me";
+"a2_Thursday"   = "Je";
+"a2_Friday"     = "Ve";
+"a2_Saturday"   = "Sa";
 
 "dayLabelFormat"    = "%Y-%m-%d";
 
 "November"      = "Novembre";
 "December"      = "Décembre";
 
-"Jan"           = "Jan";
-"Feb"           = "Fév";
-"Mar"           = "Mar";
-"Apr"           = "Avr";
-"May"           = "Mai";
-"Jun"           = "Jun";
-"Jul"           = "Jul";
-"Aug"           = "Aoû";
-"Sep"           = "Sep";
-"Oct"           = "Oct";
-"Nov"           = "Nov";
-"Dec"           = "Déc";
+"a3_January"    = "Jan";
+"a3_February"   = "Feb";
+"a3_March"      = "Mar";
+"a3_April"      = "Apr";
+"a3_May"        = "May";
+"a3_June"       = "Jun";
+"a3_July"       = "Jul";
+"a3_August"     = "Aug";
+"a3_September"  = "Sep";
+"a3_October"    = "Oct";
+"a3_November"   = "Nov";
+"a3_December"   = "Dec";
+
+
+/* Year */
+
+"this year"    = "this year";
 
 
 /* Misc */
index 3df9e56b112fa263102697461588d6814b83d29b..fcef9b24c8513a889d61218f982f8ecf92646322 100644 (file)
@@ -20,6 +20,8 @@ SchedulerUI_OBJC_FILES = \
        \
        UIxCalWeekOverview.m    \
        UIxCalMonthOverview.m   \
+       UIxCalYearOverview.m    \
+       UIxCalInlineMonthOverview.m     \
        UIxAppointmentView.m    \
        UIxAppointmentEditor.m  \
        UIxCalSelectTab.m \
@@ -33,6 +35,8 @@ SchedulerUI_RESOURCE_FILES += \
        UIxAptTableView.wox             \
        UIxCalWeekOverview.wox          \
        UIxCalMonthOverview.wox         \
+       UIxCalYearOverview.wox          \
+       UIxCalInlineMonthOverview.wox           \
        UIxAppointmentView.wox          \
        UIxAppointmentEditor.wox        \
        UIxCalSelectTab.wox             \
diff --git a/SOGo/UI/Scheduler/UIxCalInlineMonthOverview.m b/SOGo/UI/Scheduler/UIxCalInlineMonthOverview.m
new file mode 100644 (file)
index 0000000..cc6fa7b
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+  Copyright (C) 2000-2004 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$
+
+
+#include "UIxCalMonthOverview.h"
+#include <NGExtensions/NGExtensions.h>
+
+
+@interface UIxCalInlineMonthOverview : UIxCalMonthOverview
+{
+    NSCalendarDate *selectedDate;
+    NSString *headerStyle;
+    NSString *weekStyle;
+    NSString *todayWeekStyle;
+    NSString *dayHeaderStyle;
+    NSString *dayBodyStyle;
+    NSString *todayBodyStyle;
+    NSString *inactiveDayBodyStyle;
+    NSString *daySelectionHref;
+    NSString *weekSelectionHref;
+    NSString *monthSelectionHref;
+    BOOL showWeekColumn;
+    BOOL showYear;
+}
+
+@end
+
+@implementation UIxCalInlineMonthOverview
+
+/* init & dealloc */
+
+- (void)dealloc {
+    [self->selectedDate release];
+    [self->headerStyle release];
+    [self->weekStyle release];
+    [self->todayWeekStyle release];
+    [self->dayHeaderStyle release];
+    [self->dayBodyStyle release];
+    [self->todayBodyStyle release];
+    [self->inactiveDayBodyStyle release];
+    [self->daySelectionHref release];
+    [self->weekSelectionHref release];
+    [self->monthSelectionHref release];
+    [super dealloc];
+}
+
+
+/* binding accessors */
+
+- (void)setSelectedDate:(NSCalendarDate *)_date {
+    [_date setTimeZone:[self viewTimeZone]];
+    ASSIGN(self->selectedDate, _date);
+}
+- (NSCalendarDate *)selectedDate {
+    return self->selectedDate;
+}
+- (void)setHeaderStyle:(NSString *)_style {
+    ASSIGN(self->headerStyle, _style);
+}
+- (NSString *)headerStyle {
+    return self->headerStyle;
+}
+- (void)setWeekStyle:(NSString *)_style {
+    ASSIGN(self->weekStyle, _style);
+}
+- (NSString *)weekStyle {
+    return self->weekStyle;
+}
+- (void)setTodayWeekStyle:(NSString *)_style {
+    ASSIGN(self->todayWeekStyle, _style);
+}
+- (NSString *)todayWeekStyle {
+    if(self->todayWeekStyle)
+        return self->todayWeekStyle;
+    return [self weekStyle];
+}
+- (void)setDayHeaderStyle:(NSString *)_style {
+    ASSIGN(self->dayHeaderStyle, _style);
+}
+- (NSString *)dayHeaderStyle {
+    return self->dayHeaderStyle;
+}
+- (void)setDayBodyStyle:(NSString *)_style {
+    ASSIGN(self->dayBodyStyle, _style);
+}
+- (NSString *)dayBodyStyle {
+    return self->dayBodyStyle;
+}
+- (void)setTodayBodyStyle:(NSString *)_style {
+    ASSIGN(self->todayBodyStyle, _style);
+}
+- (NSString *)todayBodyStyle {
+    return self->todayBodyStyle;
+}
+- (void)setInactiveDayBodyStyle:(NSString *)_style {
+    ASSIGN(self->inactiveDayBodyStyle, _style);
+}
+- (NSString *)inactiveDayBodyStyle {
+    return self->inactiveDayBodyStyle;
+}
+- (void)setDaySelectionHref:(NSString *)_href {
+    ASSIGN(self->daySelectionHref, _href);
+}
+- (NSString *)daySelectionHref {
+    return self->daySelectionHref;
+}
+- (BOOL)hasDaySelectionHref {
+    return self->daySelectionHref != nil;
+}
+- (void)setWeekSelectionHref:(NSString *)_href {
+    ASSIGN(self->weekSelectionHref, _href);
+}
+- (NSString *)weekSelectionHref {
+    return self->weekSelectionHref;
+}
+- (BOOL)hasWeekSelectionHref {
+    return self->weekSelectionHref != nil;
+}
+- (void)setMonthSelectionHref:(NSString *)_href {
+    ASSIGN(self->monthSelectionHref, _href);
+}
+- (NSString *)monthSelectionHref {
+    return self->monthSelectionHref;
+}
+- (BOOL)hasMonthSelectionHref {
+    return self->monthSelectionHref != nil;
+}
+- (void)setShowWeekColumn:(BOOL)_yn {
+    self->showWeekColumn = _yn;
+}
+- (BOOL)showWeekColumn {
+    return self->showWeekColumn;
+}
+- (void)setShowYear:(BOOL)_yn {
+    self->showYear = _yn;
+}
+- (BOOL)showYear {
+    return self->showYear;
+}
+
+
+/* date ranges */
+
+
+- (NSCalendarDate *)startDate {
+    return [[self selectedDate] firstDayOfMonth];
+}
+
+
+/* labels */
+
+- (NSString *)headerString {
+    NSString *label;
+    
+    label = [self localizedNameForMonthOfYear:[[self startDate] monthOfYear]];
+    if([self showYear]) {
+        label = [NSString stringWithFormat:@"%@ %d",
+            label,
+            [[self startDate] yearOfCommonEra]];
+    }
+    return label;
+}
+
+- (NSString *)localizedDayOfWeekName {
+    return [self localizedAbbreviatedNameForDayOfWeek:[self dayOfWeek]];
+}
+
+
+/* stylesheets */
+
+- (NSString *)currentWeekStyle {
+    if([self->currentWeekStart isDateInSameWeek:[NSCalendarDate date]])
+        return [self todayWeekStyle];
+    return [self weekStyle];
+}
+
+- (NSString *)currentDayStyle {
+    return [self dayBodyStyle];
+}
+
+- (NSString *)contentStyle {
+    if([self->currentDay isToday])
+        return [self todayBodyStyle];
+    else if([self->currentDay monthOfYear] != [[self startDate] monthOfYear])
+        return [self inactiveDayBodyStyle];
+    return [self dayBodyStyle];
+}
+
+
+/* URLs */
+
+- (NSDictionary *)currentMonthQueryParameters {
+    return [self queryParametersBySettingSelectedDate:[self startDate]];
+}
+
+/* overriding */
+
+- (NSArray *)fetchCoreInfos {
+    return nil;
+}
+
+@end
diff --git a/SOGo/UI/Scheduler/UIxCalInlineMonthOverview.wox b/SOGo/UI/Scheduler/UIxCalInlineMonthOverview.wox
new file mode 100644 (file)
index 0000000..5414385
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version='1.0' standalone='yes'?>
+
+<table 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"
+>
+       <tr var:class="headerStyle">
+               <td>
+              <var:if condition="hasMonthSelectionHref"><a var:href="monthSelectionHref"
+                                                           var:queryDictionary="currentMonthQueryParameters"
+                                                        ><var:string value="headerString" /></a>
+              </var:if>
+              <var:if condition="hasMonthSelectionHref" const:negate="YES"><var:string value="headerString" /></var:if>
+               </td>
+       </tr>
+       <tr>
+               <td>
+            <var:month-overview currentDay="currentDay"
+                                index="dayIndex"
+                                year="year"
+                                month="month"
+                                const:startDateKey="startDate"
+                                const:endDateKey="endDate"
+            >
+                <var:month-label const:orientation="top"
+                                 dayOfWeek="dayOfWeek"
+                                 class="dayHeaderStyle"
+                >
+                    <var:string value="localizedDayOfWeekName" />
+                </var:month-label>
+                <var:if condition="showWeekColumn">
+                    <var:month-label const:orientation="left"
+                                     weekOfYear="weekOfYear"
+                                     class="weekStyle"
+                    >
+                        <var:if condition="hasWeekSelectionHref">
+                            <a var:href="weekSelectionHref"
+                               var:queryDictionary="currentWeekQueryParameters"
+                            ><var:string value="weekOfYear" /></a>
+                        </var:if>
+                        <var:if condition="hasWeekSelectionHref" const:negate="YES">
+                            <var:string value="weekOfYear" />
+                        </var:if>
+                    </var:month-label>
+                </var:if>
+                <var:month-title class="contentStyle">
+                    <var:if condition="hasDaySelectionHref">
+                        <a var:href="daySelectionHref"
+                           var:queryDictionary="currentDayQueryParameters"
+                        ><var:string value="currentDay.dayOfMonth" /></a>
+                    </var:if>
+                    <var:if condition="hasDaySelectionHref" const:negate="YES">
+                        <var:string value="currentDay.dayOfMonth" />
+                    </var:if>
+                </var:month-title>
+            </var:month-overview>
+        </td>
+       </tr>
+</table>
\ No newline at end of file
diff --git a/SOGo/UI/Scheduler/UIxCalMonthOverview.h b/SOGo/UI/Scheduler/UIxCalMonthOverview.h
new file mode 100644 (file)
index 0000000..9e8a0ae
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2000-2004 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$
+
+
+#include "UIxCalMonthView.h"
+
+
+@class NSCalendarDate, NSString, NSDictionary, NSArray;
+
+
+@interface UIxCalMonthOverview : UIxCalMonthView
+{
+    int dayIndex;
+    int dayOfWeek;
+    int weekOfYear;
+    NSCalendarDate *currentWeekStart;
+}
+
+- (void)setDayIndex:(int)_idx;
+- (int)dayIndex;
+- (void)setDayOfWeek:(int)_day;
+- (int)dayOfWeek;
+
+- (void)setCurrentWeekStartDate:(NSCalendarDate *)_date;
+- (NSCalendarDate *)currentWeekStartDate;
+- (void)setWeekOfYear:(int)_week;
+- (int)weekOfYear;
+- (int)year;
+- (int)month;
+- (NSString *)localizedDayOfWeekName;
+- (NSDictionary *)currentWeekQueryParameters;
+
+
+/* style sheet */
+
+
+- (NSString *)weekStyle;
+
+- (NSString *)contentStyle;
+
+
+/* appointments */
+
+
+- (NSArray *)appointments;
+    
+@end
+
index 756f85a1a4819d30f9e6e1d03341151b085eed77..68550fe75f7451f4e949afdedd6fb3a3acfc18e8 100644 (file)
@@ -1,21 +1,8 @@
 // $Id$
 
-#include "UIxCalMonthView.h"
+#include "UIxCalMonthOverview.h"
 #include <NGExtensions/NGExtensions.h>
 
-
-@interface UIxCalMonthOverview : UIxCalMonthView
-{
-    int dayIndex;
-    int dayOfWeek;
-    int weekOfYear;
-    NSCalendarDate *currentWeekStart;
-}
-
-@end
-
-#include "common.h"
-
 @implementation UIxCalMonthOverview
 
 
diff --git a/SOGo/UI/Scheduler/UIxCalYearOverview.m b/SOGo/UI/Scheduler/UIxCalYearOverview.m
new file mode 100644 (file)
index 0000000..202eeee
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+  Copyright (C) 2000-2004 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$
+
+
+#include <SOGoUI/UIxComponent.h>
+#include <Foundation/Foundation.h>
+
+
+@interface UIxCalYearOverview : UIxComponent
+{
+    NSArray *row;
+    NSCalendarDate *month;
+}
+
+- (NSCalendarDate *)startDate;
+- (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date;
+- (void)setSelectedDateQueryParameter:(NSCalendarDate *)_newDate
+                         inDictionary:(NSMutableDictionary *)_qp;
+
+@end
+
+
+@implementation UIxCalYearOverview
+
+/* init & dealloc */
+
+- (void)dealloc {
+    [self->row release];
+    [self->month release];
+    [super dealloc];
+}
+
+
+/* accessors */
+
+- (void)setRow:(NSArray *)_row {
+    ASSIGN(self->row, _row);
+}
+
+- (NSArray *)row {
+    return self->row;
+}
+
+- (void)setMonth:(NSCalendarDate *)_date {
+    ASSIGN(self->month, _date);
+}
+
+- (NSCalendarDate *)month {
+    return self->month;
+}
+
+- (int)year {
+    return [[self selectedDate] yearOfCommonEra];
+}
+
+- (NSArray *)arrayOfDateArrays {
+    NSCalendarDate *startDate;
+    NSMutableArray *result, *tmp;
+    unsigned rowIdx, columnIdx;
+    int month = 0;
+
+    startDate = [self startDate];
+    result = [[NSMutableArray alloc] initWithCapacity:3];
+    for(rowIdx = 0; rowIdx < 3; rowIdx++) {
+        tmp = [[NSMutableArray alloc] initWithCapacity:4];
+        for(columnIdx = 0; columnIdx < 4; columnIdx++) {
+            NSCalendarDate *date;
+            
+            date = [startDate dateByAddingYears:0
+                                         months:month
+                                           days:0];
+            [tmp addObject:date];
+            month++;
+        }
+        [result addObject:tmp];
+        [tmp release];
+    }
+    return [result autorelease];
+}
+
+
+/* date ranges */
+
+- (NSCalendarDate *)startDate {
+    return [[[NSCalendarDate alloc] initWithYear:[self year] month:1 day:1
+                                    hour:0 minute:0 second:0
+                                    timeZone:[self viewTimeZone]] autorelease];
+}
+
+- (NSCalendarDate *)endDate {
+    return nil;
+}
+
+
+/* URLs */
+
+- (NSDictionary *)todayQueryParameters {
+    NSCalendarDate *date;
+    
+    date = [NSCalendarDate date]; /* today */
+    return [self queryParametersBySettingSelectedDate:date];
+}
+
+- (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date {
+    NSMutableDictionary *qp;
+    
+    qp = [[self queryParameters] mutableCopy];
+    [self setSelectedDateQueryParameter:_date inDictionary:qp];
+    return [qp autorelease];
+}
+
+- (void)setSelectedDateQueryParameter:(NSCalendarDate *)_newDate
+                         inDictionary:(NSMutableDictionary *)_qp;
+{
+    if(_newDate != nil)
+        [_qp setObject:[self dateStringForDate:_newDate] forKey:@"day"];
+    else
+        [_qp removeObjectForKey:@"day"];
+}
+
+- (NSDictionary *)prevYearQueryParameters {
+    NSCalendarDate *date;
+    
+    date = [[self startDate] dateByAddingYears:-1
+                                        months:0
+                                          days:0
+                                         hours:0
+                                       minutes:0
+                                       seconds:0];
+    return [self queryParametersBySettingSelectedDate:date];
+}
+
+- (NSDictionary *)nextYearQueryParameters {
+    NSCalendarDate *date;
+    
+    date = [[self startDate] dateByAddingYears:1
+                                        months:0
+                                          days:0
+                                         hours:0
+                                       minutes:0
+                                       seconds:0];
+    return [self queryParametersBySettingSelectedDate:date];
+}
+
+@end
diff --git a/SOGo/UI/Scheduler/UIxCalYearOverview.wox b/SOGo/UI/Scheduler/UIxCalYearOverview.wox
new file mode 100644 (file)
index 0000000..5a36f29
--- /dev/null
@@ -0,0 +1,89 @@
+<?xml version='1.0' standalone='yes'?>
+<var:component className="UIxPageFrame" 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"
+  xmlns:label="OGo:label"
+>
+
+  <table id="skywintable" class="wintable" cellspacing="0" cellpadding="5" width="100%">
+  <tr>
+  <td class="wintitle">
+  <table cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+  <td width="5"/>
+  <td class="wintitle"><var:component className="UIxCalDateLabel" startDate="startDate" endDate="endDate" const:selection="year" /></td>
+  <td width="36" align="right" valign="center">
+  <var:component className="UIxWinClose" />
+  </td>
+  </tr>
+  </table>
+  </td>
+  </tr>
+
+  <tr>
+  <td id="skywinbodycell" class="wincontent">
+    <table border="0" cellpadding="0" cellspacing="0" width="100%">
+        <tr bgcolor="#e8e8e0">
+            <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% -->
+            <td align="right">
+                <var:component className="UIxCalBackForthNavView"
+                               methodName="ownMethodName"
+                               prevQueryParameters="prevYearQueryParameters"
+                               currentQueryParameters="todayQueryParameters"
+                               nextQueryParameters="nextYearQueryParameters"
+                               label:label="this year"
+                />
+            </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="year"
+                 currentDate="selectedDate"
+  >
+    <table>
+        <var:foreach list="arrayOfDateArrays" item="row">
+            <tr>
+                <var:foreach list="row" item="month">
+                    <td>
+                        <var:component className="UIxCalInlineMonthOverview"
+                                       selectedDate="month"
+                                       const:monthSelectionHref="monthoverview"
+                                       const:showYear="NO"
+                                       const:daySelectionHref="dayoverview"
+                                       const:showWeekColumn="1"
+                                       const:weekSelectionHref="weekoverview"
+                        />
+                    </td>
+                </var:foreach>
+            </tr>
+        </var:foreach>
+    </table>   
+  </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="" src="/sogod.woa/so/ControlPanel/Products/CommonUI/Resources/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>
+</var:component>
index 434e1ad20963e1bff1cb54495e63a10726ebeeef..38b76bc34efaa97ee15117fc1fe812f321fa9491 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
-SUBMINOR_VERSION:=2
+SUBMINOR_VERSION:=4
 
 # 1.1.0 requires NGObjWeb 4.2.202
index d1839ec53cafa8519d80c191d54bccc81e1fdccb..1e85c93bf80d8e3732772639fc9394bb3ae7393b 100644 (file)
           protectedBy = "View";
           pageName    = "UIxCalMonthOverview"; 
         };
+        "yearoverview" = { 
+          protectedBy = "View";
+          pageName    = "UIxCalYearOverview"; 
+        };
         "new" = { 
           protectedBy = "View";
           pageName    = "UIxAppointmentEditor";