importplan.html.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * The importplan 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(set::className('input-group-addon'), $lang->kanban->selectedProduct),
  21. picker(set::name('product'), set::items($products), set::value($selectedProductID), set::style(array('width' => '200px')), set('data-on', 'change'), set('data-call', 'changeProduct'), set::required(true)),
  22. span(set::className('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. unset($config->productplan->dtable->fieldList['title']['link']);
  27. unset($config->productplan->dtable->fieldList['title']['nestedToggle']);
  28. unset($config->productplan->dtable->fieldList['branch']);
  29. unset($config->productplan->dtable->fieldList['execution']);
  30. unset($config->productplan->dtable->fieldList['actions']);
  31. foreach($config->productplan->dtable->fieldList as $id => $field) $config->productplan->dtable->fieldList[$id]['sortType'] = false;
  32. foreach($plans2Imported as $plan)
  33. {
  34. if($plan->begin == $this->config->productplan->future) $plan->begin = $this->lang->productplan->future;
  35. if($plan->end == $this->config->productplan->future) $plan->end = $this->lang->productplan->future;
  36. }
  37. formBase
  38. (
  39. set::id('linkForm'),
  40. set::actions(''),
  41. set::className('mt-2'),
  42. dtable
  43. (
  44. set::id('linkPlan'),
  45. set::fixedLeftWidth('0.33'),
  46. set::checkable(true),
  47. set::sortType(false),
  48. set::cols(array_values($config->productplan->dtable->fieldList)),
  49. set::data(array_values($plans2Imported)),
  50. set::footToolbar(array('items' => array(array('text' => $lang->kanban->importAB, 'btnType' => 'primary', 'className' => 'size-sm batch-btn', 'data-url' => inlink('importplan', "kanbanID=$kanbanID&regionID=$regionID&groupID=$groupID&columnID=$columnID"))))),
  51. set::footPager(usePager())
  52. )
  53. );