assignto.html.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * The edit view of task 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 sunguangming<sunguangming@easycorp.ltd>
  8. * @package task
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. /* zin: Define the form in main content */
  13. if(!empty($task->members) && strpos('wait,doing,pause', $task->status) !== false && (!isset($task->members[$app->user->account]) || $task->mode == 'linear'))
  14. {
  15. $notice = '';
  16. if($task->mode == 'linear')
  17. {
  18. $notice = $lang->task->transferNotice;
  19. }
  20. else
  21. {
  22. $notice = html(sprintf($lang->task->deniedNotice, '<strong>' . $lang->task->teamMember . '</strong>', $lang->task->transfer));
  23. }
  24. div
  25. (
  26. setClass('alert with-icon my-8'),
  27. icon('exclamation-sign text-gray text-4xl'),
  28. div
  29. (
  30. setClass('content'),
  31. $notice
  32. )
  33. );
  34. }
  35. else
  36. {
  37. modalHeader(set::title($lang->task->assignAction));
  38. formPanel
  39. (
  40. set::submitBtnText($lang->task->assignedTo),
  41. formGroup
  42. (
  43. set::width("1/3"),
  44. set::name("assignedTo"),
  45. set::label($lang->task->assignedTo),
  46. set::value((empty($task->team) or strpos('done,cancel,closed', $task->status) !== false) ? $task->assignedTo : $task->nextUser),
  47. set::control(array('control' => 'taskAssignedTo', 'manageLink' => ($manageLink ? $manageLink : ''))),
  48. set::items($members)
  49. ),
  50. $task->status != 'done' && $task->status != 'closed' && $task->isParent == '0' ? formGroup
  51. (
  52. set::width("1/3"),
  53. set::label($lang->task->left),
  54. set::required(true),
  55. inputControl
  56. (
  57. input
  58. (
  59. setID('left'),
  60. set::name('left'),
  61. set::value($task->left),
  62. set::type('text'),
  63. set::disabled(false)
  64. ),
  65. to::suffix($lang->task->suffixHour),
  66. set::suffixWidth(20)
  67. )
  68. ) : null,
  69. formGroup
  70. (
  71. set::name("comment"),
  72. set::label($lang->comment),
  73. set::control("editor")
  74. )
  75. );
  76. hr();
  77. history
  78. (
  79. set::objectID($task->id)
  80. );
  81. }
  82. render();