details.html.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * The details file of metriclib module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author zhouxin<zhouxin@easycorp.ltd>
  8. * @package metriclib
  9. * @link http://www.zentao.net
  10. */
  11. namespace zin;
  12. $buildItems = function($items): array
  13. {
  14. $itemList = array();
  15. foreach($items as $item)
  16. {
  17. $itemList[] = item
  18. (
  19. set::name($item['name']),
  20. !empty($item['href']) ? a
  21. (
  22. set::href($item['href']),
  23. !empty($item['attr']) && is_array($item['attr']) ? set($item['attr']) : null,
  24. html($item['text'])
  25. ) : html($item['text']),
  26. set::collapse(!empty($item['text']))
  27. );
  28. }
  29. return $itemList;
  30. };
  31. detailHeader
  32. (
  33. to::title
  34. (
  35. entityLabel
  36. (
  37. setClass('text-xl font-black'),
  38. set::level(1),
  39. set::text($lang->metriclib->libraryDetails)
  40. )
  41. )
  42. );
  43. panel
  44. (
  45. setClass('clear-shadow'),
  46. set::bodyClass('relative'),
  47. div
  48. (
  49. tableData
  50. (
  51. $buildItems($libDetails)
  52. )
  53. )
  54. );
  55. render();