]> mj.ucw.cz Git - pciids.git/commitdiff
Move the jump bar below pages & add footer
authorMichal Vaner <vorner@ucw.cz>
Sat, 4 Oct 2008 22:06:28 +0000 (00:06 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sat, 4 Oct 2008 22:06:28 +0000 (00:06 +0200)
PciIds/Html/Admin.pm
PciIds/Html/Changes.pm
PciIds/Html/Help.pm
PciIds/Html/Jump.pm
PciIds/Html/List.pm
PciIds/Html/Notifications.pm
PciIds/Html/Users.pm
PciIds/Html/Util.pm

index b142e05c381905db468c8fa4f81f170170306a51..8f344ec6b97ef3981674895433a4eeb1c05f4f71 100644 (file)
@@ -194,7 +194,7 @@ function answer( id ) {
                print "<p>No pending items.\n";
        }
        print "</form>\n";
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
index e839ab674c7fad1c2366dbdae0019b9ea9557c34..658db0fafcc1a3b1ec3b057d100c20ae29ba0b58 100644 (file)
@@ -52,7 +52,7 @@ sub genNewItemForm( $$$$$$ ) {
        If there is something you want to clarify about the item, you can use note (like the ID does not belong to people using it).
        Discussion is for things more relevant to history of the item than the real device (like information source).
        Both note and discussion is optional.';
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
@@ -94,7 +94,7 @@ sub newItemSubmit( $$$$ ) {
                        my $addr = PciIds::Address::new( $req->uri() );
                        genCustomHead( $req, $args, $addr, 'ID collision', [ [ 'Add other item', 'newitem' ], $addr->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), ], [ logItem( $auth ) ] );
                        print '<p>Sorry, this ID already exists.';
-                       genHtmlTail();
+                       genHtmlFooter( 0, undef, undef );
                        return OK;
                } elsif( $result ) {
                        return genNewItemForm( $req, $args, $auth, $tables, $result, $data );
@@ -137,7 +137,7 @@ sub genNewHistoryForm( $$$$$$ ) {
        You must provide at last name or discussion or deletion request.
 <p>
        If you provide note, you must provide name too.';
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
index 42cc8387afe9fcea872bfd3106fd3a82cb14e0c8..90966644a179b63fd667a458907532b6a22e0c10 100644 (file)
@@ -49,7 +49,7 @@ sub getHelp( $$ ) {
                print $line;
        }
        close HELP;
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
index 0e37bc58c3122aa3a151b06f7be68a13307c6509..4ebcc8f4c3be5b733ccf249bf156c20dc1cbae37 100644 (file)
@@ -83,7 +83,7 @@ sub jump( $$$$ ) {
                        genHtmlHead( $req, 'Search results', undef );
                        print "<div class='top'>\n";
                        print "<h1>Search results</h1>\n";
-                       genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'jump' ], [ '', 'jump' ] ] );
+                       genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'jump' ] ] );
                        print "<div class='clear'></div>\n";
                        print "</div>\n";
                        genPath( $req, $address, 1 );
@@ -97,7 +97,7 @@ sub jump( $$$$ ) {
                                return "<a href='$prefix".$address->get()."$suffix'>".encode( $address->fullPretty() )."</a>";
                        } ], sub { 1; }, sub { ' class="item"'; } );
                        genTableTail();
-                       genHtmlTail();
+                       genHtmlFooter( 1, $req, $args );
                        return OK;
                }
        }
index 1724445c96b9b4fccc794bd25b4b367ba283876f..b2f3df058e57f9050306c5c4643baf68133236c5 100644 (file)
@@ -96,7 +96,7 @@ sub list( $$$$ ) {
                genTableTail();
                print "<p><a href='".buildExcept( 'action', $args )."?action=newitem'>Add item</a>\n";
        }
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
index 1f673dbf5a6a5f0916e7f2565bc615c183de4556..c8cc15c0dd4f73d53fe46f2d5feb8a3ae419978e 100644 (file)
@@ -64,7 +64,7 @@ sub genNotifForm( $$$$$$ ) {
                }
                print "</ul></div>\n";
        }
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }
 
index dab07004e576dc5a0f69a782d092d4b7c4bd6225..99df698c2dd7c1ed9c8e0e729bed04b9d164a62c 100644 (file)
@@ -44,7 +44,7 @@ sub genRegisterForm( $$$$ ) {
        genForm( [ [ 'Email:', 'text', 'email', 'maxlength="255"' ],
                [ '', 'submit', 'register', 'value="Register"' ] ], $values );
        print '</table></form>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -84,7 +84,7 @@ sub registerSubmit( $$$ ) {#A registration form has been submited
        print '<p>
                        An email containing further information has been sent to you.
                        Please follow these instruction to finish the registration process.';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -102,7 +102,7 @@ sub genConfirmForm( $$$$ ) {
                [ 'Confirm password:', 'password', 'confirm_password' ],
                [ '', 'submit', 'register', 'value=Register' ] ], $values );
        print '</table></form>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -115,7 +115,7 @@ sub usedAddress( $$ ) {
                        An account for this address is already registered.
                        Please, reset or remember your password or start again with a different address.
                </div>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return 0;
 }
 
@@ -129,7 +129,7 @@ sub checkRegHash( $$$$$ ) {
                                This registration request is invalid.
                                Are you sure you got it from the registration email?
                        </div>';
-               genHtmlTail();
+               genHtmlFooter( 0, undef, undef );
                return 0;
        } elsif( $tables->hasEmail( $email ) ) {
                return usedAddress( $req, $args );
@@ -180,7 +180,7 @@ sub confirmSubmit( $$$ ) {
        genCustomHead( $req, $args, PciIds::Address::new( $req->uri() ), 'Registered', [ [ 'Help', 'help', 'account' ] ], [ [ 'Log in', 'login' ] ] );
        print '<p>
                        You have registered successfully.';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -195,7 +195,7 @@ sub genLoginForm( $$$$ ) {
                [ 'Password:', 'password', 'password' ],
                [ '', 'submit', 'login', 'value="Login"' ] ], $values );
        print '</table></form>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -268,7 +268,7 @@ sub genResetPasswdForm( $$$$ ) {
        genForm( [ [ 'Email:', 'text', 'email', 'maxlength="255"' ],
                [ '', 'submit', 'respass', 'value="Send"' ] ], $values );
        print '</table></form>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -297,7 +297,7 @@ sub resetPasswdFormSubmit( $$$ ) {
                genHtmlHead( $req, 'Reset password', undef );
                genCustomHead( $req, $args, PciIds::Address::new( $req->uri() ), 'Reset password', [ [ 'Help', 'help', 'account' ] ], [ [ 'Log in', 'login' ] ] );
                print "<p>An email with information has been sent to your address.\n";
-               genHtmlTail();
+               genHtmlFooter( 0, undef, undef );
                return OK;
        } else {
                $error = '<p>This email address is not registered. Check it for typos or register it.';
@@ -319,7 +319,7 @@ sub genResetPasswdConfigForm( $$$$$$ ) {
        print "</table>";
        print "<input type='hidden' name='email' value='".encode( $email )."'><input type='hidden' name='hash' value='".encode( $hash )."'>\n";
        print "</form>\n";
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
@@ -337,7 +337,7 @@ sub resetPasswdConfirmForm( $$$$ ) {
                print "<h1>Reset password</h1>\n";
                print "<p>Provided link is not valid. Did you use it already?\n";
                print "<p>You can get a <a href='".$req->uri()."?action=respass'>new one</a>.\n";
-               genHtmlTail();
+               genHtmlFooter( 0, undef, undef );
                return OK;
        }
 }
@@ -362,7 +362,7 @@ sub resetPasswdConfirmFormSubmit( $$$ ) {
                        genHtmlHead( $req, 'Reset password', undef );
                        genCustomHead( $req, $args, PciIds::Address::new( $req->uri() ), 'Reset password', [ [ 'Help', 'help', 'account' ] ], [ [ 'Log in', 'login' ] ] );
                        print "<p>Your password was successfuly changed.\n";
-                       genHtmlTail();
+                       genHtmlFooter( 0, undef, undef );
                        return OK;
                } else {
                        return genResetPasswdConfigForm( $req, $args, $error, $data, $email, $hash );
@@ -390,7 +390,7 @@ sub genProfileForm( $$$$$$ ) {
                [ 'Xmpp batch time (min):', 'text', 'xmpp_time', 'maxlength="10"' ],
                [ '', 'submit', 'profile', 'value="Submit"' ] ], $data );
        print '</table></form>';
-       genHtmlTail();
+       genHtmlFooter( 0, undef, undef );
        return OK;
 }
 
index 6668ac01a016bb92ca27f3dd379a187bea051191..32173f2cd4a52e7d8cb294dca23578df97e1b69f 100644 (file)
@@ -25,7 +25,7 @@ use PciIds::Users;
 use Apache2::Const qw(:common :http);
 use APR::Table;
 
-our @EXPORT = qw(&genHtmlHead &htmlDiv &genHtmlTail &genTableHead &genTableTail &parseArgs &buildExcept &buildArgs &genMenu &genCustomMenu &encode &setAddrPrefix &HTTPRedirect &genPath &logItem &genLocMenu &genCustomHead &genPathBare &protoName);
+our @EXPORT = qw(&genHtmlHead &htmlDiv &genHtmlTail &genTableHead &genTableTail &parseArgs &buildExcept &buildArgs &genMenu &genCustomMenu &encode &setAddrPrefix &HTTPRedirect &genPath &logItem &genLocMenu &genCustomHead &genPathBare &protoName &genHtmlFooter);
 
 sub encode( $ ) {
        return encode_entities( shift, "\"'&<>" );
@@ -53,6 +53,30 @@ sub genHtmlTail() {
        print '</body></html>';
 }
 
+sub genHtmlFooter( $$$ ) {
+       my( $jump, $req, $args ) = @_;
+       if( $jump ) {
+               require PciIds::Html::Jump;
+               PciIds::Html::Jump::jumpWindow( $req, $args );
+       }
+       print '<hr>
+<table width="100%">
+<tr>
+<td>
+Maintained by <a href="http://mj.ucw.cz/">Martin Mares</a> and <a href="http://vorner.pretel.cz/">Michal
+Vaner</a> with great help by volunteers from the <a href="http://www.sourceforge.net/projects/pciids/">pciids project</a>
+at <a href="http://www.sourceforge.net/">SourceForge</a>.
+</td><td rowspan=2>
+<a href="http://www.anybrowser.org/campaign/"><img src="/static/anybrowser.png" width=88 height=31 alt="Best viewed with any browser."></a>
+</td><td rowspan=2>
+<a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=35833" width="88" height="31" border="0" alt="SourceForge"></a>
+</td></tr>
+<tr><td><span style="display: block">No counters, no frames, no syntax
+errors.</span></td></tr>
+</table>
+</div>';
+}
+
 sub htmlDiv( $$ ) {
        my( $class, $text ) = @_;
        return '<div class="'.$class.'">'.$text.'</div>';