From e37ff106250d42d593a77f8ed9676adac5379a2e Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Thu, 4 Sep 2008 12:05:09 +0200 Subject: [PATCH] Admin button for more items --- PciIds/Html/Admin.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PciIds/Html/Admin.pm b/PciIds/Html/Admin.pm index 4002888..ea8cf9a 100644 --- a/PciIds/Html/Admin.pm +++ b/PciIds/Html/Admin.pm @@ -54,12 +54,14 @@ sub genNewAdminForm( $$$$$ ) { my( $req, $args, $tables, $error, $auth ) = @_; my $address = PciIds::Address::new( $req->uri() ); my $prefix = $address->get(); - my $limit = $args->{'limit'}; + my $limit = delete $args->{'limit'}; $prefix = '' if( $args->{'global'} ); my $caption = 'Administration '.( $args->{'global'} ? '(Global)' : '('.encode( $address->pretty() ).')' ); genHtmlHead( $req, $caption, undef ); my $glob = delete $args->{'global'}; - genCustomHead( $req, $args, $address, $caption, [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), $glob ? [ 'Local', 'admin' ] : [ 'Global', 'admin?global=1' ], [ 'Help', 'help', 'admin' ], [ '', 'jump' ] ], [ [ 'Log out', 'logout' ] ] ); + my $moreButt = 'admin?limit='.( $limit ? int( $limit * 2 ) : 160 ).buildExcept( 'action', $args ); + $moreButt .= '?global='.$glob if defined $glob; + genCustomHead( $req, $args, $address, $caption, [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), $glob ? [ 'Local', 'admin'.buildExcept( 'action', $args ) ] : [ 'Global', 'admin?global=1'.buildExcept( 'action', $args ) ], [ 'More items', $moreButt ], [ 'Help', 'help', 'admin' ], [ '', 'jump' ] ], [ [ 'Log out', 'logout' ] ] ); print "
$error
\n" if( defined $error ); print "
\n"; my $lastId; -- 2.39.2