From dce3726b4319da052952f95d94fb1cc7e0f95e22 Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Sat, 4 Oct 2008 22:48:36 +0200 Subject: [PATCH] Remove jump action from menu --- PciIds/Html/Admin.pm | 2 +- PciIds/Html/Changes.pm | 6 +++--- PciIds/Html/List.pm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PciIds/Html/Admin.pm b/PciIds/Html/Admin.pm index 95a7d05..b142e05 100644 --- a/PciIds/Html/Admin.pm +++ b/PciIds/Html/Admin.pm @@ -113,7 +113,7 @@ sub genNewAdminForm( $$$$$ ) { my $glob = delete $args->{'global'}; 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' ] ] ); + 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' ] ], [ [ 'Log out', 'logout' ] ] ); print "
$error
\n" if( defined $error ); print "
\n"; my $lastId; diff --git a/PciIds/Html/Changes.pm b/PciIds/Html/Changes.pm index 6033094..e839ab6 100644 --- a/PciIds/Html/Changes.pm +++ b/PciIds/Html/Changes.pm @@ -32,7 +32,7 @@ sub genNewItemForm( $$$$$$ ) { my( $ok, $parent, $name, $note, $address ) = loadItem( $tables, $req->uri() ); return NOT_FOUND unless( $ok ); genHtmlHead( $req, "Add new item", undef ); - genCustomHead( $req, $args, $address, "Add new item", [ $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); + genCustomHead( $req, $args, $address, "Add new item", [ $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); print "
$error
\n" if( defined $error ); print "\n"; genFormEx( [ [ 'input', 'ID:', 'text', 'id', 'maxlength="'.$address->subIdSize().'"' ], @@ -92,7 +92,7 @@ sub newItemSubmit( $$$$ ) { if( $result eq 'exists' ) { genHtmlHead( $req, 'ID collision', undef ); my $addr = PciIds::Address::new( $req->uri() ); - genCustomHead( $req, $args, $addr, 'ID collision', [ [ 'Add other item', 'newitem' ], $addr->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ '', 'jump' ] ], [ logItem( $auth ) ] ); + genCustomHead( $req, $args, $addr, 'ID collision', [ [ 'Add other item', 'newitem' ], $addr->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), ], [ logItem( $auth ) ] ); print '

Sorry, this ID already exists.'; genHtmlTail(); return OK; @@ -113,7 +113,7 @@ sub genNewHistoryForm( $$$$$$ ) { my( $ok, $parent, $name, $note, $address ) = loadItem( $tables, $req->uri() ); return NOT_FOUND unless( $ok ); genHtmlHead( $req, "Discuss", undef ); - genCustomHead( $req, $args, $address, "Discuss", [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Help', 'help', 'newhistory' ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); + genCustomHead( $req, $args, $address, "Discuss", [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Help', 'help', 'newhistory' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); print "

$error
\n" if( defined $error ); print "\n
"; genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ], diff --git a/PciIds/Html/List.pm b/PciIds/Html/List.pm index 6eeb6b2..1724445 100644 --- a/PciIds/Html/List.pm +++ b/PciIds/Html/List.pm @@ -43,7 +43,7 @@ sub list( $$$$ ) { my $id = $address->top()->pretty(); genHtmlHead( $req, $id, "\n" ); print "
\n"; - genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'list' ], $address->helpName() ? [ 'ID syntax', 'help', $address->helpName() ] : (), [ '', 'jump' ] ] ); + genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'list' ], $address->helpName() ? [ 'ID syntax', 'help', $address->helpName() ] : () ] ); print '

The PCI ID Repository

The home of the pci.ids file

'; print "
\n"; genPath( $req, $address, 0 ); -- 2.39.2