batchedit.html.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /**
  3. * The batch edit view of story 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 Congzhi Chen <congzhi@cnezsoft.com>
  8. * @package story
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $this->app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php js::set('dittoNotice', $this->lang->story->dittoNotice);?>
  15. <?php js::set('storyType', $storyType);?>
  16. <?php js::set('app', $this->app->tab);?>
  17. <?php if(isset($resetActive)) js::set('resetActive', true);?>
  18. <div class='main-content' id='mainContent'>
  19. <div class='main-header'>
  20. <h2>
  21. <?php echo $lang->story->common . $lang->hyphen . $lang->story->batchEdit;?>
  22. </h2>
  23. </div>
  24. <?php if(isset($suhosinInfo)):?>
  25. <div id='suhosinInfo' class='alert alert-info'><?php echo $suhosinInfo;?></div>
  26. <?php else:?>
  27. <form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID&executionID=$executionID")?>" id="batchEditForm">
  28. <div class="table-responsive">
  29. <table class='table table-form'>
  30. <thead>
  31. <tr>
  32. <th class='c-id'> <?php echo $lang->idAB;?></th>
  33. <th class='c-module'><?php echo $lang->story->module;?></th>
  34. <th class='c-title required'><?php echo $lang->story->title;?></th>
  35. <th class='c-estimate'> <?php echo $lang->story->estimateAB;?></th>
  36. <th class='c-pri'> <?php echo $lang->priAB;?></th>
  37. <th class='c-user'> <?php echo $lang->story->assignedTo;?></th>
  38. <th class='c-status'><?php echo $lang->story->status;?></th>
  39. <th class='c-user-box'><?php echo $lang->story->closedBy;?></th>
  40. <th class='c-reason'> <?php echo $lang->story->closedReason;?></th>
  41. <th class='c-keywords'><?php echo $lang->story->keywords;?></th>
  42. <?php
  43. $extendFields = $this->story->getFlowExtendFields();
  44. foreach($extendFields as $extendField) echo "<th class='c-extend'>{$extendField->name}</th>";
  45. ?>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <?php foreach($stories as $storyID => $story):?>
  50. <tr>
  51. <td><?php echo $storyID . html::hidden("storyIdList[$storyID]", $storyID);?></td>
  52. <td class='text-left'>
  53. <?php echo html::select("modules[$storyID]", isset($moduleList[$story->id]) ? $moduleList[$story->id] : array('0' => '/'), $story->module, "class='form-control chosen'");?>
  54. </td>
  55. <td title='<?php echo $story->title?>'>
  56. <div class="input-group">
  57. <div class="input-control has-icon-right">
  58. <?php echo html::input("", $story->title, "class='form-control input-story-title' disabled"); ?>
  59. <?php echo html::hidden("titles[$storyID]", $story->title); ?>
  60. <div class="colorpicker">
  61. <button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
  62. <ul class="dropdown-menu clearfix">
  63. <li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
  64. </ul>
  65. <?php echo html::hidden("colors[$storyID]", $story->color, "class='colorpicker' data-wrapper='input-control-icon-right' data-icon='color' data-btn-tip='{$lang->story->colorTag}' data-update-color='#titles\\[{$storyID}\\]'");?>
  66. </div>
  67. </div>
  68. </div>
  69. </td>
  70. <td><?php echo html::input("estimates[$storyID]", $story->estimate, "class='form-control'"); ?></td>
  71. <td><?php echo html::select("pris[$storyID]", $priList, $story->pri, 'class=form-control');?></td>
  72. <td class='text-left'><?php echo html::select("assignedTo[$storyID]", $users, $story->assignedTo, "class='form-control chosen'");?></td>
  73. <td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
  74. <td class='text-left'><?php echo html::select("closedBys[$storyID]", $users, $story->closedBy, "class='form-control" . ($story->status == 'closed' ? " chosen'" : "' disabled='disabled'"));?></td>
  75. <?php if($story->status == 'closed'):?>
  76. <td>
  77. <table class='w-p100'>
  78. <tr>
  79. <td class='pd-0'>
  80. <?php echo html::select("closedReasons[$storyID]", $reasonList, $story->closedReason, "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 70px'");?>
  81. </td>
  82. <td class='pd-0' id='<?php echo 'duplicateStoryBox' . $storyID;?>' <?php if($story->closedReason != 'duplicate') echo "style='display: none'";?>>
  83. <?php echo html::input("duplicateStoryIDList[$storyID]", '', "class='form-control' placeholder='{$lang->idAB}'");?>
  84. </td>
  85. <td class='pd-0' id='<?php echo 'childStoryBox' . $storyID;?>' <?php if($story->closedReason != 'subdivided') echo "style='display: none'";?>>
  86. <?php echo html::input("childStoriesIDList[$storyID]", '', "class='form-control' placeholder='{$lang->idAB}'");?>
  87. </td>
  88. </tr>
  89. </table>
  90. </td>
  91. <?php else:?>
  92. <td><?php echo html::select("closedReasons[$storyID]", $reasonList, $story->closedReason, 'class="form-control" disabled="disabled"');?></td>
  93. <?php endif;?>
  94. <td><?php echo html::input("keywords[$storyID]", $story->keywords, 'class="form-control"');?></td>
  95. <?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow: visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $story, $extendField->field . "[{$storyID}]") . "</td>";?>
  96. </tr>
  97. <?php endforeach;?>
  98. </tbody>
  99. <tfoot>
  100. <tr>
  101. <td colspan='10' class='text-center form-actions'>
  102. <?php echo html::submitButton();?>
  103. <?php echo $this->app->tab == 'product' ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?>
  104. </td>
  105. </tr>
  106. </tfoot>
  107. </table>
  108. </div>
  109. </form>
  110. <?php endif;?>
  111. <?php include $this->app->getModuleRoot() . 'common/view/footer.html.php';?>