X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FCalendarDaySchedule;h=bac9a78d4354a4dcf1586d40b098f087e145f53c;hb=05c0b947ddba67a8ac2537c010a583277623ff3e;hp=08e1a51a51c5f7914ecd56730fe68e6db0f346d8;hpb=4f7725315c140dac53d390ec607b8d221166f6ac;p=freeside.git
diff --git a/rt/share/html/Elements/CalendarDaySchedule b/rt/share/html/Elements/CalendarDaySchedule
index 08e1a51a5..bac9a78d4 100644
--- a/rt/share/html/Elements/CalendarDaySchedule
+++ b/rt/share/html/Elements/CalendarDaySchedule
@@ -1,12 +1,100 @@
<%args>
-$Date => undef
-$Tickets => undef
-$DateTypes => undef
-@username => ()
+$Date => undef
+$today => undef
+$Tickets => undef
+$DateTypes => undef
+@username => ()
+$CurrentUser => undef
%args>
+%if ( DateTime->compare( $Date, $today ) == -1 ) {#flag to show the past anyway?
+% #the past already happened...
+%} else {
% foreach my $username ( @username ) {
-<% $username %>---sparkline--*
+% my $mapname = "$username-$date";
+% my $img = "$RT::WebPath/Schedule/UserBar?Username=$username;Date=$date";
+ <% $username %>
+ width = <%$width%>
+ >
+
+
+
% }
+%}
+<%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 );
+use FS::sched_avail; #just for pretty_time
+
+#my( $date, $time ) = split('T', $Date);
+my $date = $Date->strftime('%F');
+
%init>