batchedit.html.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. <?php js::set('showFields', $showFields);?>
  19. <div class='main-content' id='mainContent'>
  20. <div class='main-header'>
  21. <h2>
  22. <?php echo $lang->URCommon . $lang->hyphen . $lang->story->batchEdit;?>
  23. </h2>
  24. <div class='pull-right btn-toolbar'>
  25. <?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=story&section=custom&key=batchEditFields')?>
  26. <?php include $this->app->getModuleRoot() . 'common/view/customfield.html.php';?>
  27. </div>
  28. </div>
  29. <?php if(isset($suhosinInfo)):?>
  30. <div id='suhosinInfo' class='alert alert-info'><?php echo $suhosinInfo;?></div>
  31. <?php else:?>
  32. <?php
  33. $visibleFields = array();
  34. foreach(explode(',', $showFields) as $field)
  35. {
  36. if($storyType == 'requeirment' and $field == 'stage') continue;
  37. if($field) $visibleFields[$field] = '';
  38. }
  39. ?>
  40. <form method='post' target='hiddenwin' action="<?php echo inLink('batchEdit', "productID=$productID&executionID=$executionID&branch=$branch&storyType=$storyType")?>" id="batchEditForm">
  41. <div class="table-responsive">
  42. <table class='table table-form'>
  43. <thead>
  44. <tr>
  45. <th class='c-id'> <?php echo $lang->idAB;?></th>
  46. <?php if($branchProduct):?>
  47. <th class='c-branch'><?php echo $lang->story->branch;?></th>
  48. <?php endif;?>
  49. <th class='c-module'><?php echo $lang->story->module;?></th>
  50. <th class='c-roadmap'><?php echo $lang->roadmap->common;?></th>
  51. <th class='c-title required'><?php echo $lang->story->title;?></th>
  52. <th class='c-estimate'> <?php echo $lang->story->estimateAB;?></th>
  53. <th class='c-category'><?php echo $lang->story->category;?></th>
  54. <th class='c-pri' title=<?php echo $lang->story->pri;?>> <?php echo $lang->priAB;?></th>
  55. <th class='c-user'> <?php echo $lang->story->assignedTo;?></th>
  56. <th class='c-duration<?php echo zget($visibleFields, 'duration', ' hidden')?>'> <?php echo $lang->story->duration;?></th>
  57. <th class='c-bsa<?php echo zget($visibleFields, 'BSA', ' hidden')?>'> <?php echo $lang->story->BSA . " <icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content='{$lang->demand->bsaTip}'></icon>";?></th>
  58. <th class='c-source<?php echo zget($visibleFields, 'source', ' hidden')?>'> <?php echo $lang->story->source;?></th>
  59. <th class='c-status'><?php echo $lang->story->status;?></th>
  60. <th class='c-keywords<?php echo zget($visibleFields, 'keywords', ' hidden')?>'><?php echo $lang->story->keywords;?></th>
  61. <th class='c-mailto<?php echo zget($visibleFields, 'mailto', ' hidden')?>'><?php echo $lang->story->mailto;?></th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <?php foreach($stories as $storyID => $story):?>
  66. <tr>
  67. <td><?php echo $storyID . html::hidden("storyIdList[$storyID]", $storyID);?></td>
  68. <?php if($branchProduct):?>
  69. <td class='text-left'>
  70. <?php $disabled = $products[$story->product]->type == 'normal' ? "disabled='disabled'" : '';?>
  71. <?php if($products[$story->product]->type == 'normal') $branchTagOption[$story->product] = array();?>
  72. <?php echo html::select("branches[$storyID]", $branchTagOption[$story->product], $story->branch, "class='form-control picker-select' data-drop-width='auto' onchange='loadBranches($story->product, this.value, $storyID);' $disabled");?>
  73. </td>
  74. <?php endif;?>
  75. <td class='text-left<?php echo zget($visibleFields, 'module')?>'>
  76. <?php echo html::select("modules[$storyID]", zget($moduleList, $story->id, array(0 => '/')), $story->module, "class='form-control picker-select' data-drop-width='auto'");?>
  77. </td>
  78. <td class='text-left'>
  79. <?php
  80. $roadmapCondition = (isset($allRoadmaps[$story->roadmap]) && in_array($allRoadmaps[$story->roadmap]->status, array('launching', 'launched', 'closed')));
  81. $storyCondition = in_array($story->status, array('draft', 'reviewing', 'closed'));
  82. if($roadmapCondition or $storyCondition)
  83. {
  84. $name = isset($allRoadmaps[$story->roadmap]) ? $allRoadmaps[$story->roadmap]->name : '';
  85. echo html::input("roadmaps[$storyID]", $name, "class='form-control' disabled");
  86. echo html::hidden("roadmaps[$storyID]", $story->roadmap);
  87. }
  88. else
  89. {
  90. $storyRoadmap = isset($allRoadmaps[$story->roadmap]) ? array($story->roadmap => $allRoadmaps[$story->roadmap]->name) : array();
  91. echo html::select("roadmaps[$storyID]", $roadmaps + $storyRoadmap, $story->roadmap, "class='form-control picker-select' data-drop-width='auto'");
  92. }
  93. ?>
  94. </td>
  95. <td title='<?php echo $story->title?>'>
  96. <div class="input-group">
  97. <div class="input-control has-icon-right story-input">
  98. <?php echo html::input("", $story->title, "class='form-control input-story-title' disabled"); ?>
  99. <?php echo html::hidden("titles[$storyID]", $story->title); ?>
  100. <div class="colorpicker">
  101. <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>
  102. <ul class="dropdown-menu clearfix">
  103. <li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
  104. </ul>
  105. <?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}\\]'");?>
  106. </div>
  107. </div>
  108. </div>
  109. </td>
  110. <td><?php echo html::input("estimates[$storyID]", $story->estimate, "class='form-control'"); ?></td>
  111. <?php if(empty($lang->story->categoryList[$story->category]) && !empty($lang->story->ipdCategoryList[$story->category])) $lang->story->categoryList[$story->category] = $lang->story->ipdCategoryList[$story->category];?>
  112. <td><?php echo html::select("category[$storyID]", $lang->story->categoryList, $story->category, 'class="form-control picker-select" data-drop-width="auto"');?></td>
  113. <?php if(!empty($lang->story->ipdCategoryList[$story->category])) unset($lang->story->categoryList[$story->category]);?>
  114. <td><?php echo html::select("pris[$storyID]", $priList, $story->pri, 'class=form-control');?></td>
  115. <td class='text-left'><?php echo html::select("assignedTo[$storyID]", $users, $story->assignedTo, "class='form-control picker-select' data-drop-width='auto'");?></td>
  116. <td <?php echo zget($visibleFields, 'duration', "class='hidden'")?>><?php echo html::select("durations[$storyID]", $lang->demand->durationList, $story->duration, "class='form-control picker-select' data-drop-width='auto' id='duration_$storyID'");?></td>
  117. <td <?php echo zget($visibleFields, 'BSA', "class='hidden'")?>><?php echo html::select("BSAs[$storyID]", $lang->demand->bsaList, $story->BSA, "class='form-control picker-select' data-drop-width='auto' id='BSA_$storyID'");?></td>
  118. <td <?php echo zget($visibleFields, 'source', "class='hidden'")?>><?php echo html::select("sources[$storyID]", $sourceList, $story->source, "class='form-control picker-select' data-drop-width='auto' id='source_$storyID'");?></td>
  119. <td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
  120. <td <?php echo zget($visibleFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$storyID]", $story->keywords, 'class="form-control"');?></td>
  121. <td <?php echo zget($visibleFields, 'mailto', "class='hidden'")?>><?php echo html::select("mailtos[$storyID][]", $mailto, $story->mailto, 'class="form-control picker-select" multiple');?></td>
  122. </tr>
  123. <?php endforeach;?>
  124. </tbody>
  125. <tfoot>
  126. <tr>
  127. <td colspan='<?php echo count($visibleFields) + ($branchProduct ? 8 : 7);?>' class='text-center form-actions'>
  128. <?php echo html::submitButton();?>
  129. <?php echo ($this->app->tab == 'product' or $this->app->tab == 'execution') ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?>
  130. </td>
  131. </tr>
  132. </tfoot>
  133. </table>
  134. </div>
  135. </form>
  136. <?php endif;?>
  137. <?php include $this->app->getModuleRoot() . 'common/view/footer.html.php';?>