batchcreate.html.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. /**
  3. * The control file of effort module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2012 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license business(商业软件)
  7. * @author Yangyang Shi <shiyangyang@cnezsoft.com>
  8. * @package effort
  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 js::set('leftTip', $lang->effort->leftTip);?>
  16. <?php js::set('executions', $executions);?>
  17. <?php $isEn = $app->getClientLang() == 'en';?>
  18. <div class='cell'>
  19. <form class="modal-content load-indicator" method='post' target='hiddenwin' id="effortBatchAddForm">
  20. <div class="modal-header" id="effortBatchAddHeader">
  21. <div class="modal-actions">
  22. <?php echo html::commonButton($lang->effort->clean, "onclick='cleanEffort()' title='{$lang->effort->noticeClean}'", "btn btn-primary")?>
  23. <?php if(isonlybody() && $from != 'list'):?>
  24. <div class="divider"></div>
  25. <button type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>
  26. <?php endif;?>
  27. </div>
  28. <h4 class="modal-title pull-left"><?php echo $lang->effort->batchCreate;?></h4>
  29. <div class="input-group pull-left">
  30. <span class="input-group-addon"><?php echo $lang->effort->date;?></span>
  31. <input type="text" name="date" value="<?php echo $date;?>" class="form-control form-date" autocomplete="off" />
  32. </div>
  33. </div>
  34. <div class='modal-body'>
  35. <table class='table table-form' id='objectTable'>
  36. <thead>
  37. <tr>
  38. <th class='col-id'><?php echo $lang->idAB;?></th>
  39. <th class='col-work required'><?php echo $lang->effort->work;?></th>
  40. <th class='col-objectType'><?php echo $lang->effort->objectType;?></th>
  41. <th class='col-execution'><?php echo $lang->effort->execution;?></th>
  42. <th class='w-110px required'><?php echo $isEn ? $lang->effort->consumed : ($lang->effort->consumed . '(' . $lang->effort->hour . ')');?></th>
  43. <th class='col-left required'><?php echo $isEn ? $lang->effort->left : ($lang->effort->left . '(' . $lang->effort->hour . ')');?></th>
  44. <th class='col-actions'></th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <?php $i = 1;?>
  49. <?php foreach($actions as $action):?>
  50. <tr class="effortBox computed">
  51. <td class="col-id"><?php echo '<span class="effortID">' . $i . '</span>' . html::hidden("id[]", $i);?></td>
  52. <td><?php echo html::input("work[]", $action->work, 'class="form-control" ' . (empty($action->work) ? '' : 'tabindex="9999"'));?></td>
  53. <td style='overflow:visible'>
  54. <?php
  55. echo html::select("objectType[]", $typeList, "{$action->objectType}_{$action->objectID}", "class='form-control chosen' data-max_drop_width='548px' tabindex='9999'");
  56. echo html::hidden("actionID[]", $action->id);
  57. ?>
  58. </td>
  59. <td style='overflow:visible'>
  60. <?php
  61. $executionID = empty($action->execution) ? 0 : $action->execution;
  62. $executionName = zget($executions, $executionID, '');
  63. echo html::select("execution[$i]", array($executionID => $executionName), $executionID, "class='form-control chosen' tabindex='9999'");
  64. ?>
  65. </td>
  66. <td><?php echo html::input("consumed[]", '', 'autocomplete="off" class="form-control"');?></td>
  67. <td><?php echo html::input("left[$i]", '', "autocomplete='off' class='form-control' disabled title='{$lang->effort->leftTip}'");?></td>
  68. <td align='center'>
  69. <a href='javascript:;' onclick='addEffort(this)' tabindex="9999" class='btn btn-link btn-add'><i class="icon icon-plus"></i></a>
  70. <a href='javascript:;' onclick='deleteEffort(this)' tabindex="9999" class='btn btn-link btn-delete'><i class="icon icon-close"></i></a>
  71. </td>
  72. </tr>
  73. <?php $i++;?>
  74. <?php endforeach;?>
  75. <?php for($j = 0; $j < 8; $j++, $i++):?>
  76. <tr class="effortBox new">
  77. <td class="col-id"><?php echo '<span class="effortID">' . $i . '</span>' . html::hidden("id[]", $i);?></td>
  78. <td><?php echo html::input("work[]", '', 'class=form-control');?></td>
  79. <td style='overflow:visible'><?php echo html::select("objectType[]", $typeList, 'custom', "tabindex='9999' class='form-control chosen'");?></td>
  80. <td style='overflow:visible'><?php echo html::select("execution[$i]", $executions, 0, "tabindex='9999' class='form-control chosen'");?></td>
  81. <td><?php echo html::input("consumed[]", '', 'autocomplete="off" class="form-control"');?></td>
  82. <td><?php echo html::input("left[$i]", '', "autocomplete='off' class='form-control' disabled title='{$lang->effort->leftTip}'");?></td>
  83. <td align='center'>
  84. <a href='javascript:;' onclick='addEffort(this)' tabindex="9999" class='btn btn-link btn-add'><i class="icon icon-plus"></i></a>
  85. <a href='javascript:;' onclick='deleteEffort(this)' tabindex="9999" class='btn btn-link btn-delete'><i class="icon icon-close"></i></a>
  86. </td>
  87. </tr>
  88. <?php endfor;?>
  89. </tbody>
  90. <tfoot>
  91. <tr>
  92. <td colspan='7' class='text-center'>
  93. <?php echo html::submitButton();?>
  94. <?php if(!isonlybody()) echo html::a($this->createLink('my', 'effort', 'type=all'), $lang->goback, '', "class='btn btn-back btn-wide'");?>
  95. </td>
  96. </tr>
  97. </tfoot>
  98. </table>
  99. </div>
  100. </form>
  101. </div>
  102. <div id='executionTpl' class='hidden'>
  103. <?php echo html::select("execution", array(), 0, "tabindex='9999' class='form-control'");?>
  104. </div>
  105. <?php js::set('num', $i)?>
  106. <?php js::set('executionTask', $executionTask);?>
  107. <?php js::set('executionBug', $executionBug);?>
  108. <?php if(isonlybody()):?>
  109. <script>
  110. $(function()
  111. {
  112. parent.$('.modal-header').hide();
  113. parent.$('.modal-body').css('padding', '0px');
  114. $('#closeModal').click(function(){parent.$.closeModal();});
  115. $(".form-date").datetimepicker('setEndDate', '<?php echo date(DT_DATE1)?>');
  116. })
  117. </script>
  118. <?php endif;?>
  119. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>