[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4395] trunk



Revision: 4395
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4395&view=rev
Author:   einhverfr
Date:     2012-03-07 07:05:40 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
Moving in dynatable.html into a separate template that can be included or processed by other templates

Modified Paths:
--------------
    trunk/LedgerSMB/Template.pm
    trunk/UI/form-dynatable.html

Added Paths:
-----------
    trunk/UI/lib/dynatable.html

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2012-03-07 04:58:45 UTC (rev 4394)
+++ trunk/LedgerSMB/Template.pm	2012-03-07 07:05:40 UTC (rev 4395)
@@ -242,6 +242,7 @@
 sub render {
 	my $self = shift;
 	my $vars = shift;
+        $vars->{ENVARS} = \%ENV;
 	if ($self->{format} !~ /^\p{IsAlnum}+$/) {
 		throw Error::Simple "Invalid format";
 	}

Modified: trunk/UI/form-dynatable.html
===================================================================
--- trunk/UI/form-dynatable.html	2012-03-07 04:58:45 UTC (rev 4394)
+++ trunk/UI/form-dynatable.html	2012-03-07 07:05:40 UTC (rev 4395)
@@ -1,88 +1,10 @@
-<!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 'ui-header.html' ?>
 <?lsmb PROCESS elements.html ?> 
 
 <body>
 <form method="post" action="<?lsmb form.script ?>">
 
-<table width="100%">
-  <tr>
-    <th class="listtop" colspan="<?lsmb columns.size ?>"><?lsmb form.title ?></th>
-  </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 IF heading.$column.href.defined ?><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.class == 'heading';      s = 'th'; c = 'listheading';
-	ELSIF row.class == 'subtotal'; s = 'th'; c = 'listsubtotal';
-	ELSIF row.class == 'divider';  s = 'th'; c = 'listheading';
-	ELSE;                          s = 'td'; c = "listrow${row.i}"; END ?>
-<tr class="<?lsmb c ?>">
-  <?lsmb IF row.class == 'divider' ?>
-  <th colspan="<?lsmb columns.size ?>">
-    <?lsmb IF row.href.defined ?>
-    <a href="<?lsmb row.href?>"><?lsmb row.text ?></a>
-    <?lsmb ELSIF row.delimiter;
-	FOREACH l IN row.text.split(row.delimiter); l ?><br /><?lsmb END ?>
-    <?lsmb ELSIF row.input.defined;
-	PROCESS input element_data=row.input ?>
-    <?lsmb ELSIF row.select.defined;
-	PROCESS select element_data=row.select ?>
-    <?lsmb ELSE; row.text; END ?>
-  </th>
-</tr>
-  <?lsmb NEXT; END ?>
-  <?lsmb FOREACH column IN columns ?>
-  <<?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.defined ?>
-    <a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
-    <?lsmb ELSIF row.$column.delimiter;
-	FOREACH l IN row.$column.text.split(row.$column.delimiter); l ?><br /><?lsmb END ?>
-    <?lsmb ELSIF row.$column.input.defined;
-	PROCESS input element_data=row.$column.input ?>
-    <?lsmb ELSIF row.$column.select.defined;
-	PROCESS select element_data=row.$column.select ?>
-    <?lsmb ELSIF row.$column.text.defined;row.$column.text ?>
-    <?lsmb ELSE; row.$column; END ?>
-  </<?lsmb s ?>>
-  <?lsmb END ?>
-</tr>
-<?lsmb END ?>
-<?lsmb IF totals ?>
-<tr class="listtotal">
-  <?lsmb FOREACH column IN columns ?>
-  <th class="listtotal" align="right"><?lsmb totals.$column ?></th>
-  <?lsmb END ?>
-</tr>
-<?lsmb END ?>
-  <tr><td colspan="<?lsmb columns.size ?>"><hr size="3" /></td></tr>
-</table>
-
+<?lsmb PROCESS 'dynatable.html' ?>
 <br />
 
 <?lsmb FOREACH hidden IN hiddens.keys;
@@ -93,5 +15,11 @@
 		}; END ?>
 <?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?>
 </form>
+<?lsmb 
+text('If you would like to access this report again, please try this URL')
+?>
+<?lsmb url = 'http://' _ ENVARS.SERVER_NAME _ ENVARS.SCRIPT_NAME 
+           _ ENVARS.QUERY_STRING ?>
+<a href="<?lsmb url ?>"><?lsmb url ?></a>
 </body>
 </html>

Added: trunk/UI/lib/dynatable.html
===================================================================
--- trunk/UI/lib/dynatable.html	                        (rev 0)
+++ trunk/UI/lib/dynatable.html	2012-03-07 07:05:40 UTC (rev 4395)
@@ -0,0 +1,67 @@
+
+<table width="100%">
+  <tr>
+    <th class="listtop" colspan="<?lsmb columns.size ?>"><?lsmb form.title ?></th>
+  </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 IF heading.$column.href.defined ?><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.class == 'heading';      s = 'th'; c = 'listheading';
+	ELSIF row.class == 'subtotal'; s = 'th'; c = 'listsubtotal';
+	ELSIF row.class == 'divider';  s = 'th'; c = 'listheading';
+	ELSE;                          s = 'td'; c = "listrow${row.i}"; END ?>
+<tr class="<?lsmb c ?>">
+  <?lsmb IF row.class == 'divider' ?>
+  <th colspan="<?lsmb columns.size ?>">
+    <?lsmb IF row.href.defined ?>
+    <a href="<?lsmb row.href?>"><?lsmb row.text ?></a>
+    <?lsmb ELSIF row.delimiter;
+	FOREACH l IN row.text.split(row.delimiter); l ?><br /><?lsmb END ?>
+    <?lsmb ELSIF row.input.defined;
+	PROCESS input element_data=row.input ?>
+    <?lsmb ELSIF row.select.defined;
+	PROCESS select element_data=row.select ?>
+    <?lsmb ELSE; row.text; END ?>
+  </th>
+</tr>
+  <?lsmb NEXT; END ?>
+  <?lsmb FOREACH column IN columns ?>
+  <<?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.defined ?>
+    <a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
+    <?lsmb ELSIF row.$column.delimiter;
+	FOREACH l IN row.$column.text.split(row.$column.delimiter); l ?><br /><?lsmb END ?>
+    <?lsmb ELSIF row.$column.input.defined;
+	PROCESS input element_data=row.$column.input ?>
+    <?lsmb ELSIF row.$column.select.defined;
+	PROCESS select element_data=row.$column.select ?>
+    <?lsmb ELSIF row.$column.text.defined;row.$column.text ?>
+    <?lsmb ELSE; row.$column; END ?>
+  </<?lsmb s ?>>
+  <?lsmb END ?>
+</tr>
+<?lsmb END ?>
+<?lsmb IF totals ?>
+<tr class="listtotal">
+  <?lsmb FOREACH column IN columns ?>
+  <th class="listtotal" align="right"><?lsmb totals.$column ?></th>
+  <?lsmb END ?>
+</tr>
+<?lsmb END ?>
+  <tr><td colspan="<?lsmb columns.size ?>"><hr size="3" /></td></tr>
+</table>
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.