project.html.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * The project view file of workflowgroup 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 Guangming Sun <sunguangming@chandao.com>
  7. * @package workflowgroup
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('buildinLang', $lang->workflow->buildin);
  12. jsVar('kanbanNotice', $lang->workflowgroup->notice->kanbanDisabled);
  13. featurebar
  14. (
  15. set::current($browseType),
  16. set::linkParams("browseType={key}&orderBy={$orderBy}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}")
  17. );
  18. hasPriv('workflowgroup', 'create') ? toolbar
  19. (
  20. item(set(array('icon' => 'plus', 'class' => 'primary', 'data-toggle' => 'modal', 'text' => $lang->workflowgroup->createProject, 'url' => inlink('create', 'type=project'))))
  21. ) : null;
  22. $cols = $config->workflowgroup->dtable->project->fieldList;
  23. $cols['actions']['list']['delete']['data-confirm'] = sprintf($lang->workflowgroup->notice->confirmDelete, $lang->projectCommon);
  24. if(isset($cols['projectModel']['map'])) $cols['projectModel']['map']['kanban'] = $lang->kanban->common;
  25. if(!helper::hasFeature('process') && isset($cols['actions']['list']['design']['url'])) $cols['actions']['list']['design']['url']['method'] = 'design';
  26. $data = initTableData($groups, $cols, $this->workflowgroup);
  27. foreach($data as $workflowgroup)
  28. {
  29. if($workflowgroup->main == '0') continue;
  30. foreach($workflowgroup->actions as $i => $action)
  31. {
  32. if(in_array($action['name'], array('edit', 'delete'))) $workflowgroup->actions[$i]['disabled'] = true;
  33. }
  34. }
  35. dtable
  36. (
  37. set::cols($cols),
  38. set::data($data),
  39. set::orderBy($orderBy),
  40. set::onRenderCell(jsRaw('window.renderCell')),
  41. set::sortLink(createLink('workflowgroup', 'project', "$browseType={$browseType}&orderBy={name}_{sortType}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}")),
  42. set::footPager(usePager())
  43. );