1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<%args>
$Date => undef
$Tickets => undef
$DateTypes => undef
@username => ()
$CurrentUser => undef
</%args>
% foreach my $username ( @username ) {
% my $mapname = "$username-$date";
% my $img = "$RT::WebPath/Schedule/UserBar?Username=$username;Date=$date";
<span class="calendarright"
><% $username %><img src = "<%$img|n%>"
useMap = "#<%$mapname%>"
height = <%$height%>
width = <%$width%>
></span><br>
<MAP name="<%$mapname%>">
% my %schedule = UserDaySchedule( CurrentUser => $CurrentUser,
% username => $username,
% 'date' => $Date->strftime('%F'),
% );
% #XXX block out unavailable times
%
% #block out / show / color code existing appointments
% foreach my $id ( keys %{ $schedule{'scheduled'} } ) {
% my( $starts, $due, $col, $t ) = @{ $schedule{'scheduled'}->{$id} };
% my $s = int(($starts-$stime)/10);
% my $e = int(($due-$stime)/10)-1;
<AREA
onmouseover = "overlib('<%$id%>: XX miles away<BR>more info', BGCOLOR, '#000000', FGCOLOR, '#<%$col%>')"
onmouseout = "nd(); return true;"
shape = "rect"
coords = "<%$s%>,0,<%$e%>,<%$height-1%>"
%# href = "test_href"
%# alt =
%# title =
>
% }
</MAP>
% }
<%once>
my $stime = RT->Config->Get('CalendarWeeklyStartMin');
$stime = 480 unless $stime =~ /^\d+$/; #8am
my $etime = RT->Config->Get('CalendarWeeklyEndMin');
$etime = 1080 unless $etime =~ /^\d+$/; #6pm
my $width = int( ( $etime - $stime ) / 10 );
my $height = 12; #Schedule/UserBar
</%once>
<%init>
use RTx::Schedule qw( UserDaySchedule );
my( $date, $time ) = split('T', $Date);
</%init>
|