resolve.html.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * The resolve view of issue 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 issue
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php
  14. include $app->getModuleRoot() . 'common/view/header.html.php';
  15. include $app->getModuleRoot() . 'common/view/kindeditor.html.php';
  16. include $app->getModuleRoot() . 'common/view/datepicker.html.php';
  17. include $app->getModuleRoot() . 'common/view/sortable.html.php';
  18. ?>
  19. <?php
  20. echo js::set('issueID', $issue->id);
  21. echo js::set('resolveLink', $this->createLink('issue', 'ajaxGetResolveForm', "projectID=$issue->project"));
  22. ?>
  23. <div id='mainContent' class='main-content'>
  24. <div class='center-block'>
  25. <div class='main-header'>
  26. <h2>
  27. <span class='label label-id'><?php echo $issue->id;?></span>
  28. <?php echo "<span title='$issue->title'>" . $issue->title . '</span>';?>
  29. </div>
  30. </div>
  31. <div class="modal-body" style="min-height: 282px; overflow: auto;">
  32. <form class='form-ajax' method='post'>
  33. <table class="table table-form" id="solutionTable">
  34. <tr>
  35. <th><?php echo $lang->issue->resolution;?></th>
  36. <td>
  37. <?php echo html::select('resolution', $lang->issue->resolveMethods, 'resolved', 'class="form-control chosen" onchange="getSolutions()"');?>
  38. </td>
  39. </tr>
  40. <tr>
  41. <th><?php echo $lang->issue->resolutionComment;?></th>
  42. <td colspan='3'><textarea name='resolutionComment' class='form-control' rows='5' id='resolutionComment'><?php echo $issue->resolutionComment;?></textarea></td>
  43. </tr>
  44. <tr>
  45. <th><?php echo $lang->issue->resolvedBy;?></th>
  46. <td>
  47. <?php echo html::select('resolvedBy', $users, $this->app->user->account, "class='form-control chosen'");?>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th><?php echo $lang->issue->resolvedDate;?></th>
  52. <td>
  53. <div class='input-group has-icon-right'>
  54. <?php echo html::input('resolvedDate', date('Y-m-d'), "class='form-control form-date'");?>
  55. <label for="date" class="input-control-icon-right"><i class="icon icon-delay"></i></label>
  56. </div>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td colspan='4' class='text-center form-actions'>
  61. <div class='form-action'><?php echo html::submitButton();?></div>
  62. </td>
  63. </tr>
  64. </table>
  65. </form>
  66. </div>
  67. </div>
  68. <script>
  69. function getSolutions()
  70. {
  71. parent.$('#triggerModal .modal-body').height($('.modal-body').css('min-height'));
  72. var mode = $("#resolution").val();
  73. $.ajax(
  74. {
  75. url: resolveLink,
  76. dataType: "html",
  77. data:{mode: mode, issueID: issueID},
  78. type: "post",
  79. success:function(data)
  80. {
  81. $("#solutionTable").html(data);
  82. $("#resolution").chosen();
  83. $("#resolvedBy").chosen();
  84. $("#resolvedDate").fixedDate().datepicker();
  85. if(mode == 'tostory' || mode == 'tobug' || mode == 'totask')
  86. {
  87. $("#module").chosen();
  88. $("#type").chosen();
  89. $("#assignedTo").chosen();
  90. $("#reviewer").chosen();
  91. $("#pri").chosen();
  92. }
  93. switch(mode)
  94. {
  95. case 'totask':
  96. $("#execution").chosen();
  97. $("#desc").kindeditor();
  98. $("#estStarted").fixedDate().datepicker();
  99. $("#deadline").fixedDate().datepicker();
  100. break;
  101. case 'tobug':
  102. $("#product").chosen();
  103. $("#openedBuild").chosen();
  104. $("#steps").kindeditor();
  105. $("#deadline").fixedDate().datepicker();
  106. $("#story").chosen();
  107. break;
  108. case 'tostory':
  109. $("#product").chosen();
  110. $("#spec").kindeditor();
  111. $("#verify").kindeditor();
  112. break;
  113. case 'torisk':
  114. $("#source").chosen();
  115. $("#category").chosen();
  116. $("#strategy").chosen();
  117. break;
  118. case 'resolved':
  119. $("#resolutionComment").kindeditor();
  120. break;
  121. }
  122. }
  123. })
  124. }
  125. </script>
  126. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>