[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3990] branches/1.3
- Subject: SF.net SVN: ledger-smb:[3990] branches/1.3
- From: ..hidden..
- Date: Sun, 13 Nov 2011 11:08:14 +0000
Revision: 3990
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3990&view=rev
Author: einhverfr
Date: 2011-11-13 11:08:13 +0000 (Sun, 13 Nov 2011)
Log Message:
-----------
Added to_width for text templates
Modified Paths:
--------------
branches/1.3/LedgerSMB/Template.pm
branches/1.3/templates/demo/invoice.html
Modified: branches/1.3/LedgerSMB/Template.pm
===================================================================
--- branches/1.3/LedgerSMB/Template.pm 2011-11-13 10:06:32 UTC (rev 3989)
+++ branches/1.3/LedgerSMB/Template.pm 2011-11-13 11:08:13 UTC (rev 3990)
@@ -267,6 +267,11 @@
$cleanvars->{text} = sub { return $self->escape(shift @_) };
}
+ $cleanvars->{to_width} = sub {
+ my ($string, $width) = @_;
+ my $fmt = "A$width";
+ return pack($fmt, $string);
+ };
$cleanvars->{tt_url} = sub {
my $str = shift @_;
Modified: branches/1.3/templates/demo/invoice.html
===================================================================
--- branches/1.3/templates/demo/invoice.html 2011-11-13 10:06:32 UTC (rev 3989)
+++ branches/1.3/templates/demo/invoice.html 2011-11-13 11:08:13 UTC (rev 3990)
@@ -1,4 +1,4 @@
-<html>
+<?lsmb INCLUDE 'ui-header.html' ?>
<body>
<table width="100%">
@@ -247,7 +247,6 @@
<th align=left><?lsmb text('Source') ?></th>
<th align=left><?lsmb text('Amount') ?></th>
</tr>
- <?lsmb END ?>
<?lsmb FOREACH payment ?>
<?lsmb loop_count = loop.count - 1 ?>
@@ -259,7 +258,6 @@
</tr>
<?lsmb END ?>
- <?lsmb IF paid_1 ?>
</table>
</td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.