From: Moritz Bunkus Date: Thu, 12 Jul 2007 13:39:09 +0000 (+0000) Subject: Umstellung der Kontenübersicht auf die Verwendung von "Template". X-Git-Tag: release-2.4.3^2~12 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c7f9da819e437745d637e714993959e57244655a;p=kivitendo-erp.git Umstellung der Kontenübersicht auf die Verwendung von "Template". --- diff --git a/SL/Form.pm b/SL/Form.pm index c62c8ad0d..b9ef3e1d4 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -386,10 +386,15 @@ sub header { if ($ENV{HTTP_USER_AGENT}) { - if ($self->{stylesheet} && (-f "css/$self->{stylesheet}")) { - $stylesheet = - qq| - |; + my $stylesheets = "$self->{stylesheet} $self->{stylesheets}"; + + $stylesheets =~ s|^\s*||; + $stylesheets =~ s|\s*$||; + foreach my $file (split m/\s+/, $stylesheets) { + $file =~ s|.*/||; + next if (! -f "css/$file"); + + $stylesheet .= qq|\n|; } $self->{favicon} = "favicon.ico" unless $self->{favicon}; diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 4f8f3bc8c..87ec9b30d 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -413,16 +413,14 @@ sub list_account { foreach $ca (@{ $form->{CA} }) { - $ca->{debit} = " "; - $ca->{credit} = " "; + $ca->{debit} = ""; + $ca->{credit} = ""; if ($ca->{amount} > 0) { - $ca->{credit} = - $form->format_amount(\%myconfig, $ca->{amount}, 2, " "); + $ca->{credit} = $form->format_amount(\%myconfig, $ca->{amount}, 2); } if ($ca->{amount} < 0) { - $ca->{debit} = - $form->format_amount(\%myconfig, -1 * $ca->{amount}, 2, " "); + $ca->{debit} = $form->format_amount(\%myconfig, -1 * $ca->{amount}, 2); } $ca->{heading} = ( $ca->{charttype} eq 'H' ) ? 1:''; $ca->{link_edit_account} = @@ -437,16 +435,16 @@ sub list_account { ."&password=$form->{password}&action=list_account_details&"; - my $pjx = new CGI::Ajax( - 'list_account_details' => $list_account_details_url - ); + my $pjx = new CGI::Ajax('list_account_details' => $list_account_details_url); # Eneable AJAX debuging #$pjx->DEBUG(1); #$pjx->JSDEBUG(1); push(@ { $form->{AJAX} }, $pjx); - + + $form->{stylesheets} = "list_accounts.css"; + $form->header; @@ -455,7 +453,7 @@ sub list_account { }; # Ausgabe des Templates - print($form->parse_html_template('am/list_accounts', $parameters_ref)); + print($form->parse_html_template2('am/list_accounts', $parameters_ref)); $lxdebug->leave_sub(); diff --git a/templates/webpages/am/list_accounts_de.html b/templates/webpages/am/list_accounts_de.html index 017c830bd..2f0543a06 100644 --- a/templates/webpages/am/list_accounts_de.html +++ b/templates/webpages/am/list_accounts_de.html @@ -1,200 +1,66 @@ +[% USE HTML %] - - - - - - -

- - - - - - -
+

+ +
[% title %]
-
+
- +
- - - - - - + + + + + + - + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + [% ELSE %] + + + + + + + + + + + - + - - - - -
- Konto - - Beschreibung (Klick - öffnet einzelne Kontendetails) - - Soll - - Haben - KontoBeschreibung (Klick + öffnet einzelne Kontendetails)SollHaben
- - - - - -
[% HTML.escape(row.accno) %][% HTML.escape(row.description) %]
-
-
-
+ [% END %] - - + [% END %] + + + diff --git a/templates/webpages/am/list_accounts_master.html b/templates/webpages/am/list_accounts_master.html index e921a1f01..da998e229 100644 --- a/templates/webpages/am/list_accounts_master.html +++ b/templates/webpages/am/list_accounts_master.html @@ -1,199 +1,65 @@ +[% USE HTML %] - - - - - - -

- - - - - - -
+

+ +
[% title %]
-
+
- +
- - - - - - + + + + + + - + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + [% ELSE %] + + + + + + + + + + + - + - - - - -
- Account - - Description (Click on Description for details) - - Debit - - Credit - AccountDescription (Click on Description for details)DebitCredit
- - - - - -
[% HTML.escape(row.accno) %][% HTML.escape(row.description) %]
-
-
-
+ [% END %] - - + [% END %] + + +