browserelation.html.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * The browseRelation view file of custom module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(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 Qiyu Xie<xieqiyu@chandao.com>
  7. * @package custom
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $tableData = initTableData($relationList, $config->custom->browseRelation->dtable->fieldList);
  12. $isEn = $app->getClientLang() == 'en';
  13. featureBar
  14. (
  15. div
  16. (
  17. setClass('text-md font-bold' . ($isEn ? ' flex items-center gap-1' : '')),
  18. $lang->custom->relation,
  19. span
  20. (
  21. setClass('text-sm text-warning font-medium px-1'),
  22. icon('help'),
  23. $isEn ? set::style(array('white-space' => 'break-spaces')) : null,
  24. $lang->custom->relationTip
  25. )
  26. )
  27. );
  28. toolbar
  29. (
  30. hasPriv('custom', 'createRelation') ? btn
  31. (
  32. set::icon('plus'),
  33. set::className('primary'),
  34. set::url(createLink('custom', 'createRelation')),
  35. setData('toggle', 'modal'),
  36. $lang->custom->createRelation
  37. ) : null
  38. );
  39. dtable
  40. (
  41. set::bordered(true),
  42. set::cols($config->custom->browseRelation->dtable->fieldList),
  43. set::data($tableData),
  44. set::onRenderCell(jsRaw('window.renderCell'))
  45. );