payout_report.tpl 4.1 KB

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