2 Copyright (C) 2000-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
23 #include "iCalPortalPage.h"
25 @interface iCalPortalCalTabs : iCalPortalPage
28 NSString *calendarName;
35 @implementation iCalPortalCalTabs
38 [self->selection release];
39 [self->calendarName release];
45 - (void)setSelection:(NSString *)_sel {
46 ASSIGN(self->selection, _sel);
48 - (NSString *)selection {
49 return self->selection;
52 - (void)setCalendarName:(NSString *)_sel {
53 ASSIGN(self->calendarName, _sel);
55 - (NSString *)calendarName {
56 return self->calendarName;
61 - (BOOL)isDaySelected {
62 return [self->selection isEqualToString:@"day"] ? YES : NO;
64 - (BOOL)isWeekSelected {
65 return [self->selection isEqualToString:@"week"] ? YES : NO;
67 - (BOOL)isMonthSelected {
68 return [self->selection isEqualToString:@"month"] ? YES : NO;
70 - (BOOL)isToDoSelected {
71 return [self->selection isEqualToString:@"todo"] ? YES : NO;
74 - (NSString *)_url:(NSString *)_name {
75 return [NSString stringWithFormat:
76 @"/iCalPortal.woa/WebServerResources/English.lproj/"
77 @"tab_%@.gif", _name];
80 - (NSString *)dayTabURL {
81 return [self _url:[self isDaySelected] ? @"selected":@"left"];
83 - (NSString *)weekTabURL {
84 return [self _url:[self isWeekSelected] ? @"selected" : @""];
86 - (NSString *)monthTabURL {
87 return [self _url:[self isMonthSelected] ? @"selected" : @""];
89 - (NSString *)todoTabURL {
90 return [self _url:[self isToDoSelected] ? @"selected" : @""];
95 @end /* iCalPortalCalTabs */