2 # List of products Perl template.
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::Index;
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 Wrequire 'product::Lib';
28 use Carp qw(confess cluck);
34 "title"=>'Product List',
35 "section"=>"Products",
36 # "rel_up"=>"/", # TODO:homepage
37 # "rel_start"=>"/", # TODO:homepage
38 "css_push"=>"/product/Lib.css",
45 my %item=product::Lib->name_to_hashref();
48 <table border="0" width="100%" class="product-list">
51 for my $product (product::Lib->products_sorted()) {
56 img "/product/$product/".$item{$product}{"icon"},$item{$product}{"name"}." Icon",
57 "a_href"=>"/product/$product/"
62 <h3>@{[ a_href "/product/$product/",$item{$product}{"name"}.": ".$item{$product}{"summary"} ]}</h3>
64 @{[ $item{$product}{"description"} ]}