diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-04-13 02:20:15 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-04-13 02:20:15 -0700 |
commit | cebcd8658ba5f45fc21d59769d591b1418a3fdd2 (patch) | |
tree | 9167012572752c89c1654abfba6909dc47178f40 /rt/share/html/Search | |
parent | afb12da321c052f3628f628e429b59f8ab6453a8 (diff) |
installers (calendaring), RT#16584
Diffstat (limited to 'rt/share/html/Search')
-rw-r--r-- | rt/share/html/Search/Calendar.html | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rt/share/html/Search/Calendar.html b/rt/share/html/Search/Calendar.html index a6df9fc75..d86a5b5cb 100644 --- a/rt/share/html/Search/Calendar.html +++ b/rt/share/html/Search/Calendar.html @@ -205,7 +205,7 @@ $slots => $default_slots % my($m, $h) = ($Ticket->$meth->Localtime('user'))[1,2]; % my $tod = $h*60 + $m; % -% RTx::Calendar::LocalDate($Ticket->$meth->Unix) eq $date->strftime('%F') #today +% LocalDate($Ticket->$meth->Unix) eq $date->strftime('%F') #today % && $tod >= $row && $tod < ($row+$timestep); #and in timeslot % } keys %DateTypes; % next unless keys %dt; @@ -265,9 +265,10 @@ $slots => $default_slots % if ( defined($Display) && $Display =~ /^(\w+)$/ ) { % % my $el = "/Elements/CalendarDay$1"; - <& $el, Tickets => $Tickets{$date->strftime("%F")}, - Date => $date, - DateTypes => \%DateTypes, + <& $el, CurrentUser => $session{CurrentUser}, + Tickets => $Tickets{$date->strftime("%F")}, + Date => $date, + DateTypes => \%DateTypes, @DisplayArgs, &> % @@ -397,7 +398,8 @@ while ( $wt < $etime ) { push @week_rows, $wt; $wt+=$timestep } </%ONCE> <%INIT> -use RTx::Calendar qw(FirstDay LastDay LastDayOfWeek); +use RTx::Calendar qw( FirstDay LastDay LastDayOfWeek DatesClauses LocalDate + SearchDefaultCalendar FindTickets ); $Embed =~ /^[\w\.]*$/ or die 'xss'; @@ -468,7 +470,7 @@ my $TempQuery = "( Status = 'new' OR Status = 'open' OR Status = 'stalled') AND ( Owner = '" . $session{CurrentUser}->Id ."' OR Owner = 'Nobody' ) AND ( Type = 'reminder' OR 'Type' = 'ticket' )"; -if ( my $Search = RTx::Calendar::SearchDefaultCalendar($session{CurrentUser}) ) { +if ( my $Search = SearchDefaultCalendar($session{CurrentUser}) ) { $TempFormat = $Search->SubValue('Format'); $TempQuery = $Search->SubValue('Query'); } @@ -483,11 +485,11 @@ my @Dates = grep { $TempFormat =~ m/__${_}(Relative)?__/ } @DateTypes; # used to display or not a date in Element/CalendarEvent my %DateTypes = map { $_ => 1 } @Dates; -$TempQuery .= RTx::Calendar::DatesClauses(\@Dates, $start->strftime("%F"), $end->strftime("%F")); +$TempQuery .= DatesClauses(\@Dates, $start->strftime("%F"), $end->strftime("%F")); # print STDERR ("-" x 30), "\n", $TempQuery, "\n"; -my %Tickets = RTx::Calendar::FindTickets($session{'CurrentUser'}, $TempQuery, \@Dates, $start->strftime("%F"), $end->strftime("%F")); +my %Tickets = FindTickets($session{'CurrentUser'}, $TempQuery, \@Dates, $start->strftime("%F"), $end->strftime("%F")); </%INIT> <%def td_week_expand> |