summaryrefslogtreecommitdiff
path: root/bin/am.pl
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-25 00:14:07 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-25 00:14:07 +0000
commite7e1dafee2629dcbd57e7ac3d50ad84bce03e694 (patch)
tree3540882ccf8d6594ee859d28e7be4a38f3e5e487 /bin/am.pl
parent7fced1ba707fb5ad081daa804fefb6316aceb5c0 (diff)
Convert company_logo to template
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1818 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/am.pl')
-rw-r--r--bin/am.pl52
1 files changed, 9 insertions, 43 deletions
diff --git a/bin/am.pl b/bin/am.pl
index 17cb3acb..581a19a0 100644
--- a/bin/am.pl
+++ b/bin/am.pl
@@ -2209,7 +2209,7 @@ sub generate_yearend {
sub company_logo {
- $myconfig{address} =~ s/\\n/<br>/g;
+ $myconfig{address} =~ s/\\n/<br>/g; # Template cleans this up
$myconfig{dbhost} = $locale->text('localhost') unless $myconfig{dbhost};
$form->{stylesheet} = $myconfig{stylesheet};
@@ -2217,48 +2217,14 @@ sub company_logo {
$form->{title} = $locale->text('About');
# create the logo screen
- $form->header;
-
- print qq|
-<body>
-
-<pre>
-
-</pre>
-<center>
-<a href="http://www.ledgersmb.org/" target="_blank"><img src="images/ledgersmb.png" width="200" height="100" border="0" alt="LedgerSMB Logo" /></a>
-<h1 class="login">| . $locale->text('Version') . qq| $form->{version}</h1>
-
-<p>
-|.$locale->text('Company').qq| :
-<p>
-<b>
-$myconfig{company}
-<br>$myconfig{address}
-</b>
-
-<p>
-<table border=0>
- <tr>
- <th align="right">| . $locale->text('User') . qq|</th>
- <td>$myconfig{name}</td>
- </tr>
- <tr>
- <th align="right">| . $locale->text('Dataset') . qq|</th>
- <td>$myconfig{dbname}</td>
- </tr>
- <tr>
- <th align="right">| . $locale->text('Database Host') . qq|</th>
- <td>$myconfig{dbhost}</td>
- </tr>
-</table>
-
-</center>
-
-</body>
-</html>
-|;
-
+ my $template = LedgerSMB::Template->new_UI(
+ user => \%myconfig,
+ locale => $locale,
+ template => 'am-company-logo');
+ $template->render({
+ form => $form,
+ user => \%myconfig,
+ });
}
sub recurring_transactions {