1 <& elements/browse.html,
2 'title' => 'My saved searches',
3 'name' => 'saved searches',
4 'query' => { 'table' => 'saved_search',
5 'hashref' => { usernum => $curuser->usernum },
7 'count_query' => $count_query,
16 'sort_fields' => [ 'searchnum',
21 "path || '?' || 'params'",
24 'fields' => [ 'searchnum',
27 sub { my $date = shift->get('last_sent');
28 $date ? time2str('%b %o, %Y', $date) : '';
30 sub { $format_label{ shift->get('format') }
35 map { encode_entities(uri_unescape($_)) }
36 split(/[;&]/, shift->get('params') )
48 'links' => [ '', '' ],
49 'link_onclicks' => [ '', $edit_popup ],
50 # 'disableable' => 1, # currrently unused
51 # 'disabled_statuspos' => 2,
52 'really_disable_download' => 1
56 my $curuser = $FS::CurrentUser::CurrentUser;
59 'table' => 'saved_search',
60 'hashref' => { 'usernum' => $curuser->usernum },
62 my $count_query = "SELECT COUNT(*) FROM saved_search WHERE usernum = ".
68 'xls' => 'spreadsheet',
71 my $edit_popup = sub {
72 my $searchnum = shift->searchnum;
73 include('/elements/popup_link_onclick.html',
74 'action' => $fsurl.'/edit/saved_search.html?'.$searchnum,
75 'actionlabel' => 'Save this search',