managestep.html.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /**
  3. * The manageStep 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. <?php $width = 100 / count($lang->deploy->stageList);?>
  16. <div id='mainContent' class='main-content'>
  17. <div class='main-header'>
  18. <h2>
  19. <span class='label lable-id'><?php echo $deploy->id;?></span>
  20. <?php echo $deploy->name . $lang->hyphen . $lang->deploy->manageStep;?>
  21. <span class='label label-info'><?php echo substr($deploy->begin, 0, 16) . ' ~ ' . substr($deploy->end, 0, 16)?></span>
  22. </h2>
  23. </div>
  24. <div>
  25. <form class='main-table' method='post' target='hiddenwin'>
  26. <table class='table table-form table-fixed with-border'>
  27. <thead>
  28. <tr>
  29. <th class='w-40px'><?php echo $lang->idAB?></th>
  30. <th class='w-100px'><?php echo $lang->deploy->stage?></th>
  31. <th class='w-140px required'><?php echo $lang->deploy->begin?></th>
  32. <th class='w-140px required'><?php echo $lang->deploy->end?></th>
  33. <th class='required'><?php echo $lang->deploy->title?></th>
  34. <th><?php echo $lang->deploy->content?></th>
  35. <th class='w-120px'><?php echo $lang->deploy->assignedTo?></th>
  36. <th class='w-120px'><?php echo $lang->actions?></th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. <?php
  41. $lang->deploy->stageList['ditto'] = $lang->deploy->ditto;
  42. $orgUsers = $users;
  43. $users['ditto'] = $lang->deploy->ditto;
  44. ?>
  45. <?php if(empty($stepGroups)):?>
  46. <?php for($i = 1; $i <= 10; $i++):?>
  47. <tr>
  48. <td class='text-center'><?php echo $i?></td>
  49. <td><?php echo html::select('stage[]', $lang->deploy->stageList, $i > 1 ? 'ditto' : '', "class='form-control'")?></td>
  50. <td><?php echo html::input('begin[]', '', "class='form-control form-datetime'")?></td>
  51. <td><?php echo html::input('end[]', '', "class='form-control form-datetime'")?></td>
  52. <td><?php echo html::input('title[]', '', "class='form-control'")?></td>
  53. <td><?php echo html::textarea('content[]', '', "class='form-control' rows='1'")?></td>
  54. <td style='overflow:visible'><?php echo html::select('assignedTo[]', $i === 1 ? $orgUsers : $users, $i > 1 ? 'ditto' : '', "class='form-control chosen'")?></td>
  55. <td>
  56. <div class='btn-group'>
  57. <?php echo html::commonButton("<i class='icon icon-plus'></i>", "onclick='addStepItem(this)'");?>
  58. <?php echo html::commonButton("<i class='icon icon-close'></i>", "onclick='removeStepItem(this)'");?>
  59. </div>
  60. </td>
  61. </tr>
  62. <?php endfor;?>
  63. <?php else:?>
  64. <?php $i = 1;?>
  65. <?php foreach($lang->deploy->stageList as $stage => $name):?>
  66. <?php if(!isset($stepGroups[$stage])) $stepGroups[$stage] = array();?>
  67. <?php foreach($stepGroups[$stage] as $step):?>
  68. <tr>
  69. <td class='text-center'><?php echo $i?></td>
  70. <td><?php echo html::select('stage[]', $lang->deploy->stageList, $step->stage, "class='form-control'")?></td>
  71. <td><?php echo html::input('begin[]', helper::isZeroDate($step->begin) ? '' : substr($step->begin, 0, 16), "class='form-control form-datetime'")?></td>
  72. <td><?php echo html::input('end[]', helper::isZeroDate($step->end) ? '' : substr($step->end, 0, 16), "class='form-control form-datetime'")?></td>
  73. <td><?php echo html::input('title[]', $step->title, "class='form-control'")?></td>
  74. <td><?php echo html::textarea('content[]', str_replace(array('<br>', '<br />'), '', $step->content), "class='form-control' rows='1'")?></td>
  75. <td style='overflow:visible'><?php echo html::select('assignedTo[]', $i === 1 ? $orgUsers : $users, $step->assignedTo, "class='form-control chosen'")?></td>
  76. <td>
  77. <div class='btn-group'>
  78. <?php echo html::commonButton("<i class='icon icon-plus'></i>", "onclick='addStepItem(this)'");?>
  79. <?php echo html::commonButton("<i class='icon icon-close'></i>", "onclick='removeStepItem(this)'");?>
  80. </div>
  81. <?php echo html::hidden('id[]', $step->id);?>
  82. </td>
  83. </tr>
  84. <?php $i++;?>
  85. <?php endforeach;?>
  86. <?php endforeach;?>
  87. <?php endif;?>
  88. </tbody>
  89. <tfoot>
  90. <tr>
  91. <td colspan='8' class='text-center form-actions'>
  92. <?php echo html::submitButton();?>
  93. <?php echo html::backButton();?>
  94. </td>
  95. </tr>
  96. </tfoot>
  97. </table>
  98. </form>
  99. </div>
  100. </div>
  101. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>