X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FHtml%2FList.pm;h=b2f3df058e57f9050306c5c4643baf68133236c5;hb=56225dff5ab7bb300e6080938be559f2e752546a;hp=73815c17e35f8e68d071d9328824f9818214b029;hpb=d8d36960220afc6ea41b26c98c9cb3aba5a05bab;p=pciids.git diff --git a/PciIds/Html/List.pm b/PciIds/Html/List.pm index 73815c1..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,18 +40,14 @@ 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() ] : (), [ '', 'jump' ] ] ); - print "
\n"; - print ""; + genMenu( $req, $address, $args, $auth, [ [ 'Help', 'help', 'list' ], $address->helpName() ? [ 'ID syntax', 'help', $address->helpName() ] : () ] ); + 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( '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; @@ -82,7 +96,7 @@ sub list( $$$$ ) { genTableTail(); print "

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