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 "<div class='error'>$error</div>\n" if( defined $error );
print "<form name='admin' id='admin' class='admin' method='POST' action=''>\n";
my $lastId;
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 "<div class='error'>$error</div>\n" if( defined $error );
print "<form name='newitem' id='newitem' method='POST' action=''>\n<table>";
genFormEx( [ [ 'input', 'ID:', 'text', 'id', 'maxlength="'.$address->subIdSize().'"' ],
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 '<p>Sorry, this ID already exists.';
genHtmlTail();
return OK;
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 "<div class='error'>$error</div>\n" if( defined $error );
print "<form name='newhistory' id='newhistory' method='POST' action=''>\n<table>";
genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ],
my $id = $address->top()->pretty();
genHtmlHead( $req, $id, "<style type='text/css' media='screen,print'>col.id-col { width: ".$address->subIdSize()*1.25."ex; }</style>\n" );
print "<div class='top'>\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 '<div class="bluesquare"><h1>The PCI ID Repository</h1><p class="home">The home of the <code>pci.ids</code> file</div>';
print "<div class='clear'></div></div>\n";
genPath( $req, $address, 0 );