summaryrefslogtreecommitdiff
path: root/UI/form-dynatable.html
blob: 537316fa2e250591229a724b9e5297af69b7296a (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. <table width="100%">
  16. <tr>
  17. <th class="listtop" colspan="<?lsmb columns.size ?>"><?lsmb form.title ?></th>
  18. </tr>
  19. <tr>
  20. <?lsmb IF options.defined ?>
  21. <td><?lsmb FOREACH option IN options; option ?><br /><?lsmb END ?></td>
  22. <?lsmb ELSE ?>
  23. <td colspan="<?lsmb columns.size ?>"></td></tr>
  24. <?lsmb END ?>
  25. </tr>
  26. <tr class="listheading">
  27. <?lsmb FOREACH column IN columns ?>
  28. <th class="listtop">
  29. <?lsmb IF heading.$column.href ?><a class="listtop" href="<?lsmb heading.$column.href ?>"><?lsmb heading.$column.text ?></a>
  30. <?lsmb ELSE; heading.$column; END ?>
  31. </th>
  32. <?lsmb END ?>
  33. </tr>
  34. <?lsmb USE dumper(indent=2, pad="<br>") ?>
  35. <?lsmb FOREACH row IN rows ?>
  36. <?lsmb IF row.class == 'heading'; s = 'th'; c = 'listheading';
  37. ELSIF row.class == 'subtotal'; s = 'th'; c = 'listsubtotal';
  38. ELSIF row.class == 'divider'; s = 'th'; c = 'listheading';
  39. ELSE; s = 'td'; c = "listrow${row.i}"; END ?>
  40. <tr class="<?lsmb c ?>">
  41. <?lsmb IF row.class == 'divider' ?>
  42. <th colspan="<?lsmb columns.size ?>">
  43. <?lsmb IF row.href.defined ?>
  44. <a href="<?lsmb row.href?>"><?lsmb row.text ?></a>
  45. <?lsmb ELSIF row.delimiter;
  46. FOREACH l IN row.text.split(row.delimiter); l ?><br /><?lsmb END ?>
  47. <?lsmb ELSIF row.input.defined;
  48. PROCESS input element_data=row.input ?>
  49. <?lsmb ELSIF row.select.defined;
  50. PROCESS select element_data=row.select ?>
  51. <?lsmb ELSE; row; END ?>
  52. </th>
  53. </tr>
  54. <?lsmb NEXT; END ?>
  55. <?lsmb FOREACH column IN columns ?>
  56. <<?lsmb s ?> class="<?lsmb c ?>" <?lsmb IF (!row.class.defined || row.class != 'heading') && row_alignment.$column ?>align="<?lsmb row_alignment.$column ?>"<?lsmb END ?>>
  57. <?lsmb IF row.$column.href.defined ?>
  58. <a href="<?lsmb row.$column.href?>"><?lsmb row.$column.text ?></a>
  59. <?lsmb ELSIF row.$column.delimiter;
  60. FOREACH l IN row.$column.text.split(row.$column.delimiter); l ?><br /><?lsmb END ?>
  61. <?lsmb ELSIF row.$column.input.defined;
  62. PROCESS input element_data=row.$column.input ?>
  63. <?lsmb ELSIF row.$column.select.defined;
  64. PROCESS select element_data=row.$column.select ?>
  65. <?lsmb ELSE; row.$column; END ?>
  66. </<?lsmb s ?>>
  67. <?lsmb END ?>
  68. </tr>
  69. <?lsmb END ?>
  70. <?lsmb IF totals ?>
  71. <tr class="listtotal">
  72. <?lsmb FOREACH column IN columns ?>
  73. <th class="listtotal" align="right"><?lsmb totals.$column ?></th>
  74. <?lsmb END ?>
  75. </tr>
  76. <?lsmb END ?>
  77. <tr><td colspan="<?lsmb columns.size ?>"><hr size="3" /></td></tr>
  78. </table>
  79. <br />
  80. <form method="post" action="<?lsmb form.script ?>">
  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>