2 # Common functions for the HotelGate project
3 # Copyright (C) 2005 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package product::hotelgate::Lib;
20 require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
21 our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
27 use Carp qw(cluck confess);
31 Wrequire 'product::Lib';
32 our @ISA=qw(product::Lib Exporter);
40 $r.='<table border="0" class="margin-center"><tr>'."\n";
42 $r.='<table border="1" style="border-collapse: collapse; border-style: solid; border-width: 1px;">'."\n";
44 $r.='<td style="padding: 5px; font-weight: bold;">'."\n";
45 my $ListItem=product::Lib->name_to_hashref($W->{"product_name"});
46 $r.=product::Lib->title($ListItem);
52 $r.='<table border="1" style="border-collapse: collapse; border-style: solid;" class="margin-center">'."\n";
57 "Screenshot"=>"Screenshots",
58 "Spec"=>"Specification",
61 my $section_path=shift @sections;
62 my $section_name=shift @sections;
63 my $chosen=($My::Web::W->{"__PACKAGE__"} eq "product::hotelgate::".$section_path);
64 $r.='<td style="padding: 5px;">';
65 $r.=(($chosen || "") ? "<b>$section_name</b>"
66 : My::Web::a_href("./".($section_path eq "Index" ? "" : $section_path.".pm"),$section_name,
67 "attr"=>'style="text-decoration: inherit; /* revoke underline */;"'));
73 $r.='</tr></table>'."\n";
74 if (!$args{"novskip"}) {
76 $r.=WebConfig->vskip_hr();
85 $args{"__PACKAGE__"}||=caller();
86 my $W=$class->SUPER::init(
90 print $class->menu(%args);