4 $slots => $default_slots
7 $timestep => $default_timestep
10 % foreach my $username ( @username ) {
12 % my %schedule = UserDaySchedule( username => $username,
13 % 'date' => $Date->strftime('%F'),
14 % Tickets => \@Tickets,
17 % my $bgcolor = '666666;border-color:#555555';
20 % #white out available times
21 % foreach my $avail ( @{ $schedule{'avail'} } ) {
22 % my( $start, $end ) = @$avail;
23 % next if $start >= ($tod_row+$timestep) || $end <= $tod_row;
24 % $bgcolor = 'FFFFFF';
27 % #block out / show / color code existing appointments
28 % foreach my $id ( keys %{ $schedule{'scheduled'} } ) {
30 % my( $starts, $due, $col, $t ) = @{ $schedule{'scheduled'}->{$id} };
32 % next if $starts >= ($tod_row+$timestep) || $due < $tod_row;
34 % if ( $starts >= $tod_row ) {
36 % $content .= ($content?', ':''). $id; #XXX more
42 <td style="background:#<%$bgcolor%>" class="weekly"
43 %# <% $is_today ? 'today'
44 %# : $is_yesterday ? 'yesterday'
45 %# : $is_aweekago ? 'aweekago'
51 my $default_slots = RT->Config->Get('CalendarWeeklySlots') || 5;
52 my $default_timestep = RT->Config->Get('CalendarWeeklySizeMin') || 30; #1/2h
56 use RTx::Schedule qw( UserDaySchedule );