From: Ivan Kohler Date: Sat, 12 Apr 2014 19:29:23 +0000 (-0700) Subject: installers (calendaring), RT#16584 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3741fe34d3a6d1daa216ee460e9fd3c79c7e480e installers (calendaring), RT#16584 --- diff --git a/htetc/freeside-rt.conf b/htetc/freeside-rt.conf index 71ebfbd0b..bcc5de3bd 100644 --- a/htetc/freeside-rt.conf +++ b/htetc/freeside-rt.conf @@ -84,3 +84,9 @@ PerlHandler HTML::Mason PerlHandler HTML::Mason + + +SetHandler perl-script +PerlHandler HTML::Mason + + diff --git a/rt/share/html/Elements/CalendarDaySchedule b/rt/share/html/Elements/CalendarDaySchedule index 08e1a51a5..0f9f9092e 100644 --- a/rt/share/html/Elements/CalendarDaySchedule +++ b/rt/share/html/Elements/CalendarDaySchedule @@ -5,8 +5,28 @@ $DateTypes => undef @username => () % foreach my $username ( @username ) { -<% $username %>---sparkline--*
+% my $mapname = "$username-$date"; +<% $username %>
+ +%# false laziness w/Schedule/UserBar +%#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 +% ++%# + % } <%init> +my( $date, $time ) = split('T', $Date); + diff --git a/rt/share/html/NoAuth/css/calendar.css b/rt/share/html/NoAuth/css/calendar.css index 14cbabc73..96241e73f 100644 --- a/rt/share/html/NoAuth/css/calendar.css +++ b/rt/share/html/NoAuth/css/calendar.css @@ -37,6 +37,7 @@ color:#505050; } .calendarright { + text-align: right; float: right; } 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; + + +<%args> +$Username => undef +$Date => undef + +<%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; + + diff --git a/rt/share/html/Search/Calendar.html b/rt/share/html/Search/Calendar.html index e6282b58a..c425751ff 100644 --- a/rt/share/html/Search/Calendar.html +++ b/rt/share/html/Search/Calendar.html @@ -82,7 +82,7 @@ $DayDisplay => undef > % for ( @{$week{$weekstart}} ) { -><%$rtdate->GetWeekday($_)%> +><%$rtdate->GetWeekday($_)%> % } diff --git a/rt/share/html/Search/Schedule.html b/rt/share/html/Search/Schedule.html index 12d268500..bbbfffdc9 100644 --- a/rt/share/html/Search/Schedule.html +++ b/rt/share/html/Search/Schedule.html @@ -1,5 +1,10 @@ <& /Elements/Header, Title => 'Schedule' &> +%#init_overlib.html +%foreach my $file (@files) { + +%} + <& /Search/Calendar.html, @_, Embed => 'Schedule.html', @@ -7,3 +12,10 @@ DayDisplayArgs => [ username => $ARGS{username} ], &> +<%init> +my @files = (); +#if ( ! $initialized ) { + push @files, map "overlibmws$_", ( '', qw( _iframe _draggable _crossframe ) ); + push @files, map { "${_}contentmws" } qw( iframe ajax ); +#%} +