versions.html.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * The versions view file of pivot module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Xin Zhou <zhouxin@chandao.net>
  7. * @package pivot
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('pivot', $pivot->id);
  12. jsVar('version', $version);
  13. jsVar('group', $groupID);
  14. include_once 'show.html.php';
  15. $versionsTableBody = array();
  16. foreach($versionSpecs as $versionSpec)
  17. {
  18. /*
  19. $isMarked = in_array($versionSpec->version, $markedVersions);
  20. $isBuiltIn = $builtin == 1;
  21. $isFirstVersion = $versionSpec->version == 1;
  22. $isMainVersion = filter_var($versionSpec->version, FILTER_VALIDATE_INT) !== false;
  23. */
  24. $versionsTableBody[] = h::tr
  25. (
  26. $version == $versionSpec->version ? setClass('bg-secondary-50') : null,
  27. on::click("previewVersion"),
  28. h::td(setData(array('pivot' => $pivot->id, 'version' => $versionSpec->version, 'group' => $groupID)), '#' . $versionSpec->version),
  29. h::td
  30. (
  31. setData(array('pivot' => $pivot->id, 'version' => $versionSpec->version, 'group' => $groupID)),
  32. empty($versionSpec->desc) ? $lang->pivot->noDesc : $versionSpec->desc
  33. )
  34. );
  35. }
  36. formPanel
  37. (
  38. setID('pivotVersionPanel'),
  39. set::title("{$pivot->name} #{$version}"),
  40. set::shadow(false),
  41. set::headingClass('h-12'),
  42. set::bodyClass('pt-0'),
  43. to::titleSuffix
  44. (
  45. div
  46. (
  47. label
  48. (
  49. to::before
  50. (
  51. icon
  52. (
  53. setClass('warning-ghost margin-left8'),
  54. 'help'
  55. )
  56. ),
  57. set::text($lang->pivot->tipVersions),
  58. setClass('gray-200-pale')
  59. )
  60. )
  61. ),
  62. div
  63. (
  64. setClass('overflow-y-auto h-44'),
  65. h::table
  66. (
  67. set::className('versionTable table bordered table-hover'),
  68. h::tr
  69. (
  70. h::th($lang->pivot->versionNumber),
  71. h::th($lang->pivot->desc)
  72. ),
  73. $versionsTableBody
  74. )
  75. ),
  76. div
  77. (
  78. setID('pivotContent'),
  79. setClass('flex col gap-4 w-full'),
  80. $generateData()
  81. ),
  82. set::actions(array('submit')),
  83. set::submitBtnText($lang->pivot->switchTo)
  84. );