summaryrefslogtreecommitdiff
path: root/UI
diff options
context:
space:
mode:
Diffstat (limited to 'UI')
-rw-r--r--UI/form-dynatable.csv (renamed from UI/am-list-accounts.csv)2
-rw-r--r--UI/form-dynatable.html (renamed from UI/am-list-accounts.html)36
-rw-r--r--UI/form-dynatable.odst (renamed from UI/am-list-accounts.odst)0
-rw-r--r--UI/form-dynatable.xlst (renamed from UI/am-list-accounts.xlst)0
-rw-r--r--UI/gl-report.csv3
-rw-r--r--UI/gl-report.html92
6 files changed, 26 insertions, 107 deletions
diff --git a/UI/am-list-accounts.csv b/UI/form-dynatable.csv
index 784c9a8f..9b65baba 100644
--- a/UI/am-list-accounts.csv
+++ b/UI/form-dynatable.csv
@@ -1,3 +1,3 @@
<?lsmb FOREACH column IN columns ?><?lsmb IF heading.$column.text; heading.$column.text; ELSE; heading.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
-<?lsmb FOREACH row IN rows ?><?lsmb FOREACH column IN columns ?><?lsmb IF row.$column.href; row.$column.text; ELSE; row.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
+<?lsmb FOREACH row IN rows ?><?lsmb FOREACH column IN columns ?><?lsmb IF row.$column.text; row.$column.text; ELSE; row.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
<?lsmb END ?><?lsmb IF totals; t = []; FOREACH column IN columns; t.push(totals.$column); END; t.join(','); END ?>
diff --git a/UI/am-list-accounts.html b/UI/form-dynatable.html
index 31563563..706942a2 100644
--- a/UI/am-list-accounts.html
+++ b/UI/form-dynatable.html
@@ -20,21 +20,33 @@
<tr>
<th class="listtop" colspan="<?lsmb columns.size ?>"><?lsmb form.title ?></th>
</tr>
- <tr><td colspan="<?lsmb columns.size ?>"></td></tr>
+ <tr>
+ <?lsmb IF options.defined ?>
+ <td><?lsmb FOREACH option IN options; option ?><br /><?lsmb END ?></td>
+ <?lsmb ELSE ?>
+ <td colspan="<?lsmb columns.size ?>"></td></tr>
+ <?lsmb END ?>
+ </tr>
<tr class="listheading">
<?lsmb FOREACH column IN columns ?>
- <th class="listtop"><?lsmb heading.$column ?></th>
+ <th class="listtop">
+ <?lsmb IF heading.$column.href ?><a class="listtop" href="<?lsmb heading.$column.href ?>"><?lsmb heading.$column.text ?></a>
+ <?lsmb ELSE; heading.$column; END ?>
+ </th>
<?lsmb END ?>
</tr>
+ <?lsmb USE dumper(indent=2, pad="<br>") ?>
<?lsmb FOREACH row IN rows ?>
- <?lsmb IF row.heading == 'H'; s = 'th'; c = 'listheading'; ELSE;
- s = 'td'; c = "listrow${row.i}"; END ?>
+<?lsmb IF row.class == 'heading'; s = 'th'; c = 'listheading';
+ ELSIF row.class == 'subtotal'; s = 'th'; c = 'listsubtotal';
+ ELSE; s = 'td'; c = "listrow${row.i}"; END ?>
<tr class="<?lsmb c ?>">
<?lsmb FOREACH column IN columns ?>
- <<?lsmb s ?> class="<?lsmb c ?>" <?lsmb IF (!row.heading && (column == 'credit' || column == 'debit')) ?>align="right"<?lsmb END ?>>
+ <<?lsmb s ?> class="<?lsmb c ?>" <?lsmb IF (!row.class.defined || row.class != 'heading') && row_alignment.$column ?>align="<?lsmb row_alignment.$column ?>"<?lsmb END ?>>
<?lsmb IF row.$column.href ?>
<a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
- <?lsmb ELSIF column == 'link'; FOREACH l IN row.link.split(':'); l ?><br /><?lsmb END ?>
+ <?lsmb ELSIF row.$column.delimiter;
+ FOREACH l IN row.$column.text.split(row.$column.delimiter); l ?><br /><?lsmb END ?>
<?lsmb ELSE; row.$column; END ?>
</<?lsmb s ?>>
<?lsmb END ?>
@@ -53,11 +65,13 @@
<br />
<form method="post" action="<?lsmb form.script ?>">
-<?lsmb FOREACH pair IN form.callback.split('&amp;') ?><?lsmb hidden = pair.split('=') ?><?lsmb IF NOT loop.first ?>
-<?lsmb PROCESS input element_data={type => 'hidden', name => hidden.0, value => hidden.1} ?><?lsmb END ?><?lsmb END ?>
-<?lsmb PROCESS input element_data={type => 'hidden', name => 'callback', value => form.callback} ?>
-
-<?lsmb FOREACH button IN buttons ?><?lsmb PROCESS button element_data=button ?><?lsmb END ?>
+<?lsmb FOREACH hidden IN hiddens.keys;
+ PROCESS input element_data={
+ type => 'hidden',
+ name => hidden,
+ value => hiddens.$hidden
+ }; END ?>
+<?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?>
</form>
</body>
</html>
diff --git a/UI/am-list-accounts.odst b/UI/form-dynatable.odst
index 7a4cdfdc..7a4cdfdc 100644
--- a/UI/am-list-accounts.odst
+++ b/UI/form-dynatable.odst
diff --git a/UI/am-list-accounts.xlst b/UI/form-dynatable.xlst
index 7c00fb67..7c00fb67 100644
--- a/UI/am-list-accounts.xlst
+++ b/UI/form-dynatable.xlst
diff --git a/UI/gl-report.csv b/UI/gl-report.csv
deleted file mode 100644
index b8b42e71..00000000
--- a/UI/gl-report.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-<?lsmb FOREACH column IN columns ?><?lsmb IF heading.$column.text; heading.$column.text; ELSE; heading.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
-<?lsmb FOREACH row IN rows ?><?lsmb FOREACH column IN columns ?><?lsmb IF row.$column.text; row.$column.text; ELSE; row.$column; END ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
-<?lsmb END ?><?lsmb FOREACH column IN columns ?><?lsmb totals.$column ?><?lsmb IF NOT loop.last ?>,<?lsmb END ?><?lsmb END ?>
diff --git a/UI/gl-report.html b/UI/gl-report.html
deleted file mode 100644
index 7ab68933..00000000
--- a/UI/gl-report.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title><?lsmb form.titlebar ?></title>
- <meta http-equiv="Pragma" content="no-cache" />
- <meta http-equiv="Expires" content="-1" />
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="css/<?lsmb form.stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="robots" content="noindex,nofollow" />
-
-</head>
-<?lsmb PROCESS elements.html ?>
-<body>
-
-<table width="100%">
- <tr>
- <th class="listtop"><?lsmb form.title ?></th>
- </tr>
- <tr><td colspan="<?lsmb columns.size ?>"> </td></tr>
- <tr>
- <td><?lsmb FOREACH option IN options; option ?><br /><?lsmb END ?></td>
- </tr>
- <tr>
- <td>
- <table width="100%">
- <tr class="listheading">
-<?lsmb FOREACH column IN columns ?><?lsmb IF heading.$column.href ?>
-<th class="listheading"><a class="listheading" href="<?lsmb heading.$column.href ?>"><?lsmb heading.$column.text ?></a></th>
-<?lsmb ELSE ?>
-<th class="listheading"><?lsmb heading.$column ?></th>
-<?lsmb END ?>
-<?lsmb END ?>
- </tr>
-
-<?lsmb FOREACH row IN rows ?>
-<?lsmb IF row.is_subtotal ?>
- <tr class="listsubtotal">
- <?lsmb FOREACH column IN columns ?>
- <th align="right" class="listsubtotal"><?lsmb row.$column ?></th>
- <?lsmb END ?>
- </tr>
-<?lsmb ELSE ?>
- <tr class="listrow<?lsmb row.i ?>">
- <?lsmb FOREACH column IN columns ?>
- <?lsmb IF column == 'balance' ?>
- <td align="right">
- <?lsmb ELSIF column == 'debit' ?>
- <td align="right">
- <?lsmb ELSIF column == 'credit' ?>
- <td align="right">
- <?lsmb ELSE ?>
- <td>
- <?lsmb END ?>
-<?lsmb IF row.$column.href ?>
- <a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
-<?lsmb ELSE ?>
- <?lsmb row.$column ?>
-<?lsmb END ?>
- </td>
- <?lsmb END ?>
- </tr>
-<?lsmb END ?>
-<?lsmb END ?>
- <tr class="listtotal">
-<?lsmb FOREACH column IN columns ?>
-<th align="right" class="listtotal"><?lsmb totals.$column ?></th>
-<?lsmb END ?>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><hr size="3" noshade="noshade" /></td>
- </tr>
-</table>
-
-<br />
-
-<form method="post" action="gl.pl">
-<?lsmb FOREACH pair IN form.callback.split('&amp;') ?><?lsmb hidden = pair.split('=') ?>
-<?lsmb IF NOT loop.first ?>
-<?lsmb PROCESS input element_data={type => 'hidden', name => hidden.0, value => hidden.1} ?>
-<?lsmb END ?><?lsmb END ?>
-<?lsmb PROCESS input element_data={type => 'hidden', name => 'callback', value => form.callback} ?>
-
-<?lsmb FOREACH button IN buttons ?><?lsmb PROCESS button element_data=button ?><?lsmb END ?>
-</form>
-
-</body>
-</html>