]> mj.ucw.cz Git - pciids.git/blobdiff - PciIds/Html/Help.pm
Merge branch 'master' of /home/vorner/pciids
[pciids.git] / PciIds / Html / Help.pm
index 8c65bad4ba759f86d2a0cf089ed11534bbdff345..586ed66914b373fdd0560fb8eb3b99d4ee7e8a6b 100644 (file)
@@ -1,3 +1,21 @@
+#      PciIds web database
+#      Copyright (C) 2008 Michal Vaner (vorner@ucw.cz)
+#
+#      This program is free software; you can redistribute it and/or modify
+#      it under the terms of the GNU General Public License as published by
+#      he Free Software Foundation; either version 2 of the License, or
+#      (at your option) any later version.
+#
+#      This program is distributed in the hope that it will be useful,
+#      but WITHOUT ANY WARRANTY; without even the implied warranty of
+#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#
+#      GNU General Public License for more details.
+#
+#      You should have received a copy of the GNU General Public License
+#      along with this program; if not, write to the Free Software
+#      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 package PciIds::Html::Help;
 use strict;
 use warnings;
@@ -18,19 +36,21 @@ sub getHelp( $$ ) {
        chomp $head;
        genHtmlHead( $req, $head, undef );
        my $addr = PciIds::Address::new( $req->uri() );
-       print "<h1>$head (".$addr->pretty().")</h1>\n";
-       genMenu( $req, $addr, $args, $auth, undef );
+       print "<div class='top'>\n";
+       genMenu( $req, $addr, $args, $auth, [ ( $helpname eq 'index' ) ? () : [ 'Help index', 'help', 'index' ] ] );
+       print "<div class='bluesquare'><h1>$head</h1><p class='home'>The PCI ID Repository</div>\n";
+       print "<div class='clear'></div></div>\n";
        genPath( $req, $addr, 1 );
        my $url = setAddrPrefix( $req->uri(), 'read' ).buildExcept( 'help', $args ).'?help=';
        delete $args->{'help'};
        my %repls = ( 'HELP_URL' => $url, 'AC_URL' => setAddrPrefix( $req->uri(), 'mods' ).buildExcept( 'action', $args ).'?action=' );
-       print "<div class='navigation'><ul><li><a href='${url}index'>Help index</a></ul></div>\n" if( $helpname ne 'index' );
+       $repls{'AC_URL'} =~ s#mods/\?#mods/PC/?#;
        while( defined( my $line = <HELP> ) ) {
                $line =~ s/\$(\w+_URL)\$/$repls{$1}/g;
                print $line;
        }
        close HELP;
-       genHtmlTail();
+       genHtmlFooter( 1, $req, $args );
        return OK;
 }