edit.html.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. /**
  3. * The edit of programplan 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 programplan
  9. * @version $Id: edit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
  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/kindeditor.html.php';?>
  15. <?php js::set('plan', $plan);?>
  16. <?php js::set('stageTypeList', $project->model == 'ipd' ? $lang->stage->ipdTypeList : $lang->stage->typeList);?>
  17. <?php js::set('changeAttrLang', $lang->programplan->confirmChangeAttr);?>
  18. <?php js::set('isTopStage', $isTopStage);?>
  19. <?php js::set('isLeafStage', $isLeafStage);?>
  20. <?php js::set('projectModel', $project->model);?>
  21. <?php if($project->model == 'research'):?>
  22. <style>
  23. .body-modal #mainContent {padding-top: 90px;}
  24. .table-form>tbody>tr>td {padding: 9px;}
  25. </style>
  26. <?php endif;?>
  27. <div id="mainContent" class="main-content fade">
  28. <div class="center-block">
  29. <div class="main-header">
  30. <h2>
  31. <span class='prefix label-id'><strong><?php echo $plan->id;?></strong></span>
  32. <?php echo "<span title={$plan->name}>{$plan->name}</span>";?>
  33. </h2>
  34. </div>
  35. <form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
  36. <table class="table table-form">
  37. <tbody>
  38. <tr class="<?php echo $project->model == 'ipd' ? 'hidden' : '';?>">
  39. <th class="w-100px"><?php echo $lang->programplan->parent;?></th>
  40. <td colspan='2'><?php echo html::select('parent', $parentStageList, $plan->parent, "class='form-control chosen '");?></td>
  41. </tr>
  42. <tr>
  43. <th class='w-100px'><?php echo $lang->programplan->name;?> </th>
  44. <td colspan='2'><?php echo html::input('name', $plan->name, "class='form-control'");?></td>
  45. </tr>
  46. <?php if(isset($config->setCode) and $config->setCode == 1 and $project->model != 'research'):?>
  47. <tr>
  48. <th class='w-100px'><?php echo $lang->execution->code;?> </th>
  49. <td class='required' colspan='2'><?php echo html::input('code', $plan->code, "class='form-control'");?></td>
  50. </tr>
  51. <?php endif;?>
  52. <tr>
  53. <th><?php echo $lang->programplan->PM;?> </th>
  54. <td colspan='2'><?php echo html::select('PM', $PMUsers, $plan->PM, "class='form-control picker-select'");?></td>
  55. </tr>
  56. <?php if($project->model != 'research'):?>
  57. <?php if(isset($config->setPercent) and $config->setPercent == 1):?>
  58. <tr>
  59. <th><?php echo $lang->programplan->percent;?> </th>
  60. <td colspan='2'>
  61. <div class='input-group'>
  62. <?php echo html::input('percent', $plan->percent, "class='form-control'");?>
  63. <div class='input-group-addon'>%</span>
  64. </div>
  65. </td>
  66. </tr>
  67. <?php endif;?>
  68. <tr id="attributeType">
  69. <th><?php echo $lang->programplan->attribute;?></th>
  70. <td colspan='2'>
  71. <?php
  72. if($project->model == 'ipd')
  73. {
  74. echo zget($lang->stage->ipdTypeList, $plan->attribute);
  75. echo html::hidden('attribute', $plan->attribute);
  76. }
  77. elseif($enableOptionalAttr)
  78. {
  79. echo html::select('attribute', $lang->stage->typeList, $plan->attribute, "class='form-control'");
  80. }
  81. else
  82. {
  83. echo zget($lang->stage->typeList, $plan->attribute);
  84. }
  85. ?>
  86. </td>
  87. <td>
  88. <?php if($project->model != 'ipd'):?>
  89. <icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content="<?php echo $lang->execution->typeTip;?>"></icon>
  90. <?php endif;?>
  91. </td>
  92. </tr>
  93. <?php if($plan->setMilestone):?>
  94. <tr>
  95. <th><?php echo $lang->programplan->milestone;?> </th>
  96. <td colspan='2'><?php echo html::radio('milestone', $lang->programplan->milestoneList, $plan->milestone);?></td>
  97. </tr>
  98. <?php else:?>
  99. <?php echo html::hidden('milestone', $plan->milestone);?>
  100. <?php endif;?>
  101. <tr>
  102. <th><?php echo $lang->project->acl;?> </th>
  103. <?php $class = $plan->grade == 2 ? "disabled='disabled'" : '';?>
  104. <td colspan='2'><?php echo html::select('acl', $lang->execution->aclList, $plan->acl, "class='form-control' $class");?></td>
  105. </tr>
  106. <?php endif;?>
  107. <tr>
  108. <th><?php echo $lang->programplan->planDateRange;?> </th>
  109. <td colspan='2'>
  110. <div class="input-group title-group">
  111. <?php echo html::input('begin', $plan->begin, "class='form-control form-date'");?>
  112. <span class="input-group-addon fix-border br-0"><?php echo $lang->project->to;?></span>
  113. <?php echo html::input('end', $plan->end, "class='form-control form-date'");?>
  114. </div>
  115. </td>
  116. </tr>
  117. <tr>
  118. <th><?php echo $lang->programplan->realDateRange;?> </th>
  119. <td colspan='2'>
  120. <div class="input-group title-group">
  121. <?php echo html::input('realBegan', $plan->realBegan, "class='form-control form-date'");?>
  122. <span class="input-group-addon fix-border br-0"><?php echo $lang->project->to;?></span>
  123. <?php echo html::input('realEnd', $plan->realEnd, "class='form-control form-date'");?>
  124. </div>
  125. </td>
  126. </tr>
  127. <?php if(isset($this->config->qcVersion)):?>
  128. <tr>
  129. <th><?php echo $lang->programplan->output;?> </th>
  130. <td colspan='4'><?php echo html::select('output[]', $documentList, $plan->output, "class='form-control chosen ' multiple");?></td>
  131. </tr>
  132. <?php endif;?>
  133. <tr>
  134. <td colspan='3' class='form-actions text-center'><?php echo html::submitButton() . html::backButton()?></td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. </form>
  139. </div>
  140. </div>
  141. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>