cases.html.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * The cases view file of deploy module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(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 Yidong Wang <yidong@cnezsoft.com>
  8. * @package deploy
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <div id='mainMenu' class='clearfix'>
  15. <?php include './nav.html.php';?>
  16. <div class='btn-toolbar pull-right'>
  17. <?php
  18. $browseLink = $this->session->stepList ? $this->session->stepList : inlink('steps', "deployID=$deploy->id");
  19. $params = "deployID=$deploy->id";
  20. common::printLink('deploy', 'linkCases', $params, "<i class='icon icon-link'></i> " . $lang->deploy->linkCases, '', "class='btn btn-primary'");
  21. echo html::linkButton("<i class='icon-back icon-level-up icon-large icon-rotate-270'></i> " . $lang->goback, $browseLink, 'self', '', 'btn btn-secondary');
  22. ?>
  23. </div>
  24. </div>
  25. <?php if(empty($cases)):?>
  26. <div class='table-empty-tip'><?php echo $lang->noData;?></div>
  27. <?php else:?>
  28. <div id='mainContent'>
  29. <form class='main-table' method='post' data-ride='table' target='hiddenwin' action='<?php echo $this->createLink('deploy', 'batchUnlinkCases', "deployID={$deploy->id}")?>'>
  30. <table class='table table-condensed table-fixed'>
  31. <thead>
  32. <tr>
  33. <th class="w-100px">
  34. <?php if(common::hasPriv('deploy', 'batchUnlinkCases')):?>
  35. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  36. <label></label>
  37. </div>
  38. <?php endif;?>
  39. <?php echo $lang->idAB?>
  40. </th>
  41. <th class='w-pri'><?php echo $lang->priAB?></th>
  42. <th><?php echo $lang->testcase->title?></th>
  43. <th class='w-70px'><?php echo $lang->testcase->type?></th>
  44. <th class='w-50px'><?php echo $lang->actions?></th>
  45. <tr>
  46. </thead>
  47. <tbody>
  48. <?php foreach($cases as $case):?>
  49. <tr>
  50. <td class='c-id'>
  51. <?php if(common::hasPriv('deploy', 'batchUnlinkCases')):?>
  52. <?php echo html::checkbox('idList', array($case->id => $case->id));?>
  53. <?php endif;?>
  54. </td>
  55. <td><span class="label-pri label-pri-<?php echo $case->pri?>"><?php echo zget($lang->testcase->priList, $case->pri)?></span></td>
  56. <td title='<?php echo $case->title?>'><?php echo html::a($this->createLink('testcase', 'view', "id={$case->id}"), $case->title);?></td>
  57. <td><?php echo zget($lang->testcase->typeList, $case->type, '');?></td>
  58. <td class='c-actions'><?php common::printLink('deploy', 'unlinkCase', "deploy=$deploy->id&id=$case->id", "<i class='icon icon-unlink'></i>", 'hiddenwin', "class='btn' title='{$lang->unlink}'");?></td>
  59. </tr>
  60. <?php endforeach;?>
  61. </tbody>
  62. </table>
  63. <?php if(common::hasPriv('deploy', 'batchUnlinkCases') and $cases):?>
  64. <div class='table-footer'>
  65. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  66. <div class='table-actions btn-toolbar'>
  67. <?php echo html::submitButton($lang->deploy->unlinkCase, '', 'btn btn-primary');?>
  68. </div>
  69. </div>
  70. <?php endif;?>
  71. </form>
  72. </div>
  73. <?php endif;?>
  74. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>