zen.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The zen file of personnel 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 Mengyi Liu <liumengyi@easycorp.ltd>
  8. * @package personnel
  9. * @link https://www.zentao.net
  10. */
  11. class personnelZen extends personnel
  12. {
  13. /**
  14. * 设置选择对象提示信息
  15. * Set select object tips.
  16. *
  17. * @param int $objectID
  18. * @param string $objectType
  19. * @param string $module
  20. * @access public
  21. * @return void
  22. */
  23. protected function setSelectObjectTips($objectID, $objectType, $module)
  24. {
  25. $this->app->loadLang('execution');
  26. $objectName = $this->lang->projectCommon . $this->lang->execution->or . $this->lang->execution->common;;
  27. if($objectType == 'program') $objectName = $this->lang->program->common;
  28. if($objectType == 'product') $objectName = $this->lang->productCommon;
  29. if($objectType == 'project') $objectName = $this->lang->projectCommon;
  30. $this->lang->personnel->selectObjectTips = sprintf($this->lang->personnel->selectObjectTips, $objectName);
  31. if($objectType == 'sprint' && $module == 'execution')
  32. {
  33. $execution = $this->loadModel('execution')->getByID($objectID);
  34. $this->lang->personnel->selectObjectTips = !empty($execution) && $execution->type == 'kanban' ? str_replace($this->lang->execution->common, $this->lang->execution->kanban, $this->lang->personnel->selectObjectTips) : $this->lang->personnel->selectObjectTips;
  35. }
  36. $this->view->objectName = $objectName;
  37. }
  38. }