1 <&| /Widgets/TitleBox, class => 'menu'&>
3 % for my $item (@menu) {
4 % if (exists $item->{html}) {
5 <li><%$item->{html} |n%></li>
7 <li><a href="<%RT->Config->Get('WebPath')%><%$item->{url}%>"><%$item->{label}%></a></li>
13 use RT::SavedSearches;
15 { html => '<form method="GET" id="search" action="'
16 . RT->Config->Get('WebPath')
17 . '/m/tickets/search">'
19 . ': <input type="text" name="q" id="q" value=""/>'
20 . '<input type="submit" value="'
24 { label => loc("New ticket"),
25 url => '/m/ticket/select_create_queue',
27 { label => loc("Bookmarked tickets"),
28 url => '/m/tickets/search?name=Bookmarked%20Tickets',
30 { label => loc("Tickets I own"),
31 url => '/m/tickets/search?name=My%20Tickets',
33 { label => loc("Unowned tickets"),
34 url => '/m/tickets/search?name=Unowned%20Tickets',
36 { label => loc("All tickets"),
37 url => '/m/tickets/search?query=id!%3d0&order_by=id&order=DESC'
42 if ( $session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', Object => $RT::System))
45 my @Objects = RT::SavedSearches->new( $session{CurrentUser} )->_PrivacyObjects;
46 push @Objects, RT::System->new( $session{'CurrentUser'} )
47 if $session{'CurrentUser'}->HasRight(
48 Object => $RT::System,
52 foreach my $object (@Objects) {
53 my @searches = $object->Attributes->Named('SavedSearch');
54 foreach my $search (@searches) {
55 next unless $search->SubValue("SearchType") eq 'Ticket';
56 push @menu, { label => $search->Description, url => '/m/tickets/search?query=' . $search->SubValue("Query").'&order='.$search->SubValue("Order").'&order_by='.$search->SubValue("OrderBy") };
61 push @menu, { label => loc("Logout"), url => '/m/logout', }
62 if !RT->Config->Get('WebExternalAuth');