risk.html.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * The risk view file of dashboard module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2021 禅道软件(青岛)有限公司(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 Yuchun Li <liyuchun@cnezsoft.com>
  8. * @package dashboard
  9. * @version $Id: risk.html.php 4771 2021-01-13 14:18:02Z $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/tablesorter.html.php';?>
  15. <?php include $app->getModuleRoot() . 'user/view/featurebar.html.php';?>
  16. <style>
  17. .pri-low {color: #313C52;}
  18. .pri-middle {color: #FF9F46;}
  19. .pri-high {color: #FB2B2B;}
  20. </style>
  21. <div id='mainContent'>
  22. <nav id='contentNav'>
  23. <ul class='nav nav-default'>
  24. <?php
  25. foreach($lang->user->featureBar['risk'] as $key => $name)
  26. {
  27. $active = $key == $type ? 'active' : '';
  28. echo "<li class='$active'>" . html::a(inlink('risk', "userID={$user->id}&type=$key"), $name) . "</li>";
  29. }
  30. ?>
  31. </ul>
  32. </nav>
  33. <div class='main-table'>
  34. <table class="table has-sort-head table-fixed" id='risktable'>
  35. <?php $vars = "userID={$user->id}&type=$type&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID"; ?>
  36. <thead>
  37. <tr>
  38. <th class='text-left w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->risk->id);?></th>
  39. <th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->risk->name);?></th>
  40. <th class='c-pri text-center'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->risk->priAB);?></th>
  41. <th class='w-80px text-center'><?php common::printOrderLink('rate', $orderBy, $vars, $lang->risk->rate);?></th>
  42. <th class='w-80px'><?php common::printOrderLink('status', $orderBy, $vars, $lang->risk->status);?></th>
  43. <th class='w-120px'><?php common::printOrderLink('category', $orderBy, $vars, $lang->risk->category);?></th>
  44. <th class='w-120px'><?php common::printOrderLink('identifiedDate', $orderBy, $vars, $lang->risk->identifiedDate);?></th>
  45. <th class='w-80px'><?php common::printOrderLink('strategy', $orderBy, $vars, $lang->risk->strategy);?></th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <?php foreach($risks as $risk):?>
  50. <tr>
  51. <td><?php echo $risk->id;?></td>
  52. <td><?php echo html::a($this->createLink('risk', 'view', "riskID=$risk->id"), $risk->name, '', "data-app='project'");?></td>
  53. <td class='text-center'><?php echo "<span class='pri-{$risk->pri}'>" . zget($lang->risk->priList, $risk->pri) . "</span>";?></td>
  54. <td class='text-center'><?php echo $risk->rate;?></td>
  55. <td class="status-risk status-<?php echo $risk->status;?>"><?php echo zget($lang->risk->statusList, $risk->status);?></td>
  56. <td><?php echo zget($lang->risk->categoryList, $risk->category);?></td>
  57. <td><?php echo $risk->identifiedDate == '0000-00-00' ? '' : $risk->identifiedDate;?></td>
  58. <td><?php echo zget($lang->risk->strategyList, $risk->strategy);?></td>
  59. </tr>
  60. <?php endforeach;?>
  61. </tbody>
  62. </table>
  63. <?php if($risks):?>
  64. <div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
  65. <?php endif;?>
  66. </div>
  67. </div>
  68. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>