importexecution.html.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The importexecution view file of kanban 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 Yuting Wang <wangyuting@easycorp.ltd>
  7. * @package kanban
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('kanbanID', $kanbanID);
  12. jsVar('regionID', $regionID);
  13. jsVar('groupID', $groupID);
  14. jsVar('columnID', $columnID);
  15. jsVar('methodName', $this->app->rawMethod);
  16. featureBar
  17. (
  18. inputGroup
  19. (
  20. span(setClass('input-group-addon'), $lang->kanban->selectedProject),
  21. picker(set::name('project'), set::items($projects), set::value($selectedProjectID), set::style(array('width' => '200px')), set('data-on', 'change'), set('data-call', 'changeProject'), set::required(true)),
  22. span(setClass('input-group-addon'), $lang->kanban->selectedLane),
  23. picker(set::name('lane'), set::items($lanePairs), set::style(array('width' => '200px')), set::required(true))
  24. )
  25. );
  26. $config->execution->dtable->fieldList['rawID']['name'] = 'id';
  27. $config->execution->dtable->fieldList['nameCol']['name'] = 'name';
  28. $config->execution->dtable->fieldList['nameCol']['type'] = 'title';
  29. $config->execution->dtable->fieldList['PM']['type'] = 'user';
  30. unset($config->execution->dtable->fieldList['nameCol']['link']);
  31. unset($config->execution->dtable->fieldList['nameCol']['nestedToggle']);
  32. unset($config->execution->dtable->fieldList['project']);
  33. unset($config->execution->dtable->fieldList['openedDate']);
  34. unset($config->execution->dtable->fieldList['begin']);
  35. unset($config->execution->dtable->fieldList['realBegan']);
  36. unset($config->execution->dtable->fieldList['realEnd']);
  37. unset($config->execution->dtable->fieldList['progress']);
  38. unset($config->execution->dtable->fieldList['burn']);
  39. unset($config->execution->dtable->fieldList['actions']);
  40. foreach($config->execution->dtable->fieldList as $id => $field) $config->execution->dtable->fieldList[$id]['sortType'] = false;
  41. $cols = array_values($config->execution->dtable->fieldList);
  42. foreach($cols as $key => $col)
  43. {
  44. if($cols[$key]['name'] == 'name') $cols[$key]['title'] = $lang->kanban->importExecution;
  45. if($cols[$key]['name'] == 'PM') $cols[$key]['title'] = $lang->execution->execPM;
  46. if($cols[$key]['name'] == 'deliverable') unset($cols[$key]);
  47. }
  48. formBase
  49. (
  50. setID('linkForm'),
  51. set::actions(''),
  52. setClass('mt-2'),
  53. dtable
  54. (
  55. set::fixedLeftWidth('0.33'),
  56. set::checkable(true),
  57. set::userMap($users),
  58. set::cols(array_values($cols)),
  59. set::data(array_values($executions2Imported)),
  60. set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importExecution', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
  61. set::footPager(usePager())
  62. )
  63. );