batchactivate.html.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * The batchactivate view file of bug module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author zenggang <zenggang@easycorp.ltd>
  8. * @package bug
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $items = array();
  13. $items[] = array('name' => 'status', 'label' => '');
  14. $items[] = array('name' => 'id', 'label' => '');
  15. $items[] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '40px');
  16. $items[] = array('name' => 'title', 'label' => $lang->bug->title, 'control' => 'static', 'width' => '120px');
  17. $items[] = array('name' => 'assignedTo', 'label' => $lang->bug->assignedTo, 'control' => 'picker', 'width' => '160px', 'items' => $users);
  18. $items[] = array('name' => 'openedBuild', 'label' => $lang->bug->openedBuild, 'control' => 'picker', 'multiple' => true, 'width' => '200px', 'items' => $builds);
  19. $items[] = array('name' => 'comment', 'label' => $lang->bug->legendComment, 'control' => 'input', 'width' => '1/3');
  20. foreach($bugs as $bug)
  21. {
  22. if($bug->status != 'active') $bug->assignedTo = $bug->resolvedBy;
  23. }
  24. formBatchPanel
  25. (
  26. set::title($lang->bug->common . $lang->hyphen . $lang->bug->batchActivate),
  27. set::mode('edit'),
  28. set::items($items),
  29. set::data(array_values($bugs))
  30. );
  31. render();