<%doc> Performs a general search in the database, looking into every field of every table. <%args> $q <%init> my %linksto; my $results; eval { $results = Netdot::Model->search_all_tables($q); }; if ( my $e = $@ ){ $m->comp("/generic/error.mhtml", error=>$e); } my $DEBUG = 0; if ( $DEBUG ) { print "
", Dumper($results), "
"; $m->abort; } my $numtbls = scalar keys %$results;
Netdot General Search % if ( $numtbls ){
Found matches in <% $numtbls %> tables: % }
% if( $numtbls < 1 || ! %$results ) {
No matching records were found.
% } else { % foreach my $tbl ( sort { $a cmp $b } keys %$results ) { % my @objs; % map { push @objs, $results->{$tbl}->{$_} } keys %{ $results->{$tbl} };
<% $tbl %>
 
<& sortresults.mhtml, table => $tbl, object => \@objs, view => "row", withedit => 1 &>
% } # end foreach tbl % } # end else