summaryrefslogtreecommitdiff
path: root/UI/form-dynatable.html
blob: cac3d2875731e3d84e297a38102b338925744a36 (plain)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title><?lsmb form.titlebar ?></title>
  6. <meta http-equiv="Pragma" content="no-cache" />
  7. <meta http-equiv="Expires" content="-1" />
  8. <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  9. <link rel="stylesheet" href="css/<?lsmb form.stylesheet ?>" type="text/css" title="LedgerSMB stylesheet" />
  10. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  11. <meta name="robots" content="noindex,nofollow" />
  12. </head>
  13. <?lsmb PROCESS elements.html ?>
  14. <body>
  15. <form method="post" action="<?lsmb form.script ?>">
  16. <table width="100%">
  17. <tr>
  18. <th class="listtop" colspan="<?lsmb columns.size ?>"><?lsmb form.title ?></th>
  19. </tr>
  20. <tr>
  21. <?lsmb IF options.defined ?>
  22. <td><?lsmb FOREACH option IN options; option ?><br /><?lsmb END ?></td>
  23. <?lsmb ELSE ?>
  24. <td colspan="<?lsmb columns.size ?>"></td></tr>
  25. <?lsmb END ?>
  26. </tr>
  27. <tr class="listheading">
  28. <?lsmb FOREACH column IN columns ?>
  29. <th class="listtop">
  30. <?lsmb IF heading.$column.href ?><a class="listtop" href="<?lsmb heading.$column.href ?>"><?lsmb heading.$column.text ?></a>
  31. <?lsmb ELSE; heading.$column; END ?>
  32. </th>
  33. <?lsmb END ?>
  34. </tr>
  35. <?lsmb USE dumper(indent=2, pad="<br>") ?>
  36. <?lsmb FOREACH row IN rows ?>
  37. <?lsmb IF row.class == 'heading'; s = 'th'; c = 'listheading';
  38. ELSIF row.class == 'subtotal'; s = 'th'; c = 'listsubtotal';
  39. ELSIF row.class == 'divider'; s = 'th'; c = 'listheading';
  40. ELSE; s = 'td'; c = "listrow${row.i}"; END ?>
  41. <tr class="<?lsmb c ?>">
  42. <?lsmb IF row.class == 'divider' ?>
  43. <th colspan="<?lsmb columns.size ?>">
  44. <?lsmb IF row.href.defined ?>
  45. <a href="<?lsmb row.href?>"><?lsmb row.text ?></a>
  46. <?lsmb ELSIF row.delimiter;
  47. FOREACH l IN row.text.split(row.delimiter); l ?><br /><?lsmb END ?>
  48. <?lsmb ELSIF row.input.defined;
  49. PROCESS input element_data=row.input ?>
  50. <?lsmb ELSIF row.select.defined;
  51. PROCESS select element_data=row.select ?>
  52. <?lsmb ELSE; row; END ?>
  53. </th>
  54. </tr>
  55. <?lsmb NEXT; END ?>
  56. <?lsmb FOREACH column IN columns ?>
  57. <<?lsmb s ?> class="<?lsmb c ?>" <?lsmb IF (!row.class.defined || row.class != 'heading') && row_alignment.$column ?>align="<?lsmb row_alignment.$column ?>"<?lsmb END ?>>
  58. <?lsmb IF row.$column.href.defined ?>
  59. <a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
  60. <?lsmb ELSIF row.$column.delimiter;
  61. FOREACH l IN row.$column.text.split(row.$column.delimiter); l ?><br /><?lsmb END ?>
  62. <?lsmb ELSIF row.$column.input.defined;
  63. PROCESS input element_data=row.$column.input ?>
  64. <?lsmb ELSIF row.$column.select.defined;
  65. PROCESS select element_data=row.$column.select ?>
  66. <?lsmb ELSE; row.$column; END ?>
  67. </<?lsmb s ?>>
  68. <?lsmb END ?>
  69. </tr>
  70. <?lsmb END ?>
  71. <?lsmb IF totals ?>
  72. <tr class="listtotal">
  73. <?lsmb FOREACH column IN columns ?>
  74. <th class="listtotal" align="right"><?lsmb totals.$column ?></th>
  75. <?lsmb END ?>
  76. </tr>
  77. <?lsmb END ?>
  78. <tr><td colspan="<?lsmb columns.size ?>"><hr size="3" /></td></tr>
  79. </table>
  80. <br />
  81. <?lsmb FOREACH hidden IN hiddens.keys;
  82. PROCESS input element_data={
  83. type => 'hidden',
  84. name => hidden,
  85. value => hiddens.item(hidden)
  86. }; END ?>
  87. <?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?>
  88. </form>
  89. </body>
  90. </html>