From 9f795a104880cd2fd6515afa90bc3af6b284bc83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 7 Feb 2008 12:38:02 +0000 Subject: [PATCH] Warendialog -> Preisgruppen in Template ausgelagert. Template blendet die komplette Tabelle aus, wenn keine Preisgruppen gefunden werden. --- bin/mozilla/ic.pl | 29 +++++---------------- templates/webpages/ic/price_row_de.html | 20 ++++++++++++++ templates/webpages/ic/price_row_master.html | 20 ++++++++++++++ 3 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 templates/webpages/ic/price_row_de.html create mode 100644 templates/webpages/ic/price_row_master.html diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 928a0aba6..f2ca8a929 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -2069,30 +2069,13 @@ sub price_row { my ($numrows) = @_; - print qq| - - - - - - - -|; - for my $i (1 .. $numrows) { - print qq| - - - - - -|; - } + my @PRICES = map +{ + pricegroup => $form->{"pricegroup_$_"}, + pricegroup_id => $form->{"pricegroup_id_$_"}, + price => $form->{"price_$_"}, + }, 1 .. $numrows; - print qq| -
| . $locale->text('Preisklasse') . qq|| . $locale->text('Preis') . qq|
$form->{"pricegroup_$i"}
- - -|; + print $form->parse_html_template('ic/price_row', { PRICES => \@PRICES }); $lxdebug->leave_sub(); } diff --git a/templates/webpages/ic/price_row_de.html b/templates/webpages/ic/price_row_de.html new file mode 100644 index 000000000..01153808b --- /dev/null +++ b/templates/webpages/ic/price_row_de.html @@ -0,0 +1,20 @@ +[%- USE HTML %] +[%- IF PRICES.count %] + + + + + + + +[%- FOREACH row = PRICES %] + + + + + +[%- END %] +
PreisgruppePreis
[% HTML.escape(row.pricegroup) %]
+ + +[%- END %] diff --git a/templates/webpages/ic/price_row_master.html b/templates/webpages/ic/price_row_master.html new file mode 100644 index 000000000..da548fed6 --- /dev/null +++ b/templates/webpages/ic/price_row_master.html @@ -0,0 +1,20 @@ +[%- USE HTML %] +[%- IF PRICES.count %] + + + + + + + +[%- FOREACH row = PRICES %] + + + + + +[%- END %] +
PreisklassePreis
[% HTML.escape(row.pricegroup) %]
+ + +[%- END %] -- 2.20.1