2 <div style="font-weight: bold; vertical-align: bottom; text-align: left">
3 % if ( $UnrepliedTickets->Count > 0 ) {
4 <a href="<% $fsurl %>rt/Search/UnrepliedTickets.html">
5 <div class="dot" style="background-color: green"></div>
6 <% emt('New activity on [quant,_1,ticket]', $UnrepliedTickets->Count) %>
9 <% emt('No new activity on tickets') %>
14 use Class::Load 'load_class';
16 my $enabled = $FS::TicketSystem::system eq 'RT_Internal';
17 $enabled = 0 unless $FS::CurrentUser::CurrentUser->access_right('RT activity notification');
20 my $class = 'RT::Search::UnrepliedTickets';
22 my $session = eval { FS::TicketSystem->session; };
24 my $CurrentUser = $session->{CurrentUser};
25 # if there are no tickets the current user could see, always hide it
26 my $AnyTickets = RT::Tickets->new($CurrentUser);
27 foreach my $status (qw(resolved rejected deleted)) {
28 $AnyTickets->RT::SearchBuilder::Limit(
31 ENTRYAGGREGATOR => 'AND',
35 $enabled = 0 if $AnyTickets->Count == 0;
37 $UnrepliedTickets = RT::Tickets->new($CurrentUser);
38 my $search = $class->new(TicketsObj => $UnrepliedTickets);