X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FHtml%2FHelp.pm;h=add3f01c79b573c424f4827b9c3aba6c5f62c7cc;hb=904a25d66ec221203148aa1559b5d062860788ce;hp=0911a421bd0d6c84599c6d7d9351aa142fbb180a;hpb=35cd090a08351c1190cff58a6ba446d3f4634775;p=pciids.git diff --git a/PciIds/Html/Help.pm b/PciIds/Html/Help.pm index 0911a42..add3f01 100644 --- a/PciIds/Html/Help.pm +++ b/PciIds/Html/Help.pm @@ -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; @@ -19,19 +37,21 @@ sub getHelp( $$ ) { genHtmlHead( $req, $head, undef ); my $addr = PciIds::Address::new( $req->uri() ); print "
\n"; - print "

$head".( defined $addr ? " (".$addr->pretty().")" : "" )."

\n"; - genMenu( $req, $addr, $args, $auth, [ [ 'Help index', 'help', 'index' ] ] ); + genMenu( $req, $addr, $args, $auth, [ ( $helpname eq 'index' ) ? () : [ 'Help index', 'help', 'index' ] ] ); + print "

$head

The PCI ID Repository

\n"; print "
\n"; genPath( $req, $addr, 1 ); - my $url = setAddrPrefix( $req->uri(), 'read' ).buildExcept( 'help', $args ).'?help='; + my $url = setAddrPrefix( $req->uri(), 'mods' ).buildExcept( 'help', $args ).'?help='; delete $args->{'help'}; my %repls = ( 'HELP_URL' => $url, 'AC_URL' => setAddrPrefix( $req->uri(), 'mods' ).buildExcept( 'action', $args ).'?action=' ); + $repls{'AC_URL'} =~ s#mods/\?#mods/PC/?#; + $repls{'HELP_URL'} =~ s#(mods|read)/\?#$1/PC/?#; while( defined( my $line = ) ) { $line =~ s/\$(\w+_URL)\$/$repls{$1}/g; print $line; } close HELP; - genHtmlTail(); + genHtmlFooter( 1, $req, $args ); return OK; }