copyconfirm.html.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /**
  3. * The html template file of index method of index 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 Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package ZenTaoPMS
  9. * @version $Id: index.html.php 4129 2013-01-18 01:58:14Z wwccss $
  10. */
  11. ?>
  12. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  13. <?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
  14. <?php
  15. js::set('copyProjectID', $copyProjectID);
  16. js::set('weekend', $this->config->execution->weekend);
  17. $hiddenDate = !empty($copyProject->isTpl) ? 'hidden' : '';
  18. ?>
  19. <div id='mainContent' class='main-content'>
  20. <div class='main-header'>
  21. <h2 class='confirm-title'><?php echo in_array($project->model, array('waterfall', 'waterfallplus')) ? $lang->project->stageInfoConfirm : $lang->project->executionInfoConfirm;?></h2>
  22. <?php if($project->model == 'scrum' or $project->model == 'agileplus'):?>
  23. <h2 class='info-tips'><?php echo $hiddenDate ? $lang->project->executionInfoTipsAbbr : $lang->project->executionInfoTips;?></h1>
  24. <?php endif;?>
  25. </div>
  26. <form method='post' class='load-indicator main-form form-ajax' enctype='multipart/form-data' id="copyConfirmForm">
  27. <?php if($project->model == 'scrum' or $project->model == 'agileplus'):?>
  28. <table class="table table-form">
  29. <thead>
  30. <tr>
  31. <?php if($project->model == 'agileplus'):?>
  32. <th class='c-id'><?php echo $lang->execution->method;?></th>
  33. <?php endif;?>
  34. <th class='c-name required' style='width:100%'><?php echo $lang->execution->name;?></th>
  35. <?php if(isset($config->setCode) and $config->setCode == 1):?>
  36. <??>
  37. <th class='c-code <?php echo strpos(",{$config->execution->create->requiredFields},", ',code,') !== false ? 'required' : ''?>'><?php echo $lang->execution->code;?></th>
  38. <?php endif;?>
  39. <th class='c-type'><?php echo $lang->execution->type;?></th>
  40. <th class="c-user"> <?php echo $lang->project->PM;?></th>
  41. <th class='c-date required <?php echo $hiddenDate;?>'><?php echo $lang->execution->begin;?></th>
  42. <th class='c-date required <?php echo $hiddenDate;?>'><?php echo $lang->execution->end;?></th>
  43. <th class='c-days <?php echo $hiddenDate;?>'><?php echo $lang->execution->days;?></th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <?php $hasInfo = 'has-info';?>
  48. <?php foreach($executions as $executionID => $execution):?>
  49. <tr>
  50. <?php if($project->model == 'agileplus'):?>
  51. <td title='<?php echo zget($lang->execution->typeList, $execution->type);?>'><?php echo zget($lang->execution->typeList, $execution->type);?></td>
  52. <?php endif;?>
  53. <td title='<?php echo $execution->name;?>'>
  54. <?php echo html::hidden("executionIDList[$executionID]", $executionID);?>
  55. <?php echo html::input("names[$executionID]", $execution->name, "class='form-control $hasInfo'" );?>
  56. </td>
  57. <?php if(isset($config->setCode) and $config->setCode == 1):?>
  58. <td title='<?php echo $execution->code;?>'><?php echo html::input("codes[$executionID]", $execution->code, "class='form-control $hasInfo'");?></td>
  59. <?php endif;?>
  60. <td class='type'><?php echo html::select("lifetimes[$executionID]", $lang->execution->lifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');?></td>
  61. <td class='text-left' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $users, $executions[$executionID]->PM, "class='form-control picker-select'");?></td>
  62. <td class="<?php echo $hiddenDate;?>"><?php echo html::input("begins[$executionID]", $hiddenDate ? helper::today() : '', "id='begins[$executionID]' class='form-control form-date $hasInfo' onchange='computeWorkDays(this.id)'");?></td>
  63. <td class="<?php echo $hiddenDate;?>"><?php echo html::input("ends[$executionID]", $hiddenDate ? helper::today() : '', "id='ends[$executionID]' class='form-control form-date $hasInfo' onchange='computeWorkDays(this.id)'");?></td>
  64. <td class='days <?php echo $hiddenDate;?>'>
  65. <div class='input-group'>
  66. <?php echo html::input("dayses[$executionID]", $hiddenDate ? 1 : '', "id='dayses[$executionID]' class='form-control'");?>
  67. <span class='input-group-addon'><?php echo $lang->execution->day;?></span>
  68. </div>
  69. </td>
  70. <?php echo html::hidden("parents[$executionID]", $executions[$executionID]->parent);?>
  71. </tr>
  72. <?php if($hasInfo == 'has-info') $hasInfo = '';?>
  73. <?php endforeach;?>
  74. </tbody>
  75. </table>
  76. <?php elseif(in_array($project->model, array('waterfall', 'waterfallplus')) and $project->stageBy == 'product'):?>
  77. <?php $showProduct = !(count($executionIdList) == 1 and count($oldProductPairs) <= 1);?>
  78. <?php foreach($executionIdList as $productID => $stageIdList):?>
  79. <?php if($showProduct):?>
  80. <div class='waterfallstage'>
  81. <div class='waterfallheader'>
  82. <?php
  83. if(empty($copyProject->isTpl))
  84. {
  85. $oldProductPairs[0] = $lang->project->notCopyStage;
  86. reset($oldProductPairs);
  87. }
  88. $productChosen = html::select('', $oldProductPairs, isset($oldProductPairs[$productID]) ? $productID : key($oldProductPairs), "class='copyproducts' onchange='loadStages(this)'");
  89. ?>
  90. <span><?php printf($lang->project->chosenProductStage, zget($productPairs, $productID), $productChosen);?></span>
  91. </div>
  92. <div class='waterfallbody' data-productid='<?php echo $productID?>'>
  93. <?php endif;?>
  94. <?php include './ajaxloadstages.html.php';?>
  95. <?php if($showProduct):?>
  96. </div>
  97. </div>
  98. <?php endif;?>
  99. <?php if(!empty($copyProject->isTpl)) break;?>
  100. <?php endforeach;?>
  101. <?php elseif(in_array($project->model, array('waterfall', 'waterfallplus', 'ipd')) and $project->stageBy == 'project' and !empty($executionIdList)):?>
  102. <?php
  103. $productID = key($executionIdList);
  104. $stageIdList = current($executionIdList);
  105. include './ajaxloadstages.html.php';
  106. ?>
  107. <?php endif;?>
  108. <div class="text-center form-actions">
  109. <?php echo html::submitButton($lang->project->completeCopy);?>
  110. <?php echo html::a($this->createLink('project', !empty($copyProject->isTpl) ? 'createTemplate' : 'create', "project=$project->model&programID=0&copyProjectID=$copyProjectID&extra=copyType=previous,copyFrom={$copyFrom}&pageType=copy"), $lang->project->previous, '', "class='btn btn-wide'");?>
  111. </div>
  112. </form>
  113. </div>
  114. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>