nc.html.php 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php js::set('browseType', $browseType);?>
  3. <?php js::set('mode', $mode);?>
  4. <?php js::set('total', $pager->recTotal);?>
  5. <?php js::set('rawMethod', $app->rawMethod);?>
  6. <?php js::set('todoCount', $todoCount);?>
  7. <?php js::set('isMax', $isMax);?>
  8. <?php js::set('isBiz', $isBiz);?>
  9. <?php js::set('isOpenedURAndSR', $isOpenedURAndSR);?>
  10. <style>
  11. .c-severity {width: 100px}
  12. .c-date {width: 110px;}
  13. [lang^=zh] .c-date {width: 100px;}
  14. </style>
  15. <div id="mainMenu" class="clearfix">
  16. <div class="btn-toolbar pull-left">
  17. <?php
  18. foreach($lang->my->featureBar[$app->rawMethod]['nc'] as $key => $name)
  19. {
  20. $label = "<span class='text'>{$name}</span>";
  21. $label .= $key == $browseType ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
  22. $active = $key == $browseType ? 'btn-active-text' : '';
  23. $keyParam = $key == 'auditplan' ? 'mychecking' : $key;
  24. $modeParam = $key == 'auditplan' ? 'auditplan' : 'nc';
  25. echo html::a(inlink($app->rawMethod, "mode=$modeParam&type=$keyParam"), $label, '', "class='btn btn-link $active'");
  26. }
  27. ?>
  28. </div>
  29. </div>
  30. <div id="mainContent" class='main-table'>
  31. <?php if(empty($ncs)):?>
  32. <div class="table-empty-tip">
  33. <p>
  34. <span class="text-muted"><?php echo $lang->noData;?></span>
  35. </p>
  36. </div>
  37. <?php else:?>
  38. <form id='myTaskForm' class="main-table table-risk" data-ride="table" method="post">
  39. <?php $vars = "mode=$mode&browseType=$browseType&param=$param&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID"; ?>
  40. <table class="table has-sort-head table-fixed" id='projectList'>
  41. <thead>
  42. <tr>
  43. <th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
  44. <th class='c-name text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->my->ncName);?></th>
  45. <th class='text-left c-project'><?php common::printOrderLink('project', $orderBy, $vars, $lang->my->projects);?></th>
  46. <th class='c-severity'><?php common::printOrderLink('severity', $orderBy, $vars, $lang->my->ncSeverity);?></th>
  47. <th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->my->ncStatus);?></th>
  48. <th class='c-user'><?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->my->ncCreatedBy);?></th>
  49. <th class='c-date'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->my->ncCreatedDate);?></th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <?php foreach($ncs as $nc):?>
  54. <?php $from = (isset($nc->model) and $nc->model == 'scrum') ? 'execution' : 'project';?>
  55. <?php $ncLink = $this->createLink('nc', 'view', "ncID=$nc->id&from=$from", '', '', $nc->project);?>
  56. <tr>
  57. <td><?php echo $nc->id;?></td>
  58. <td class='text-left' title="<?php echo $nc->title;?>"><?php echo html::a($ncLink, $nc->title);?></td>
  59. <td class='text-left' title="<?php echo zget($projects, $nc->project);?>"><?php echo zget($projects, $nc->project);?></td>
  60. <td class='c-severity'><span class='severity-<?php echo $nc->severity;?>'><?php echo zget($lang->nc->severityList, $nc->severity);?></span></td>
  61. <td><?php echo zget($lang->nc->statusList, $nc->status);?></td>
  62. <td><?php echo zget($users, $nc->createdBy);?></td>
  63. <td><?php echo substr($nc->createdDate, 0, 10);?></td>
  64. </tr>
  65. <?php endforeach;?>
  66. </tbody>
  67. </table>
  68. <div class='table-footer'>
  69. <?php $pager->show('right', 'pagerjs');?>
  70. </div>
  71. </form>
  72. <?php endif;?>
  73. </div>
  74. <script>
  75. $('.' + browseType).addClass('btn-active-text');
  76. </script>
  77. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>