X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FHtml%2FList.pm;h=b2f3df058e57f9050306c5c4643baf68133236c5;hb=d2935a5e76ef0e5a2f3a15e80b2649a2913581e5;hp=04a52ffb85c305eac89cd38cdfdee61d2d7c1a91;hpb=1224c147a3298874b0dba1d9fbe08862e3be99c9;p=pciids.git diff --git a/PciIds/Html/List.pm b/PciIds/Html/List.pm index 04a52ff..b2f3df0 100644 --- a/PciIds/Html/List.pm +++ b/PciIds/Html/List.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::List; use strict; use warnings; @@ -22,19 +40,15 @@ sub list( $$$$ ) { my( $req, $args, $tables, $auth ) = @_; my( $ok, $parent, $name, $note, $address, $mid ) = loadItem( $tables, $req->uri() ); return NOT_FOUND unless( $ok ); - my $id = $address->pretty(); + my $id = $address->top()->pretty(); genHtmlHead( $req, $id, "\n" ); print "
\n"; - print '

'.encode( $id ).'

'; genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'list' ], $address->helpName() ? [ 'ID syntax', 'help', $address->helpName() ] : () ] ); - print "
\n"; - print ""; + print '

The PCI ID Repository

The home of the pci.ids file

'; + print "
\n"; genPath( $req, $address, 0 ); - if( defined $name ) { - print '

'.encode( $id ).'

'; - print htmlDiv( 'name', '

Name: '.encode( $name ) ); - } - print htmlDiv( 'note', '

Note: '.encode( $note ) ) if defined( $note ); + print htmlDiv( 'name', '

Name: '.encode( $name ) ) if defined $name && $name ne ''; + print htmlDiv( 'note', '

Note: '.encode( $note ) ) if defined $note && $note ne ''; my $diss = 0; my $history; foreach $history ( @{$tables->history( $address->get() )} ) { @@ -82,7 +96,7 @@ sub list( $$$$ ) { genTableTail(); print "

Add item\n"; } - genHtmlTail(); + genHtmlFooter( 1, $req, $args ); return OK; }