X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FSchedule.html;h=8290472e782761ab748b5ef886d8eff71a203752;hb=01ffb4debe929b4d28f2ff9aee2f2bfc9b67fb47;hp=8a186169530c71e988cf9e7756287aa7cb80d1ce;hpb=9f1a3b2bd30562d52fa9d2d0c7afab08f5efff41;p=freeside.git diff --git a/rt/share/html/Search/Schedule.html b/rt/share/html/Search/Schedule.html index 8a1861695..8290472e7 100644 --- a/rt/share/html/Search/Schedule.html +++ b/rt/share/html/Search/Schedule.html @@ -5,18 +5,84 @@ %} + + + + <& /Search/Calendar.html, @_, + Query => "( Status = 'new' OR Status = 'open' OR Status = 'stalled') + AND ( Type = 'reminder' OR 'Type' = 'ticket' )", + #XXX and we have the magic custom field slots => scalar( @{ $ARGS{username} } ), Embed => 'Schedule.html', + DimPast => 1, Display => 'Schedule', - DisplayArgs => [ username => $ARGS{username} ], + DisplayArgs => [ username => $ARGS{username}, + LengthMin => $LengthMin, + #oops, more freeside abstraction-leaking + custnum => $ARGS{custnum}, + pkgnum => $ARGS{pkgnum}, + ], &> +<%ONCE> + +my $timestep = RT->Config->Get('CalendarWeeklySizeMin') || 30; #1/2h + + <%init> + my @files = (); #if ( ! $initialized ) { push @files, map "overlibmws$_", ( '', qw( _iframe _draggable _crossframe ) ); push @files, map { "${_}contentmws" } qw( iframe ajax ); #%} + +( my $LengthMin = $ARGS{LengthMin} ) =~ /^\d+$/ or die 'non-numeric LengthMin'; + +my $cells = int($LengthMin / $timestep); +$cells++ if $LengthMin % $timestep; +