2
Copyright (C) 2000-2005 SKYRIX Software AG
4
This file is part of SOPE.
6
SOPE 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
SOPE 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 SOPE; see the file COPYING. If not, write to the
18
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22
#include <NGObjWeb/WODirectAction.h>
24
@interface DirectAction : WODirectAction
27
#include "iCalPortalUser.h"
28
#include "iCalPortalDatabase.h"
29
#include "iCalPortalPage.h"
32
@implementation WODirectAction(Ext)
34
- (id<WOActionResults>)indexPage {
35
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
38
if ((sn = [self existingSession])) {
39
[sn removeObjectForKey:@"user"];
43
if ([ud boolForKey:@"DevMode"])
44
return [[self pageWithName:@"iCalPortalWelcomePage"] performPage];
50
r = [WOResponse responseWithRequest:[self request]];
52
loc = @"/en/index.xhtml"; // TODO: make configurable!
53
[self debugWithFormat:@"Deployment mode: redirecting to: %@", loc];
55
[r setHeader:loc forKey:@"location"];
62
return [self indexPage];
66
return [self indexPage];
69
@end /* WODirectAction(Ext) */
71
@implementation DirectAction
73
- (id)showLicenseAction {
74
return [[self pageWithName:@"iCalPortalLicensePage"] performPage];
77
- (id)feedbackAction {
78
return [[self pageWithName:@"iCalPortalFeedbackPage"] performPage];
81
- (id)editProfileAction {
82
return [[self pageWithName:@"iCalPortalProfilePage"] performPage];
86
return [[self pageWithName:@"iCalPortalHomePage"] performPage];
91
- (id)weekOverviewAction {
92
return [[self pageWithName:@"iCalPortalWeekOverview"] performPage];
94
- (id)dayOverviewAction {
95
return [[self pageWithName:@"iCalPortalDayOverview"] performPage];
97
- (id)monthViewAction {
98
return [[self pageWithName:@"iCalPortalMonthView"] performPage];
100
- (id)todoViewAction {
101
return [[self pageWithName:@"iCalPortalToDoView"] performPage];
104
- (id)showCalendarAction {
105
return [self weekOverviewAction];
108
@end /* DirectAction */