]> mj.ucw.cz Git - pciids.git/blobdiff - PciIds/Html/Changes.pm
Discuss link below discussion
[pciids.git] / PciIds / Html / Changes.pm
index 433a91c9390563391d444eead4af37f8558ff8ba..57473544d65015e33f36402dbb3d2d146a8173dd 100644 (file)
@@ -15,10 +15,7 @@ sub genNewItemForm( $$$$$$ ) {
        return NOT_FOUND unless( $ok );
        my $prettyAddr = encode( $address->pretty() );
        genHtmlHead( $req, "$prettyAddr - add new item", undef );
-       print "<div class='top'>\n";
-       print "<h1>$prettyAddr - add new item</h1>\n";
-       genLocMenu( $req, $args, [ logItem( $auth ), $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Notifications', 'notifications' ], [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ] ] );
-       print "<div class='clear'></div></div>\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 "<div class='error'>$error</div>\n" if( defined $error );
        print "<form name='newitem' id='newitem' method='POST' action='".( $args->{'full_links'} ? 'http://'.$req->hostname().$req->uri().buildExcept( 'action', $args ).'?action=newitem' : '' )."'>\n<table>";
        genFormEx( [ [ 'input', 'Id:', 'text', 'id', 'maxlength="50"' ],
@@ -66,12 +63,8 @@ sub newItemSubmit( $$$$ ) {
                my( $result, $comName ) = $tables->submitItem( $data, $auth );
                if( $result eq 'exists' ) {
                        genHtmlHead( $req, 'ID collision', undef );
-                       print "<div class='top'>\n";
-                       print '<h1>ID collision</h1>';
                        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 "<div class='clear'></div></div>\n";
+                       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;
@@ -92,10 +85,7 @@ sub genNewHistoryForm( $$$$$$ ) {
        return NOT_FOUND unless( $ok );
        my $prettyAddr = encode( $address->pretty() );
        genHtmlHead( $req, "$prettyAddr - discuss", undef );
-       print "<div class='top'>\n";
-       print "<h1>$prettyAddr - discuss</h1>\n";
-       genLocMenu( $req, $args, [ logItem( $auth ), $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Notifications', 'notifications' ], [ 'Help', 'help', 'newhistory' ] ] );
-       print "<div class='clear'></div></div>\n";
+       genCustomHead( $req, $args, $address, "$prettyAddr - 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='".( $args->{'full_links'} ? 'http://'.$req->hostname().$req->uri().buildExcept( 'action', $args ).'?action=newhistory' : '' )."'>\n<table>";
        genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ],