viewcard.html.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * The viewcard view file of kanban 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 Yuting Wang <wangyuting@easycorp.ltd>
  8. * @package kanban
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $assignedToList = '';
  13. $assignedToPairs = array_filter(explode(',', $card->assignedTo));
  14. foreach($assignedToPairs as $index => $assignedTo)
  15. {
  16. $userName = \zget($users, $assignedTo, '');
  17. if($userName) $assignedToList .= $userName . ' ';
  18. }
  19. detailHeader
  20. (
  21. to::title
  22. (
  23. entityLabel
  24. (
  25. set::entityID($card->id),
  26. set::level(1),
  27. set::text($card->name)
  28. )
  29. )
  30. );
  31. $actions = $this->loadModel('common')->buildOperateMenu($card);
  32. $canModify = !empty($this->config->CRKanban) || $kanban->status != 'closed';
  33. detailBody
  34. (
  35. sectionList
  36. (
  37. set::style(array('padding' => '0px 0px 20px 0px')),
  38. section
  39. (
  40. set::title($lang->kanbancard->desc),
  41. set::content($card->desc),
  42. set::useHtml(true)
  43. )
  44. ),
  45. history(set(array('objectType' => 'kanbancard', 'objectID' => $card->id))),
  46. $canModify ? floatToolbar
  47. (
  48. set::object($card),
  49. isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), set::className('ghost text-white'), $lang->goback)),
  50. set::main($actions['mainActions']),
  51. set::suffix($actions['suffixActions'])
  52. ) : null,
  53. detailSide
  54. (
  55. tabs
  56. (
  57. set::collapse(true),
  58. tabPane
  59. (
  60. set::key(''),
  61. set::title($lang->kanbancard->legendBasicInfo),
  62. set::active(true),
  63. tableData
  64. (
  65. item(set::name($lang->kanbancard->assignedTo), $assignedToList),
  66. item(set::name($lang->kanbancard->space), $space->name),
  67. item(set::name($lang->kanbancard->kanban), $kanban->name),
  68. item(set::name($lang->kanbancard->begin), $card->begin),
  69. item(set::name($lang->kanbancard->end), $card->end),
  70. item(set::name($lang->kanbancard->pri), priLabel($card->pri)),
  71. item(set::name($lang->kanbancard->estimate), round((float)$card->estimate, 2) . ' ' . $lang->kanbancard->lblHour),
  72. $kanban->performable ? item(set::name($lang->kanbancard->progress), round((float)$card->progress, 2) . ' %') : null
  73. )
  74. )
  75. ),
  76. tabs
  77. (
  78. set::collapse(true),
  79. tabPane
  80. (
  81. set::key('legendLifeTime'),
  82. set::title($lang->kanbancard->legendLifeTime),
  83. set::active(true),
  84. tableData
  85. (
  86. item(set::name($lang->kanbancard->createdBy), \zget($users, $card->createdBy) . $lang->at . $card->createdDate),
  87. item(set::name($lang->kanbancard->archivedBy), $card->archivedBy ? \zget($users, $card->archivedBy) . $lang->at . $card->archivedDate : ''),
  88. item(set::name($lang->kanbancard->lastEditedBy), $card->lastEditedBy ? \zget($users, $card->lastEditedBy) . $lang->at . $card->lastEditedDate : '')
  89. )
  90. )
  91. )
  92. )
  93. );
  94. render();