2 Copyright (C) 2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
24 #include <SOGoUI/UIxComponent.h>
25 #include <NGObjWeb/NGObjWeb.h>
26 #include <NGExtensions/NGExtensions.h>
29 @interface UIxCalSelectTab : UIxComponent
32 NSCalendarDate *currentDate;
38 @implementation UIxCalSelectTab
41 [self->selection release];
42 [self->currentDate release];
46 - (void)setSelection:(NSString *)_selection {
47 ASSIGN(self->selection, _selection);
50 - (NSString *)selection {
51 return self->selection;
54 - (void)setCurrentDate:(NSCalendarDate *)_date {
55 [_date setTimeZone:[self viewTimeZone]];
56 ASSIGN(self->currentDate, _date);
59 - (NSCalendarDate *)currentDate {
60 return self->currentDate;
67 - (NSString *)dayLabel {
68 return [NSString stringWithFormat:@"%d",
69 [self->currentDate dayOfMonth]];
72 - (NSString *)weekLabel {
75 wlbl = [self labelForKey:@"Week"];
76 return [NSString stringWithFormat:@"%@ %d",
78 [self->currentDate weekOfYear]];
81 - (NSString *)monthLabel {
82 return [NSString stringWithFormat:@"%@",
83 [self localizedNameForMonthOfYear:[self->currentDate monthOfYear]]];
86 - (NSString *)yearLabel {
87 return [NSString stringWithFormat:@"%d",
88 [self->currentDate yearOfCommonEra]];
94 - (NSString *)scheduletabLink {
95 return [self completeHrefForMethod:@"schedule"];
98 - (NSString *)daytabLink {
99 return [self completeHrefForMethod:@"dayoverview"];
102 - (NSString *)weektabLink {
103 return [self completeHrefForMethod:@"weekoverview"];
106 - (NSString *)monthtabLink {
107 return [self completeHrefForMethod:@"monthoverview"];
110 - (NSString *)yeartabLink {
111 return [self completeHrefForMethod:@"yearoverview"];