From: Sven Schöling Date: Fri, 20 Jan 2012 20:07:25 +0000 (+0100) Subject: am/list_lead nach template portiert X-Git-Tag: release-2.7.0beta1~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fb6468fcbb2662efb5f7490867417b735feb4d8a;p=kivitendo-erp.git am/list_lead nach template portiert --- 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 %]

+ +
+
+ + + + + +
+ + +