%ARGS>
$Date => undef
@Tickets => ()
$slots => $default_slots
$sday => undef
$tod_row => undef
$timestep => $default_timestep
@username => ()
%ARGS>
% foreach my $username ( @username ) {
% for my $t (@Tickets) {
% next unless $t->OwnerObj->Name eq $username;
%
% next unless RTx::Calendar::LocalDate($t->StartsObj->Unix)
% eq $Date->strftime('%F'); #today
%
% my($sm, $sh) = ($t->StartsObj->Localtime('user'))[1,2];
% my $starts = $sh*60 + $sm;
%
% my($dm, $dh) = ($t->DueObj->Localtime('user'))[1,2];
% my $due = $dh*60 + $dm;
%
% next if $starts >= ($tod_row+$timestep) || $due < $tod_row;
%
% warn $starts. ' = '. ($tod_row+$timestep);
% if ( $starts >= $tod_row ) {
<% $t->Id %>
% } else {
cont<% $t->Id %>...
% }
% }
|
% }
<%ONCE>
my $default_slots = RT->Config->Get('CalendarWeeklySlots') || 5;
my $default_timestep = RT->Config->Get('CalendarWeeklySizeMin') || 30; #1/2h
%ONCE>