batchedit.html.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * The batch edit view of task 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 task
  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
  16. unset($lang->feedback->statusList['replied']);
  17. unset($lang->feedback->statusList['asked']);
  18. unset($lang->feedback->statusList['tobug']);
  19. unset($lang->feedback->statusList['tostory']);
  20. unset($lang->feedback->statusList['commenting']);
  21. ?>
  22. <?php js::set('noChangeIDList', $noChangeIDList);?>
  23. <?php js::set('batchEditTip', sprintf($lang->feedback->batchEditTip, $noChangeIDList));?>
  24. <?php js::set('browseType', $browseType);?>
  25. <div id='mainContent' class='main-content fade'>
  26. <div class='main-header'>
  27. <h2>
  28. <?php echo $lang->feedback->common . $lang->hyphen . $lang->feedback->batchEdit;?>
  29. </h2>
  30. </div>
  31. <form id='ajaxForm' class='main-form' method='post' action="<?php echo inLink('batchEdit', "browseType={$browseType}")?>">
  32. <div class="table-responsive">
  33. <table class='table table-form table-fixed with-border'>
  34. <thead>
  35. <tr>
  36. <th class='w-50px'><?php echo $lang->idAB;?></th>
  37. <th class='required w-300px'><?php echo $lang->feedback->product?></th>
  38. <th class='w-300px'><?php echo $lang->feedback->module?></th>
  39. <th class='required'><?php echo $lang->feedback->title?></th>
  40. <th class='w-150px'><?php echo $lang->feedback->assignedTo;?></th>
  41. <?php
  42. $extendFields = $this->feedback->getFlowExtendFields();
  43. foreach($extendFields as $extendField) echo "<th>{$extendField->name}</th>";
  44. ?>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <?php foreach($feedbacks as $feedback):?>
  49. <tr>
  50. <td><?php echo $feedback->id;?></td>
  51. <td style='overflow:visible'><?php echo html::select("products[$feedback->id]", $products, $feedback->product, "id='product{$feedback->id}' class='form-control chosen' onchange='changeModule(this.value, $feedback->id)'")?></td>
  52. <td style='overflow:visible'><?php echo html::select("module[$feedback->id]", zget($moduleList, $feedback->product, ''), $feedback->module, "id='module{$feedback->id}' class='form-control chosen'")?></td>
  53. <td title='<?php echo $feedback->title;?>'><?php echo html::input("titles[$feedback->id]", $feedback->title, "id='title{$feedback->id}' class='form-control' autocomplete='off'");?></td>
  54. <td style='overflow:visible'><?php echo html::select("assignedTos[$feedback->id]", $users, $feedback->assignedTo, "id='assignedTo{$feedback->id}' class='form-control chosen'");?></td>
  55. <?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $feedback, $extendField->field . "[{$feedback->id}]") . "</td>";?>
  56. </tr>
  57. <?php endforeach;?>
  58. </tbody>
  59. <tfoot>
  60. <tr>
  61. <td colspan='4' class='text-center form-actions'>
  62. <?php echo html::submitButton();?>
  63. <?php echo html::backButton();?>
  64. </td>
  65. </tr>
  66. </tfoot>
  67. </table>
  68. </div>
  69. </form>
  70. </div>
  71. <script>
  72. $(function()
  73. {
  74. $('select[id^=status]').change(function()
  75. {
  76. $(this).parent().find('div.closedReason').addClass('hidden');
  77. if($(this).val() == 'closed')
  78. {
  79. $(this).parent().find('div.closedReason').removeClass('hidden');
  80. }
  81. })
  82. })
  83. </script>
  84. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>