+% #disableable handling
+% my $posttotal = '';
+% if ( $opt{disableable} ) {
+%
+% my $name= $opt{'name_singular'} ? PL($opt{'name_singular'}) : $opt{'name'};
+%
+% if ( $cgi->param('showdisabled') ) {
+% $cgi->param('showdisabled', 0);
+% $posttotal= '( <a href="'. $cgi->self_url. '">'.
+% "hide disabled $name</a> )";
+% $cgi->param('showdisabled', 1);
+% } else {
+% $cgi->param('showdisabled', 1);
+% $posttotal= '( <a href="'. $cgi->self_url. '">'.
+% "show disabled $name</a> )";
+% $cgi->param('showdisabled', 0);
+% }
+%
+% if ( $cgi->param('showdisabled') ) {
+%
+% my $offset = $opt{disableable};
+%
+% splice @{ $opt{header} }, $offset, 0, 'Status';
+%
+% splice @{ $opt{fields} }, $offset, 0,
+% sub { shift->disabled ? 'DISABLED' : 'Active' };
+%
+% if ( $opt{links} && scalar( @{ $opt{links} } ) ) {
+% splice @{ $opt{links} }, $offset, 0, '';
+% }
+%
+% if ( $opt{align} && scalar( @{ $opt{align} } ) ) {
+% splice @{ $opt{align} }, $offset, 0, 'center';
+% }
+%
+% unless ( $opt{color} && scalar( @{ $opt{color} } ) ) {
+% #$opt{color} = [ map { '000000'; } @{$opt{header}} ];
+% $opt{color} = [ map { ''; } @{$opt{header}} ];
+% }
+% splice @{ $opt{color} }, $offset, 0,
+% sub { shift->disabled ? 'FF0000' : '00CC00'; };
+%
+% if ( $opt{size} && scalar( @{ $opt{size} } ) ) {
+% splice @{ $opt{size} }, $offset, 0, '';
+% }
+%
+% unless ( $opt{style} && scalar( @{ $opt{style} } ) ) {
+% $opt{style} = [ map { ''; } @{$opt{header}} ];
+% }
+% splice @{ $opt{style} }, $offset, 0, 'b';
+%
+% }
+%
+% }
+%