view.html.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * The view file of budget module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Guangming Sun<sunguangming@chandao.com>
  8. * @package budget
  9. * @link http://www.zentao.net
  10. */
  11. namespace zin;
  12. $operateList = $this->loadModel('common')->buildOperateMenu($budget);
  13. $actions = $operateList['mainActions'] ?? array();
  14. if(!empty($operateList['suffixActions'])) $actions = array_merge($actions, $operateList['suffixActions']);
  15. $basicInfoItems = array();
  16. $basicInfoItems[$lang->budget->stage] = array('control' => 'text', 'text' => zget($plans, $budget->stage));
  17. $basicInfoItems[$lang->budget->subject] = array('control' => 'text', 'text' => zget($subjects, $budget->subject));
  18. $basicInfoItems[$lang->budget->amount] = array('control' => 'text', 'text' => $budget->amount);
  19. $basicInfoItems[$lang->budget->createdBy] = array('control' => 'text', 'text' => zget($users, $budget->createdBy));
  20. $basicInfoItems[$lang->budget->createdDate] = array('control' => 'text', 'text' => $budget->createdDate);
  21. $basicInfoItems[$lang->budget->lastEditedBy] = array('control' => 'text', 'text' => zget($users, $budget->lastEditedBy));
  22. $basicInfoItems[$lang->budget->lastEditedDate] = array('control' => 'text', 'text' => $budget->lastEditedDate);
  23. $sections = array();
  24. $sections[] = setting()
  25. ->title($lang->budget->desc)
  26. ->control('html')
  27. ->content(empty($budget->desc) ? $lang->noDesc : $budget->desc);
  28. $tabs = array();
  29. $tabs[] = setting()->group('basic')->title($lang->budget->basicInfo)->control('datalist')->items($basicInfoItems);
  30. if($budget->deleted == '1') $actions = array();
  31. detail
  32. (
  33. set::objectType('budget'),
  34. set::objectID($budget->id),
  35. set::sections($sections),
  36. set::tabs($tabs),
  37. set::actions(array_values($actions))
  38. );