browse.html.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * The browse view file of dimension 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 Tingting Dai <daitingting@easycorp.ltd>
  7. * @package dimension
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('canNotDelete', $lang->dimension->canNotDelete);
  12. jsVar('confirmDelete', $lang->dimension->confirmDelete);
  13. $dimensions = initTableData($dimensions, $config->dimension->dtable->fieldList, $this->dimension);
  14. featureBar();
  15. toolBar
  16. (
  17. hasPriv('dimension', 'create') ? item
  18. (
  19. set(array
  20. (
  21. 'icon' => 'plus',
  22. 'text' => $lang->dimension->create,
  23. 'class' => 'primary pull-right',
  24. 'url' => createLink('dimension', 'create'),
  25. 'data-toggle' => 'modal',
  26. ))
  27. ) : null
  28. );
  29. foreach($dimensions as $dimension)
  30. {
  31. foreach($dimension->actions as $key => $action)
  32. {
  33. if($action['name'] == 'delete') $dimension->actions[$key]['data-params'] = $dimension->id;
  34. }
  35. }
  36. dtable
  37. (
  38. set::cols($config->dimension->dtable->fieldList),
  39. set::data($dimensions)
  40. );
  41. render();