diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-04-12 12:29:18 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-04-12 12:29:18 -0700 |
commit | d1bfdbf97b2950f5f6ccb1255db387479d483955 (patch) | |
tree | 9756f90c12b90c15e47e14866287c5747a33abd3 /rt/share/html/Schedule | |
parent | b3cecd1976e92c32740c3e2e1227a7d718e07b57 (diff) |
installers (calendaring), RT#16584
Diffstat (limited to 'rt/share/html/Schedule')
-rw-r--r-- | rt/share/html/Schedule/UserBar | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/rt/share/html/Schedule/UserBar b/rt/share/html/Schedule/UserBar new file mode 100644 index 000000000..5e834a023 --- /dev/null +++ b/rt/share/html/Schedule/UserBar @@ -0,0 +1,39 @@ +<%perl> + +use GD; + +my $im = new GD::Image($width, $height) or die; + +my $white = $im->colorAllocate(255,255,255); +my $black = $im->colorAllocate(0,0,0); + +# Put a black frame around the picture +$im->rectangle(0,0,$width-1,$height-1,$black); + +#XXX block out unavailable times +#alas. abstractions break, freeside-specific stuff to get availability +# move availability to RT side? make it all callback/pluggable? + +#XXX block out / show / color code existing appointments + +$r->content_type('image/png'); +$m->clear_buffer; +$m->out($im->png); +$m->abort; + +</%perl> +<%args> +$Username => undef +$Date => undef +</%args> +<%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 = ( $etime - $stime ) / 10; +my $height = 12; + +</%once> |