/lib/core/Table/Settings/TikiPayment.php

https://gitlab.com/ElvisAns/tiki · PHP · 117 lines · 98 code · 4 blank · 15 comment · 1 complexity · b43df56ee219de5f22a5c3faa7bab02b MD5 · raw file

  1. <?php
  2. // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
  3. //
  4. // All Rights Reserved. See copyright.txt for details and a complete list of authors.
  5. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
  6. // $Id$
  7. //this script may only be included - so its better to die if called directly.
  8. if (strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !== false) {
  9. header('location: index.php');
  10. exit;
  11. }
  12. /**
  13. * Class Table_Settings_TikiPayment
  14. *
  15. * Tablesorter settings for the table listings of payments at tiki-payments.php
  16. *
  17. * @package Tiki
  18. * @subpackage Table
  19. * @uses Table_Settings_Standard
  20. */
  21. class Table_Settings_TikiPayment extends Table_Settings_Standard
  22. {
  23. protected $ts = [
  24. 'ajax' => [
  25. 'url' => [
  26. 'file' => 'tiki-payment.php',
  27. ],
  28. ],
  29. 'columns' => [
  30. '#id' => [
  31. 'sort' => [
  32. 'type' => 'digit',
  33. 'dir' => 'asc',
  34. 'ajax' => 'paymentRequestId',
  35. ],
  36. 'filter' => [
  37. 'type' => 'text',
  38. 'ajax' => 'filter_paymentRequestId',
  39. ],
  40. 'priority' => 3,
  41. ],
  42. '#description' => [
  43. 'sort' => [
  44. 'type' => 'text',
  45. 'ajax' => 'description',
  46. ],
  47. 'filter' => [
  48. 'type' => 'text',
  49. 'ajax' => 'filter_description',
  50. ],
  51. 'priority' => 2,
  52. ],
  53. '#amount' => [
  54. 'sort' => [
  55. 'type' => 'digit',
  56. 'ajax' => 'amount',
  57. ],
  58. 'filter' => [
  59. 'type' => 'text',
  60. 'ajax' => 'filter_amount',
  61. ],
  62. 'priority' => 'critical',
  63. ],
  64. '#req_date' => [
  65. 'sort' => [
  66. 'type' => 'dateFormat-yyyy-mm-dd',
  67. 'ajax' => 'request_date',
  68. ],
  69. 'filter' => [
  70. 'type' => 'date',
  71. 'ajax' => 'filter_request_date',
  72. ],
  73. 'priority' => 5,
  74. ],
  75. '#user' => [
  76. 'sort' => [
  77. 'type' => 'text',
  78. 'ajax' => 'login',
  79. ],
  80. 'filter' => [
  81. 'type' => 'text',
  82. 'ajax' => 'filter_login',
  83. ],
  84. 'priority' => 5,
  85. ],
  86. '#payer' => [
  87. 'sort' => [
  88. 'type' => 'text',
  89. 'ajax' => 'login',
  90. ],
  91. 'filter' => [
  92. 'type' => 'text',
  93. 'ajax' => 'filter_login',
  94. ],
  95. 'priority' => 6,
  96. ],
  97. '#actions' => [
  98. 'sort' => [
  99. 'type' => false,
  100. ],
  101. 'filter' => [
  102. 'type' => false,
  103. ],
  104. 'priority' => 'critical',
  105. ],
  106. ],
  107. ];
  108. protected function getTableSettings()
  109. {
  110. $this->ts['ajax']['offset'] .= '_' . $this->ts['ajax']['requiredparams']['list_type'];
  111. return $this->ts;
  112. }
  113. }