[otrs-cvs] CVS: Calendar/Kernel/Modules AgentCalendar.pm,1.12,1.13
cvs-log at otrs.org
cvs-log at otrs.org
Thu Jan 4 19:59:32 CET 2007
- Previous message: [otrs-cvs] CVS: Calendar/Kernel/Language de_AgentCalendar.pm, 1.6,
1.7 it_AgentCalendar.pm,1.2,1.3 nb_NO_AgentCalendar.pm,1.2,1.3
pt_AgentCalendar.pm,1.1,1.2
- Next message: [otrs-cvs]
CVS: Calendar/Kernel/Output/HTML NotificationCalendar.pm, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/Calendar/Kernel/Modules
In directory lancelot:/tmp/cvs-serv28188/Kernel/Modules
Modified Files:
AgentCalendar.pm
Log Message:
added iCalendar support and moved to iCalendar wording
Index: AgentCalendar.pm
===================================================================
RCS file: /home/cvs/Calendar/Kernel/Modules/AgentCalendar.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** AgentCalendar.pm 4 Oct 2006 20:04:48 -0000 1.12
--- AgentCalendar.pm 4 Jan 2007 18:59:29 -0000 1.13
***************
*** 1,5 ****
# --
# Kernel/Modules/AgentCalendar.pm - a calendar
! # Copyright (C) 2001-2006 OTRS GmbH, http://otrs.org/
# --
# $Id$
--- 1,5 ----
# --
# Kernel/Modules/AgentCalendar.pm - a calendar
! # Copyright (C) 2001-2007 OTRS GmbH, http://otrs.org/
# --
# $Id$
***************
*** 16,25 ****
use Kernel::System::CalendarEvent;
-
use vars qw($VERSION);
$VERSION = '$Revision$';
$VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
- # --
sub new {
my $Type = shift;
--- 16,23 ----
***************
*** 45,49 ****
return $Self;
}
! # --
sub Run {
my $Self = shift;
--- 43,47 ----
return $Self;
}
!
sub Run {
my $Self = shift;
***************
*** 77,81 ****
);
-
# must fields.
# get today
--- 75,78 ----
***************
*** 171,177 ****
Valid => 1,
);
! $Frontend{UserList} = $Self->{LayoutObject}->OptionStrgHashRef(
Data => \%ShownUsers,
! Name => 'UserIDs',
Multiple => 1,
Size => 5,
--- 168,174 ----
Valid => 1,
);
! $Frontend{ParticipantList} = $Self->{LayoutObject}->OptionStrgHashRef(
Data => \%ShownUsers,
! Name => 'ParticipantIDs',
Multiple => 1,
Size => 5,
***************
*** 218,231 ****
$GetParam{"SequenceEnd$_"} = sprintf("%02d", $GetParam{"SequenceEnd$_"});
}
! # foreach (qw(Title Content State SequenceType Reminder)) {
! foreach (qw(Title Content State SequenceType)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
! $GetParam{StartTime} = "$GetParam{StartYear}-$GetParam{StartMonth}-$GetParam{StartDay} $GetParam{StartHour}:$GetParam{StartMinute}:00";
! $GetParam{EndTime} = "$GetParam{EndYear}-$GetParam{EndMonth}-$GetParam{EndDay} $GetParam{EndHour}:$GetParam{EndMinute}:00";
! $GetParam{SequenceEndTime} = "$GetParam{SequenceEndYear}-$GetParam{SequenceEndMonth}-$GetParam{SequenceEndDay} $GetParam{SequenceEndHour}:$GetParam{SequenceEndMinute}:00";
! my @UserIDs = $Self->{ParamObject}->GetArray(Param => 'UserIDs');
! $GetParam{UserIDs} = \@UserIDs;
! if ($Self->{CalendarObject}->EventAdd(%GetParam)) {
return $Self->{LayoutObject}->Redirect(OP => $Self->{LastScreenOverview});
}
--- 215,243 ----
$GetParam{"SequenceEnd$_"} = sprintf("%02d", $GetParam{"SequenceEnd$_"});
}
! # transform time selection, support time zones
! my %TimeStart = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "Start",
! );
! my %TimeEnd = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "End",
! );
! my %TimeSequenceEnd = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "SequenceEnd",
! );
! foreach (qw(Title Description Location State SequenceType)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
! $GetParam{StartTime} = "$TimeStart{StartYear}-$TimeStart{StartMonth}-$TimeStart{StartDay} ".
! "$TimeStart{StartHour}:$TimeStart{StartMinute}:00";
! $GetParam{EndTime} = "$TimeEnd{EndYear}-$TimeEnd{EndMonth}-$TimeEnd{EndDay} ".
! "$TimeEnd{EndHour}:$TimeEnd{EndMinute}:00";
! $GetParam{SequenceEndTime} = "$TimeSequenceEnd{SequenceEndYear}-$TimeSequenceEnd{SequenceEndMonth}-$TimeSequenceEnd{SequenceEndDay} ".
! "$TimeSequenceEnd{SequenceEndHour}:$TimeSequenceEnd{SequenceEndMinute}:00";
! my @ParticipantIDs = $Self->{ParamObject}->GetArray(Param => 'ParticipantIDs');
! $GetParam{ParticipantIDs} = \@ParticipantIDs;
! if ($Self->{CalendarObject}->EventAdd(%GetParam, OrganizerID => $Self->{UserID}, UserID => $Self->{UserID})) {
return $Self->{LayoutObject}->Redirect(OP => $Self->{LastScreenOverview});
}
***************
*** 245,253 ****
}
# get event
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam);
# check permission
! if ($Event{State} =~ /private/i && $Event{UserID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$Event{UserIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
--- 257,265 ----
}
# get event
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam, UserID => $Self->{UserID});
# check permission
! if ($Event{State} =~ /private/i && $Event{OrganizerID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$Event{OrganizerIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
***************
*** 365,374 ****
Valid => 1,
);
! $Frontend{UserList} = $Self->{LayoutObject}->OptionStrgHashRef(
Data => \%ShownUsers,
! Name => 'UserIDs',
Multiple => 1,
Size => 5,
! SelectedIDRefArray => $Event{UserIDs},
);
--- 377,386 ----
Valid => 1,
);
! $Frontend{ParticipantList} = $Self->{LayoutObject}->OptionStrgHashRef(
Data => \%ShownUsers,
! Name => 'ParticipantIDs',
Multiple => 1,
Size => 5,
! SelectedIDRefArray => $Event{ParticipantIDs},
);
***************
*** 383,386 ****
--- 395,420 ----
},
);
+ # created
+ my %CreateBy = $Self->{UserObject}->GetUserData(
+ UserID => $Event{CreateBy},
+ );
+ $Self->{LayoutObject}->Block(
+ Name => 'UpdateCreated',
+ Data => {
+ %Event,
+ %CreateBy,
+ },
+ );
+ # changed
+ my %ChangeBy = $Self->{UserObject}->GetUserData(
+ UserID => $Event{ChangeBy},
+ );
+ $Self->{LayoutObject}->Block(
+ Name => 'UpdateChanged',
+ Data => {
+ %Event,
+ %ChangeBy,
+ },
+ );
# generate output
my $Output = $Self->{LayoutObject}->Header(Title => 'Edit');
***************
*** 413,418 ****
$GetParam{"SequenceEnd$_"} = sprintf("%02d", $GetParam{"SequenceEnd$_"});
}
! # foreach (qw(EventID Title Content State SequenceType Reminder Delete MonthlyType)) {
! foreach (qw(EventID Title Content State SequenceType Delete MonthlyType)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
--- 447,464 ----
$GetParam{"SequenceEnd$_"} = sprintf("%02d", $GetParam{"SequenceEnd$_"});
}
! # transform time selection, support time zones
! my %TimeStart = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "Start",
! );
! my %TimeEnd = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "End",
! );
! my %TimeSequenceEnd = $Self->{LayoutObject}->TransfromDateSelection(
! %GetParam,
! Prefix => "SequenceEnd",
! );
! foreach (qw(EventID Title Description Location State SequenceType Cancel MonthlyType)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
***************
*** 421,436 ****
}
# check delete
! if ($GetParam{Delete}) {
return $Self->{LayoutObject}->Redirect(
! OP => "Action=$Self->{Action}&Subaction=Delete&EventID=$GetParam{EventID}",
);
}
! my @UserIDs = $Self->{ParamObject}->GetArray(Param => 'UserIDs');
! $GetParam{UserIDs} = \@UserIDs;
# check permission
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam);
if ($Event{State} =~ /private/i && $Event{UserID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$Event{UserIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
--- 467,482 ----
}
# check delete
! if ($GetParam{Cancel}) {
return $Self->{LayoutObject}->Redirect(
! OP => "Action=$Self->{Action}&Subaction=Cancel&EventID=$GetParam{EventID}",
);
}
! my @ParticipantIDs = $Self->{ParamObject}->GetArray(Param => 'ParticipantIDs');
! $GetParam{ParticipantIDs} = \@ParticipantIDs;
# check permission
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam, UserID => $Self->{UserID});
if ($Event{State} =~ /private/i && $Event{UserID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$Event{ParticipantIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
***************
*** 442,450 ****
}
# build date sting
! $GetParam{StartTime} = "$GetParam{StartYear}-$GetParam{StartMonth}-$GetParam{StartDay} $GetParam{StartHour}:$GetParam{StartMinute}:00";
! $GetParam{EndTime} = "$GetParam{EndYear}-$GetParam{EndMonth}-$GetParam{EndDay} $GetParam{EndHour}:$GetParam{EndMinute}:00";
! $GetParam{SequenceEndTime} = "$GetParam{SequenceEndYear}-$GetParam{SequenceEndMonth}-$GetParam{SequenceEndDay} $GetParam{SequenceEndHour}:$GetParam{SequenceEndMinute}:00";
# update event
! if ($Self->{CalendarObject}->EventUpdate(%GetParam)) {
return $Self->{LayoutObject}->Redirect(OP => $Self->{LastScreenOverview});
}
--- 488,499 ----
}
# build date sting
! $GetParam{StartTime} = "$TimeStart{StartYear}-$TimeStart{StartMonth}-$TimeStart{StartDay} ".
! "$TimeStart{StartHour}:$TimeStart{StartMinute}:00";
! $GetParam{EndTime} = "$TimeEnd{EndYear}-$TimeEnd{EndMonth}-$TimeEnd{EndDay} ".
! "$TimeEnd{EndHour}:$TimeEnd{EndMinute}:00";
! $GetParam{SequenceEndTime} = "$TimeSequenceEnd{SequenceEndYear}-$TimeSequenceEnd{SequenceEndMonth}-$TimeSequenceEnd{SequenceEndDay} ".
! "$TimeSequenceEnd{SequenceEndHour}:$TimeSequenceEnd{SequenceEndMinute}:00";
# update event
! if ($Self->{CalendarObject}->EventUpdate(%GetParam, OrganizerID => $Self->{UserID}, UserID => $Self->{UserID})) {
return $Self->{LayoutObject}->Redirect(OP => $Self->{LastScreenOverview});
}
***************
*** 457,469 ****
# delete event
# ------------------------------------------------------------ #
! elsif ($Self->{Subaction} eq 'Delete') {
my %GetParam = ();
foreach (qw(EventID)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam);
# generate output
$Self->{LayoutObject}->Block(
! Name => 'Delete',
Data => {
%GetParam,
--- 506,518 ----
# delete event
# ------------------------------------------------------------ #
! elsif ($Self->{Subaction} eq 'Cancel') {
my %GetParam = ();
foreach (qw(EventID)) {
$GetParam{$_} = $Self->{ParamObject}->GetParam(Param => $_);
}
! my %Event = $Self->{CalendarObject}->EventGet(%GetParam, UserID => $Self->{UserID});
# generate output
$Self->{LayoutObject}->Block(
! Name => 'Cancel',
Data => {
%GetParam,
***************
*** 471,475 ****
},
);
! my $Output = $Self->{LayoutObject}->Header(Title => 'Delete');
# build NavigationBar
$Output .= $Self->{LayoutObject}->NavigationBar();
--- 520,524 ----
},
);
! my $Output = $Self->{LayoutObject}->Header(Title => 'Cancel');
# build NavigationBar
$Output .= $Self->{LayoutObject}->NavigationBar();
***************
*** 487,491 ****
# delete event
# ------------------------------------------------------------ #
! elsif ($Self->{Subaction} eq 'DeleteAction') {
my %GetParam = ();
foreach (qw(EventID)) {
--- 536,540 ----
# delete event
# ------------------------------------------------------------ #
! elsif ($Self->{Subaction} eq 'CancelAction') {
my %GetParam = ();
foreach (qw(EventID)) {
***************
*** 494,498 ****
# delete event
if ($GetParam{EventID}) {
! if ($Self->{CalendarObject}->EventDelete(%GetParam)) {
return $Self->{LayoutObject}->Redirect(OP => "Action=$Self->{Action}");
}
--- 543,547 ----
# delete event
if ($GetParam{EventID}) {
! if ($Self->{CalendarObject}->EventCancel(%GetParam, UserID => $Self->{UserID})) {
return $Self->{LayoutObject}->Redirect(OP => "Action=$Self->{Action}");
}
***************
*** 667,671 ****
return $Output;
}
! # --
sub CalendarViewMonth {
my $Self = shift;
--- 716,720 ----
return $Output;
}
!
sub CalendarViewMonth {
my $Self = shift;
***************
*** 725,735 ****
foreach (@{$Data{EventIDs}}) {
$Noting = 0;
- # my %Event = $Self->{CalendarObject}->EventGet(EventID => $_);
my %Event = %{$_};
! my %EventOrig = $Self->{CalendarObject}->EventGet(EventID => $Event{EventID});
my $Preffix = '';
! foreach my $User (@{$EventOrig{UserIDs}}) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $User,
Cache => 1,
);
--- 774,786 ----
foreach (@{$Data{EventIDs}}) {
$Noting = 0;
my %Event = %{$_};
! my %EventOrig = $Self->{CalendarObject}->EventGet(
! EventID => $Event{EventID},
! UserID => $Self->{UserID},
! );
my $Preffix = '';
! foreach my $ParticipantID (@{$EventOrig{ParticipantIDs}}) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $ParticipantID,
Cache => 1,
);
***************
*** 742,748 ****
$Event{Title} = '('.$Preffix.') '.$Event{Title};
}
! if ($Event{State} =~ /private/i && $Event{UserID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$EventOrig{UserIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
--- 793,799 ----
$Event{Title} = '('.$Preffix.') '.$Event{Title};
}
! if ($Event{State} =~ /private/i && $Event{OrganizerID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$EventOrig{ParticipantIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
***************
*** 751,755 ****
if (!$Hit) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $Event{UserID},
);
$Self->{LayoutObject}->Block(
--- 802,806 ----
if (!$Hit) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $Event{OrganizerID},
);
$Self->{LayoutObject}->Block(
***************
*** 793,797 ****
return;
}
! # --
sub CalendarViewDay {
my $Self = shift;
--- 844,848 ----
return;
}
!
sub CalendarViewDay {
my $Self = shift;
***************
*** 864,874 ****
foreach (@{$Data{EventIDs}}) {
$Noting = 0;
- # my %Event = $Self->{CalendarObject}->EventGet(EventID => $_);
my %Event = %{$_};
! my %EventOrig = $Self->{CalendarObject}->EventGet(EventID => $Event{EventID});
my $Preffix = '';
! foreach my $User (@{$EventOrig{UserIDs}}) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $User,
Cache => 1,
);
--- 915,927 ----
foreach (@{$Data{EventIDs}}) {
$Noting = 0;
my %Event = %{$_};
! my %EventOrig = $Self->{CalendarObject}->EventGet(
! EventID => $Event{EventID},
! UserID => $Self->{UserID},
! );
my $Preffix = '';
! foreach my $ParticipantID (@{$EventOrig{ParticipantIDs}}) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $ParticipantID,
Cache => 1,
);
***************
*** 881,887 ****
$Event{Title} = '('.$Preffix.') '.$Event{Title};
}
! if ($Event{State} =~ /private/i && $Event{UserID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$EventOrig{UserIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
--- 934,940 ----
$Event{Title} = '('.$Preffix.') '.$Event{Title};
}
! if ($Event{State} =~ /private/i && $Event{OrganizerID} ne $Self->{UserID}) {
my $Hit = 0;
! foreach (@{$EventOrig{ParticipantIDs}}) {
if ($_ eq $Self->{UserID}) {
$Hit = 1;
***************
*** 890,894 ****
if (!$Hit) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $Event{UserID},
Cache => 1,
);
--- 943,947 ----
if (!$Hit) {
my %User = $Self->{UserObject}->GetUserData(
! UserID => $Event{OrganizerID},
Cache => 1,
);
***************
*** 967,970 ****
--- 1020,1024 ----
EndTime => "$EndYear-$EndMonth-$EndDay $EndHour:$EndMinute:59",
UserIDs => \@UserIDs,
+ UserID => $Self->{UserID},
);
# handle the cfd`s
- Previous message: [otrs-cvs] CVS: Calendar/Kernel/Language de_AgentCalendar.pm, 1.6,
1.7 it_AgentCalendar.pm,1.2,1.3 nb_NO_AgentCalendar.pm,1.2,1.3
pt_AgentCalendar.pm,1.1,1.2
- Next message: [otrs-cvs]
CVS: Calendar/Kernel/Output/HTML NotificationCalendar.pm, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs-log
mailing list