linkcases.html.php 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php
  2. /**
  3. * The linkCases 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='mainContent' class='main-content clearfix'>
  15. <div class='main-header'>
  16. <h2>
  17. <span class='label label-id'><?php echo $deploy->id;?></span>
  18. <?php echo $deploy->name?>
  19. <small class='text-muted'> <?php echo $lang->deploy->linkCases;?> <?php echo html::icon($lang->icons['link']);?></small>
  20. <div class='heading-actions' style='display: inline-block; margin-top: -5px; margin-left: 10px;'>
  21. <?php
  22. echo "<span class='dropdown'>";
  23. echo "<button class='btn btn-primary btn-sm' type='button' data-toggle='dropdown'>{$lang->testtask->linkBySuite} <span class='caret'></span></button>";
  24. echo "<ul class='dropdown-menu' style='max-height:240px;overflow-y:auto'>";
  25. if($suiteList)
  26. {
  27. echo "<li>" . html::a(inlink('linkCases', "deployID=$deploy->id&type=all&param=0"), $lang->null) . "</li>";
  28. foreach($suiteList as $suiteID => $suite)
  29. {
  30. $active = ($type == 'bysuite' and (int)$param == $suiteID) ? "class='active'" : '';
  31. $suiteName = $suite->name;
  32. if($suite->type == 'public') $suiteName .= " <span class='label label-info'>{$lang->testsuite->authorList[$suite->type]}</span>";
  33. echo "<li $active>" . html::a(inlink('linkCases', "deployID=$deploy->id&type=bysuite&param=$suiteID"), $suiteName) . "</li>";
  34. }
  35. }
  36. else
  37. {
  38. echo "<li>" . html::a('###', $lang->testsuite->noticeNone) . "</li>";
  39. }
  40. echo "</ul></span>";
  41. ?>
  42. </div>
  43. </h2>
  44. <div class='pull-right btn-toolbar'>
  45. <?php echo html::linkButton("<i class='icon-back icon-level-up icon-large icon-rotate-270'></i> {$lang->goback}", inlink('cases', "deployID=$deploy->id"), 'self', '', 'btn btn-secondary');?>
  46. </div>
  47. </div>
  48. <div id='queryBox' data-module='testcase' class='show' data-url="<?php echo $this->createLink('search', 'buildOldForm', 'module=testcase');?>"></div>
  49. <form class='main-table' method='post' data-ride="table" target='hiddenwin'>
  50. <table class='table table-condensed table-hover table-striped table-fixed'>
  51. <caption class='text-left text-muted'>
  52. <?php echo html::icon('unlink');?> &nbsp;<strong><?php echo $lang->testtask->unlinkedCases;?></strong> (<?php echo $pager->recTotal;?>)
  53. </caption>
  54. <thead>
  55. <tr>
  56. <th class='c-id'>
  57. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
  58. <label></label>
  59. </div>
  60. <?php echo $lang->idAB;?>
  61. </th>
  62. <th class='w-pri'><?php echo $lang->priAB;?></th>
  63. <th><?php echo $lang->testcase->title;?></th>
  64. <th class='w-type'><?php echo $lang->testcase->type;?></th>
  65. </tr>
  66. </thead>
  67. <tbody>
  68. <?php foreach($cases as $case):?>
  69. <tr>
  70. <td class='c-id'>
  71. <div class="checkbox-primary">
  72. <input type='checkbox' name='cases[]' value='<?php echo $case->id;?>' />
  73. <label></label>
  74. </div>
  75. <?php printf('%03d', $case->id);?>
  76. </td>
  77. <td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
  78. <td class='text-left'><?php echo $case->title;?></td>
  79. <td><?php echo $lang->testcase->typeList[$case->type];?></td>
  80. </tr>
  81. <?php endforeach;?>
  82. </tbody>
  83. </table>
  84. <?php if($cases):?>
  85. <div class='table-footer'>
  86. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  87. <div class='table-actions btn-toolbar'><?php echo html::submitButton('', '', 'btn btn-primary');?></div>
  88. <?php echo html::backButton('', '', 'btn');?>
  89. <?php $pager->show('right', 'pagerjs');?>
  90. </td>
  91. </div>
  92. <?php endif;?>
  93. </form>
  94. </div>
  95. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>