From fb6468fcbb2662efb5f7490867417b735feb4d8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 20 Jan 2012 21:07:25 +0100 Subject: [PATCH] am/list_lead nach template portiert --- bin/mozilla/am.pl | 90 +++------------------------- templates/webpages/am/lead_list.html | 35 +++++++++++ 2 files changed, 43 insertions(+), 82 deletions(-) create mode 100644 templates/webpages/am/lead_list.html diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index e24e7c2eb..77b8e4d60 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -618,92 +618,18 @@ sub edit_lead { } sub list_lead { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - $main::auth->assert('config'); - - AM->lead(\%myconfig, \%$form); - - $form->{callback} = "am.pl?action=list_lead"; - - my $callback = $form->escape($form->{callback}); - - $form->{title} = $locale->text('Lead'); - - my @column_index = qw(description cost profit); - my %column_header; - $column_header{description} = - qq|| - . $locale->text('Description') - . qq||; - - $form->header; - - print qq| - - - - - - - - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - my ($i, %column_data); - foreach my $ref (@{ $form->{ALL} }) { - - $i++; - $i %= 2; - - print qq| - -|; - -# $lead = $ref->{lead}; - - $column_data{description} = qq||; - - map { print "$column_data{$_}\n" } @column_index; - - print qq| - -|; - } - - print qq| - - - -
$form->{title}
$ref->{lead}

- -
-
+ $::lxdebug->enter_sub; + $::auth->assert('config'); - + AM->lead(\%::myconfig, $::form); - + $::form->{callback} = "am.pl?action=list_lead"; + $::form->{title} = $::locale->text('Lead'); - - -
- - - -|; + $::form->header; + print $::form->parse_html_template('am/lead_list'); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub lead_header { diff --git a/templates/webpages/am/lead_list.html b/templates/webpages/am/lead_list.html new file mode 100644 index 000000000..2e2010e22 --- /dev/null +++ b/templates/webpages/am/lead_list.html @@ -0,0 +1,35 @@ +[%- USE T8 %] +[%- USE HTML %] +[%- USE LxERP %] +[%- USE L %] + + + + + + + + + + +[%- FOREACH row = ALL %] + + + +[%- END %] + + + +
[% title | html %]
[% 'Description' | $T8 %]
[% row.lead | html %]

+ +
+
+ + + + + +
+ + + -- 2.20.1