Web Interfaces of PROSUME

transfer.ctp 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. $this->layout = false;
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <?= $this->element('Eprosume/header') ?>
  7. <body class="hold-transition skin-green sidebar-mini">
  8. <div class="wrapper">
  9. <?= $this->element('Eprosume/mainHeader') ?>
  10. <!-- Left side column. contains the logo and sidebar -->
  11. <?= $this->element('Eprosume/leftSideColumn') ?>
  12. <!-- Content Wrapper. Contains page content -->
  13. <div class="content-wrapper">
  14. <!-- Content Header (Page header) -->
  15. <section class="content-header">
  16. <h1>
  17. Transfer
  18. <small></small>
  19. </h1>
  20. <ol class="breadcrumb">
  21. <li><a href="/"><i class="fa fa-dashboard"></i> <?= $app_name ?></a></li>
  22. <li class="active">Transfer</li>
  23. </ol>
  24. </section>
  25. <!-- Main content -->
  26. <section class="content">
  27. <div class="row">
  28. <div class="col-xs-12">
  29. <div class="box">
  30. <!-- /.box-header -->
  31. <div class="box-body">
  32. <div class="row">
  33. <div class="col-md-12 col-sm-12 col-xs-12">
  34. <div class="panel panel-default">
  35. <div class="panel-body">
  36. <div class="row">
  37. <div class="col-lg-4 col-sm-4">
  38. <div class="input-group">
  39. <span class="input-group-addon">Meter</span>
  40. <select id="prosumerSelect" class="form-control" autocomplete="off" required>
  41. <option value="0"></option>
  42. <?php
  43. foreach($prosumers as $k=>$v) {
  44. echo sprintf('<option value="%s">%s</option>', $k, $k);
  45. }
  46. ?>
  47. </select>
  48. </div>
  49. </div>
  50. <div class="col-lg-4 col-sm-4">
  51. <div class="input-group">
  52. <span class="input-group-addon">Amount</span>
  53. <input id="amountInput" type="number" min="0.01" step="0.1" value="" class="form-control text-right" autocomplete="off">
  54. </div>
  55. </div>
  56. <div class="col-lg-4 col-sm-4">
  57. <div class="input-group">
  58. <span class="input-group-addon">Asset</span>
  59. <select id="assetSelect" class="form-control" autocomplete="off" required>
  60. <option value="0"></option>
  61. <?php
  62. foreach($assets as $k=>$v) {
  63. echo sprintf('<option value="%s">%s</option>', $v, $v);
  64. }
  65. ?>
  66. </select>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="row m-top-3">
  71. <div class="col-lg-12 col-sm-10">
  72. <div class="input-group">
  73. <span class="input-group-addon">Memo</span>
  74. <input id="memoInput" type="text" maxlength="255" value="" class="form-control" placeholder="Insert a short memo here" autocomplete="off">
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <p class="pull-right">
  83. <span id="transferErrors" class="eprosume_error hidden"></span>
  84. <span id="transferOutcome" class="hidden"></span>
  85. <button id="submitButton" class="btn btn-success" title="">Transfer</button>
  86. </p>
  87. </div>
  88. <!-- /.box-body -->
  89. </div>
  90. <!-- /.box -->
  91. </div>
  92. <!-- /.col -->
  93. </div>
  94. <!-- /.row -->
  95. </section>
  96. <!-- /.content -->
  97. <!-- Main content -->
  98. <section class="content">
  99. <div class="row">
  100. <div class="col-xs-12">
  101. <div class="box">
  102. <!-- /.box-header -->
  103. <div class="box-body">
  104. <h3>Transfer history</h3>
  105. <?= $this->element('Eprosume/dataTableToolbar', [
  106. "prosumers" => $prosumersHistory,
  107. "column" => "2,3",
  108. "columnTimestamp"=>0
  109. ]) ?>
  110. <table id="valueTable" class="table table-bordered table-striped">
  111. <thead>
  112. <tr>
  113. <th>Timestamp</th>
  114. <th>From</th>
  115. <th>To</th>
  116. <th>Asset</th>
  117. <th>Value</th>
  118. <th>Memo</th>
  119. </tr>
  120. </thead>
  121. <tbody>
  122. </tbody>
  123. </table>
  124. </div>
  125. <!-- /.box-body -->
  126. </div>
  127. <!-- /.box -->
  128. </div>
  129. <!-- /.col -->
  130. </div>
  131. <!-- /.row -->
  132. </section>
  133. <!-- /.content -->
  134. </div>
  135. <!-- /.content-wrapper -->
  136. <?= $this->element('Eprosume/footer') ?>
  137. </div>
  138. <!-- ./wrapper -->
  139. <?= $this->element('Eprosume/scripts') ?>
  140. <?= $this->element('Eprosume/Views/transfer') ?>
  141. <?= $this->element('Eprosume/Views/datatable', array("dataTableConfiguration" => "transferDataTableConfiguration")) ?>
  142. </body>
  143. </html>