payout_report.tpl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {{ form }}
  2. <div class="table-responsive">
  3. <table class="table table-striped table-hover">
  4. <thead>
  5. <tr>
  6. <th class="text-center">{{ 'OrderReference'| get_plugin_lang('BuyCoursesPlugin') }}</th>
  7. <th class="text-center">{{ 'PayoutDate'| get_plugin_lang('BuyCoursesPlugin') }}</th>
  8. <th class="text-right">{{ 'Commission'| get_plugin_lang('BuyCoursesPlugin') }}</th>
  9. <th class="text-right">{{ 'Names'| get_lang }}</th>
  10. <th class="text-right">{{ 'PayPalAccount'| get_plugin_lang('BuyCoursesPlugin') }}</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. {% for payout in payout_list %}
  15. <tr>
  16. <td class="text-center" style="vertical-align:middle"><a id="{{ payout.sale_id }}" class="saleInfo"
  17. data-toggle="modal" data-target="#saleInfo"
  18. href="#">{{ payout.reference }}</a></td>
  19. <td class="text-center" style="vertical-align:middle">{{ payout.payout_date }}</td>
  20. <td class="text-right"
  21. style="vertical-align:middle">{{ payout.currency ~ ' ' ~ payout.commission }}</td>
  22. <td class="text-right" style="vertical-align:middle">{{ payout.beneficiary }}</td>
  23. {% if payout.paypal_account %}
  24. <td class="text-right" style="vertical-align:middle">{{ payout.paypal_account }}</td>
  25. {% else %}
  26. <td class="text-right"
  27. style="vertical-align:middle">{{ 'NoPayPalAccountDetected'| get_plugin_lang('BuyCoursesPlugin') }}</td>
  28. {% endif %}
  29. </tr>
  30. {% endfor %}
  31. </tbody>
  32. </table>
  33. <div id="saleInfo" class="modal fade" role="dialog">
  34. <div class="modal-dialog modal-lg">
  35. <div class="modal-content">
  36. <div class="modal-header">
  37. <h4 class="modal-title">{{ 'SaleInfo'| get_plugin_lang('BuyCoursesPlugin') }}</h4>
  38. </div>
  39. <div class="modal-body" id="contentSale">
  40. </div>
  41. <div class="modal-footer">
  42. <button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Close'|get_lang }}</button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div id="reportStats" class="modal fade" role="dialog">
  48. <div class="modal-dialog">
  49. <div class="modal-content">
  50. <div class="modal-header">
  51. <h4 class="modal-title">{{ 'Stats'| get_plugin_lang('BuyCoursesPlugin') }}</h4>
  52. </div>
  53. <div class="modal-body" id="contentStats">
  54. </div>
  55. <div class="modal-footer">
  56. <button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Close'|get_lang }}</button>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div>
  63. <button id="stats" type="button" class="btn btn-primary fa fa-line-chart" data-toggle="modal"
  64. data-target="#reportStats"> {{ 'Stats'|get_plugin_lang('BuyCoursesPlugin') }}</button>
  65. </div>
  66. <script>
  67. $(document).ready(function () {
  68. $(".saleInfo").click(function () {
  69. var id = this.id;
  70. $.ajax({
  71. data: 'id=' + id,
  72. url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'saleInfo' }|url_encode() }}',
  73. type: 'POST',
  74. success: function (response) {
  75. $("#contentSale").html(response);
  76. }
  77. });
  78. });
  79. $("#stats").click(function () {
  80. var id = this.id;
  81. $.ajax({
  82. data: 'id=' + id,
  83. url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'stats' }|url_encode() }}',
  84. type: 'POST',
  85. success: function (response) {
  86. $("#contentStats").html(response);
  87. }
  88. });
  89. });
  90. });
  91. </script>