riskview.html.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?php
  2. /**
  3. * The riskview of assetlib module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2020 禅道软件(青岛)有限公司(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 Shujie Tian <tianshujie@easycorp.ltd>
  8. * @package assetlib
  9. * @version $Id
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <?php $canRiskView = (common::hasPriv('risk', 'view') and helper::hasFeature('risk'));?>
  16. <div id="mainMenu" class="clearfix">
  17. <div class="btn-toolbar pull-left">
  18. <?php if(!isonlybody()):?>
  19. <?php echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
  20. <div class="divider"></div>
  21. <?php endif;?>
  22. <div class="page-title">
  23. <span class="label label-id"><?php echo $risk->id?></span>
  24. <span class="text" title='<?php echo $risk->name;?>'><?php echo $risk->name;?></span>
  25. </div>
  26. </div>
  27. </div>
  28. <div id="mainContent" class="main-row">
  29. <div class="main-col col-8">
  30. <div class="cell">
  31. <div class="detail">
  32. <div class="detail-title"><?php echo $lang->risk->prevention;?></div>
  33. <div class="detail-content article-content"><?php echo $risk->prevention;?></div>
  34. </div>
  35. <div class="detail">
  36. <div class="detail-title"><?php echo $lang->risk->remedy;?></div>
  37. <div class="detail-content article-content"><?php echo $risk->remedy;?></div>
  38. </div>
  39. <div class="detail">
  40. <div class="detail-title"><?php echo $lang->risk->resolution;?></div>
  41. <div class="detail-content article-content"><?php echo $risk->resolution;?></div>
  42. </div>
  43. </div>
  44. <?php $actionFormLink = $this->createLink('action', 'comment', "objectType=risk&objectID=$risk->id");?>
  45. <div class="cell"><?php include $app->getModuleRoot() . 'common/view/action.html.php';?></div>
  46. <div class='main-actions'>
  47. <div class="btn-toolbar">
  48. <?php common::printBack($browseLink);?>
  49. <?php
  50. common::printIcon('assetlib', 'editRisk', "riskID=$risk->id", $risk, 'button', 'edit');
  51. if($risk->status == 'draft') common::printIcon('assetlib', 'approveRisk', "riskID=$risk->id", $risk, 'button', 'glasses', '', 'iframe showinonlybody', true);
  52. common::printIcon('assetlib', 'removeRisk', "riskID=$risk->id", $risk, 'button', 'unlink', 'hiddenwin');
  53. ?>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="side-col col-4">
  58. <div class="cell">
  59. <div class='tabs'>
  60. <ul class='nav nav-tabs'>
  61. <li class='active'><a href='' data-toggle='tab'><?php echo $lang->risk->legendBasicInfo;?></a></li>
  62. </ul>
  63. <div class='tab-content'>
  64. <div class='tab-pane active' id='basicInfo'>
  65. <table class="table table-data">
  66. <tbody>
  67. <?php $widthClass = common::checkNotCN() ? 'w-100px' : 'w-80px';?>
  68. <tr>
  69. <th class='<?php echo $widthClass?>'><?php echo $lang->assetlib->sourceRisk;?></th>
  70. <td>
  71. <?php if($canRiskView):?>
  72. <?php echo html::a($this->createLink('risk', 'view', "riskID={$risk->from}"), $risk->sourceName)?>
  73. <?php else:?>
  74. <?php echo $risk->sourceName;?>
  75. <?php endif;?>
  76. </td>
  77. </tr>
  78. <tr>
  79. <th><?php echo $lang->risk->source;?></th>
  80. <td><?php echo zget($lang->risk->sourceList, $risk->source);?></td>
  81. </tr>
  82. <tr>
  83. <th><?php echo $lang->risk->category;?></th>
  84. <td><?php echo zget($lang->risk->categoryList, $risk->category, $risk->category);?></td>
  85. </tr>
  86. <tr>
  87. <th><?php echo $lang->risk->strategy;?></th>
  88. <td><?php echo zget($lang->risk->strategyList, $risk->strategy);?></td>
  89. </tr>
  90. <tr>
  91. <th><?php echo $lang->risk->status;?></th>
  92. <td><span class='status-story status-<?php echo $risk->status?>'><span class="label label-dot"></span> <?php echo zget($lang->assetlib->statusList, $risk->status);?></span></td>
  93. </tr>
  94. <tr>
  95. <th><?php echo $lang->risk->impact;?></th>
  96. <td><?php echo zget($lang->risk->impactList, $risk->impact);?></td>
  97. </tr>
  98. <tr>
  99. <th><?php echo $lang->risk->probability;?></th>
  100. <td><?php echo zget($lang->risk->probabilityList, $risk->probability);?></td>
  101. </tr>
  102. <tr>
  103. <th><?php echo $lang->risk->rate;?></th>
  104. <td><?php echo $risk->rate;?></td>
  105. </tr>
  106. <tr>
  107. <th><?php echo $lang->risk->pri;?></th>
  108. <td><span class='<?php echo 'pri-' . $risk->pri;?>' title='<?php echo zget($lang->risk->priList, $risk->pri)?>'><?php echo zget($lang->risk->priList, $risk->pri)?></span></td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="cell">
  117. <div class='tabs'>
  118. <ul class='nav nav-tabs'>
  119. <li class='active'><a href='' data-toggle='tab'><?php echo $lang->risk->legendLifeTime;?></a></li>
  120. </ul>
  121. <div class='tab-content'>
  122. <div class='tab-pane active' id='legendLifeTime'>
  123. <table class="table table-data">
  124. <tbody>
  125. <tr>
  126. <th class='<?php echo $widthClass?>'><?php echo $lang->assetlib->importedBy;?></th>
  127. <td><?php echo zget($users, $risk->createdBy);?></td>
  128. </tr>
  129. <tr>
  130. <th><?php echo $lang->assetlib->importedDate;?></th>
  131. <td><?php echo helper::isZeroDate($risk->createdDate) ? '' : $risk->createdDate;?></td>
  132. </tr>
  133. <tr>
  134. <th><?php echo $lang->assetlib->approvedBy;?></th>
  135. <td><?php if($risk->status == 'active') echo zget($users, $risk->assignedTo);?></td>
  136. </tr>
  137. <tr>
  138. <th><?php echo $lang->assetlib->approvedDate;?></th>
  139. <td><?php echo helper::isZeroDate($risk->approvedDate) ? '' : $risk->approvedDate;?></td>
  140. </tr>
  141. <tr>
  142. <th><?php echo $lang->risk->editedBy;?></th>
  143. <td><?php echo zget($users, $risk->editedBy);?></td>
  144. </tr>
  145. <tr>
  146. <th><?php echo $lang->risk->editedDate;?></th>
  147. <td><?php echo helper::isZeroDate($risk->editedDate) ? '' : $risk->editedDate;?></td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>