browse.html.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /**
  3. * The browse 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. <?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
  15. <div id='mainMenu'>
  16. <div class='heading'>
  17. <div class='dropdown'>
  18. <button class='btn btn-link dropdown-toggle' type='button' data-toggle='dropdown' style='color:rgb(20, 20, 20)'>
  19. <strong><?php echo date($lang->deploy->monthFormat, strtotime($date))?></strong>
  20. <span class='caret'></span>
  21. </button>
  22. <ul class='dropdown-menu'>
  23. <?php list($currentYear, $currentMonth) = explode('-', $date);?>
  24. <?php foreach($dateList as $year => $months):?>
  25. <li class='dropdown-submenu'>
  26. <a href='###'><?php echo $year;?></a>
  27. <ul class='dropdown-menu'>
  28. <?php foreach($months as $monthKey => $monthName):?>
  29. <?php $monthKey = sprintf('%02d', $monthKey);?>
  30. <li class='<?php echo $monthKey == $currentMonth ? 'active' : ''?>'>
  31. <?php echo html::a(inlink('browse', "product=$product&date={$year}{$monthKey}"), $lang->datepicker->monthNames[$monthName]);?>
  32. </li>
  33. <?php endforeach;?>
  34. </ul>
  35. </li>
  36. <?php endforeach;?>
  37. </ul>
  38. <div class='pull-right'>
  39. <?php if(common::hasPriv('ops', 'stage')) echo html::a($this->createLink('ops', 'stage'), "<i class='icon-waterfall'></i>" . $this->lang->deploy->stage, '', "class='btn ghost' data-app='admin'");?>
  40. <?php if(common::hasPriv('deploy', 'create')) echo html::a($this->createLink('deploy', 'create'), "<i class='icon-plus'></i> {$this->lang->deploy->create}", '', "class='btn btn-primary'");?>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div id='mainContent' class='main-content'>
  46. <div id='kanban'>
  47. <table class='boards-layout table' id='kanbanHeader'>
  48. <thead>
  49. <tr>
  50. <?php foreach($lang->deploy->dateList as $dateKey => $dateName):?>
  51. <th class='col-<?php echo $dateKey?>'><?php echo $dateName?></th>
  52. <?php endforeach;?>
  53. </tr>
  54. </thead>
  55. </table>
  56. <table class='boards-layout table active-disabled' id='kanbanWrapper'>
  57. <thead>
  58. <tr>
  59. <?php foreach($lang->deploy->dateList as $dateKey => $dateName):?>
  60. <th class='col-<?php echo $dateKey?>'></th>
  61. <?php endforeach;?>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <tr>
  66. <?php foreach($lang->deploy->dateList as $dateKey => $dateName):?>
  67. <td class='col-droppable col-<?php echo $dateKey?>' data-id='<?php echo $dateKey?>'>
  68. <?php foreach($plans[$dateKey] as $plan):?>
  69. <div class='board board-deploy board-deploy-<?php echo $dateKey ?>' data-id='<?php echo $plan->id?>' id='deploy-<?php echo $plan->id?>'>
  70. <div class='board-title'>
  71. <?php
  72. echo html::a($this->createLink('deploy', 'steps', "id=$plan->id"), $plan->name, '', 'title="' . $plan->name . '"');
  73. ?>
  74. <div class='board-actions'>
  75. <div class='dropdown'>
  76. <button type='button' class='btn btn-mini btn-link dropdown-toggle' data-toggle='dropdown'>
  77. <span class='icon-ellipsis-v'></span>
  78. </button>
  79. <div class='dropdown-menu pull-right'>
  80. <?php
  81. echo (common::hasPriv('deploy', 'finish', $plan) and deployModel::isClickable($plan, 'finish')) ? html::a($this->createLink('deploy', 'finish', "deployID=$plan->id", '', 'true'), $lang->deploy->finish, '', "class='kanbanFrame' data-toggle='modal'") : '';
  82. echo (common::hasPriv('deploy', 'activate', $plan) and deployModel::isClickable($plan, 'activate')) ? html::a($this->createLink('deploy', 'activate', "deployID=$plan->id", '', 'true'), $lang->deploy->activate, '', "class='kanbanFrame' data-toggle='modal'") : '';
  83. echo (common::hasPriv('deploy', 'edit', $plan)) ? html::a($this->createLink('deploy', 'edit', "deployID=$plan->id", '', 'true'), $lang->deploy->edit, '', "class='kanbanFrame'") : '';
  84. echo (common::hasPriv('deploy', 'delete', $plan)) ? html::a($this->createLink('deploy', 'delete', "deployID=$plan->id"), $lang->deploy->delete, 'hiddenwin') : '';
  85. ?>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class='board-footer clearfix'>
  91. <span class="deploy-owner" title='<?php echo $lang->deploy->owner?>'>
  92. <i class='icon icon-user'></i>
  93. <small> <?php echo zget($users, $plan->owner);?></small>
  94. </span>
  95. <?php if($dateKey == 'done'):?>
  96. <span class="deploy-result pull-right <?php echo $plan->result == 'fail' ? 'text-danger' : 'success'?>" title='<?php echo $lang->deploy->result?>'>
  97. <i class='icon <?php echo $plan->result == 'fail' ? 'icon-close' : 'icon-check'?> resultIcon'></i>
  98. <small> <?php echo zget($lang->deploy->resultList, $plan->result);?></small>
  99. </span>
  100. <?php else:?>
  101. <span class='pull-right'>
  102. <?php
  103. $begin = ($dateKey == 'today' or $dateKey == 'tomorrow') ? substr($plan->begin, 5, 6) : substr($plan->begin, 5, 11);
  104. $end = ($dateKey == 'today' or $dateKey == 'tomorrow') ? substr($plan->end, 5, 6) : substr($plan->end, 5, 11);
  105. $time = ($dateKey == 'today' or $dateKey == 'tomorrow') ? "$begin ~ $end" : $begin;
  106. ?>
  107. <small title='<?php echo $time;?>'><?php echo $time;?></small>
  108. </span>
  109. <?php endif;?>
  110. </div>
  111. </div>
  112. <?php endforeach;?>
  113. </td>
  114. <?php endforeach;?>
  115. </tr>
  116. </tbody>
  117. </table>
  118. </div>
  119. </div>
  120. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>