X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FHtml%2FChanges.pm;h=57473544d65015e33f36402dbb3d2d146a8173dd;hb=5342f8673c7aedc4d43f2fad44729e1b1d626b41;hp=e2899f65abcd0224335d5cb48d7b0d06dbeb8a25;hpb=cdd0c847d6567e79c09dae0a47f8d85603089e61;p=pciids.git diff --git a/PciIds/Html/Changes.pm b/PciIds/Html/Changes.pm index e2899f6..5747354 100644 --- a/PciIds/Html/Changes.pm +++ b/PciIds/Html/Changes.pm @@ -15,12 +15,9 @@ sub genNewItemForm( $$$$$$ ) { return NOT_FOUND unless( $ok ); my $prettyAddr = encode( $address->pretty() ); genHtmlHead( $req, "$prettyAddr - add new item", undef ); - print "
\n"; - print "

$prettyAddr - add new item

\n"; - genLocMenu( $req, $args, [ logItem( $auth ), $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Notifications', 'notifications' ], [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ] ] ); - print "
\n"; + genCustomHead( $req, $args, $address, "$prettyAddr - 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"; + print "hostname().$req->uri().buildExcept( 'action', $args ).'?action=newitem' : '' )."'>\n
"; genFormEx( [ [ 'input', 'Id:', 'text', 'id', 'maxlength="50"' ], [ 'input', 'Name:', 'text', 'name', 'maxlength="200"' ], [ 'input', 'Note*:', 'text', 'note', 'maxlength="1024"' ], @@ -66,12 +63,8 @@ sub newItemSubmit( $$$$ ) { my( $result, $comName ) = $tables->submitItem( $data, $auth ); if( $result eq 'exists' ) { genHtmlHead( $req, 'ID collision', undef ); - print "
\n"; - print '

ID collision

'; my $addr = PciIds::Address::new( $req->uri() ); - genCustomMenu( $req, $addr, $args, [ logItem( $auth ), [ 'Add other item', 'newitem' ], $addr->canDiscuss() ? [ 'Discuss', 'newhistory' ] : () ] ); - genPath( $req, $data->{'address'}, 1 ); - print "
\n"; + 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; @@ -92,12 +85,9 @@ sub genNewHistoryForm( $$$$$$ ) { return NOT_FOUND unless( $ok ); my $prettyAddr = encode( $address->pretty() ); genHtmlHead( $req, "$prettyAddr - discuss", undef ); - print "

\n"; - print "

$prettyAddr - discuss

\n"; - genLocMenu( $req, $args, [ logItem( $auth ), $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Notifications', 'notifications' ], [ 'Help', 'help', 'newhistory' ] ] ); - print "
\n"; + genCustomHead( $req, $args, $address, "$prettyAddr - discuss", [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Help', 'help', 'newhistory' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] ); print "
$error
\n" if( defined $error ); - print "\n
"; + print "hostname().$req->uri().buildExcept( 'action', $args ).'?action=newhistory' : '' )."'>\n
"; genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ], [ 'input', 'Request deletion', 'checkbox', 'delete', 'value="delete"' ], [ 'input', 'Name:', 'text', 'name', 'maxlength="200"' ],