<%doc>
Generic Browse function

</%doc>

<%args>
$table  => undef
</%args>

<%attr>
title   => 'Browse' 
section => 'Generic'
</%attr>

<%init>
my $MAX    = 20;
my $WIDTH  = 2;

</%init>

<div id="sectiondetail">

% if ( ! $table ) {
%   my( @t );
%   @t = $ui->meta->get_tables();
    <& table.mhtml, width => $WIDTH, link => "browse.html", title => "Please select a table to browse:" &>
% } else {
%   my @r = $table->retrieve_all();

<div class="container">
    <div class="containerhead"><% $table %> ( <% scalar (@r) %> records)</div>
    <div class="containerbody">
    <& sortresults.mhtml, table => $table, object => \@r, view => "row", withedit=>1, return_args=>"?table=$table" &>
    </div>
</div>
% }

</div>
