view.html.php 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * The view file of overtime module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2018 禅道软件(青岛)有限公司(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 Tingting Dai <daitingting@xirangit.com>
  8. * @package overtime
  9. * @version $Id$
  10. * @link http://www.zdoo.com
  11. */
  12. ?>
  13. <?php include '../../../common/view/header.modal.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/kindeditor.html.php';?>
  15. <?php js::set('confirmReview', $lang->overtime->confirmReview)?>
  16. <table class='table table-bordered'>
  17. <tr>
  18. <th><?php echo $lang->overtime->status;?></th>
  19. <td class='overtime-<?php echo $overtime->status;?>'><?php echo $lang->overtime->statusList[$overtime->status];?></td>
  20. <th><?php echo $lang->overtime->type?></th>
  21. <td><?php echo zget($lang->overtime->typeList, $overtime->type);?></td>
  22. </tr>
  23. <tr>
  24. <th><?php echo $lang->overtime->begin?></th>
  25. <td><?php echo formatTime($overtime->begin . ' ' . $overtime->start, DT_DATETIME2);?></td>
  26. <th><?php echo $lang->overtime->end?></th>
  27. <td><?php echo formatTime($overtime->end . ' ' . $overtime->finish, DT_DATETIME2);?></td>
  28. </tr>
  29. <tr>
  30. <th><?php echo $lang->overtime->hours?></th>
  31. <td colspan='3'><?php echo $overtime->hours . $lang->overtime->hoursTip;?></td>
  32. </tr>
  33. <tr>
  34. <th><?php echo $lang->overtime->desc?></th>
  35. <td colspan='3'><?php echo $overtime->desc;?></td>
  36. </tr>
  37. <?php if($overtime->status == 'reject' and $overtime->rejectReason):?>
  38. <tr>
  39. <th><?php echo $lang->overtime->rejectReason;?></th>
  40. <td colspan='3'><?php echo $overtime->rejectReason;?></td>
  41. </tr>
  42. <?php endif;?>
  43. <tr>
  44. <th><?php echo $lang->overtime->createdBy;?></th>
  45. <td><?php echo zget($users, $overtime->createdBy);?></td>
  46. <th><?php echo $lang->overtime->reviewedBy;?></th>
  47. <td id='reviewedBy'><?php echo zget($users, $overtime->reviewedBy);?></td>
  48. </tr>
  49. <tr>
  50. <th><?php echo $lang->overtime->createdDate;?></th>
  51. <td><?php echo formatTime($overtime->createdDate, DT_DATETIME1);?></td>
  52. <th><?php echo $lang->overtime->reviewedDate;?></th>
  53. <td><?php echo formatTime($overtime->reviewedDate, DT_DATETIME1);?></td>
  54. </tr>
  55. </table>
  56. <?php echo $this->fetch('action', 'history', "objectType=overtime&objectID=$overtime->id");?>
  57. <div class='page-actions'>
  58. <?php
  59. if($type == 'personal')
  60. {
  61. $switchLabel = $overtime->status == 'wait' ? $lang->overtime->cancel : $lang->overtime->commit;
  62. if(strpos(',wait,draft,', ",$overtime->status,") !== false)
  63. {
  64. extCommonModel::printLink('oa.overtime', 'switchstatus', "id=$overtime->id", $switchLabel, "class='switch-status btn'");
  65. }
  66. if(strpos(',wait,draft,reject,', ",$overtime->status,") !== false)
  67. {
  68. echo "<div class='btn-group'>";
  69. extCommonModel::printLink('oa.overtime', 'edit', "id=$overtime->id", $lang->edit, "class='btn loadInModal'");
  70. extCommonModel::printLink('oa.overtime', 'delete', "id=$overtime->id", $lang->delete, "class='btn deleteOvertime'");
  71. echo '</div>';
  72. }
  73. }
  74. elseif(strpos(',wait,doing,', ",$overtime->status,") !== false)
  75. {
  76. extCommonModel::printLink('oa.overtime', 'review', "id=$overtime->id&status=pass", $lang->overtime->statusList['pass'], "class='btn reviewPass'");
  77. extCommonModel::printLink('oa.overtime', 'review', "id=$overtime->id&status=reject", $lang->overtime->statusList['reject'], "class='btn loadInModal'");
  78. }
  79. echo baseHTML::a('#', $lang->goback, "class='btn' data-dismiss='modal'");
  80. ?>
  81. </div>
  82. <?php include '../../../common/view/footer.modal.html.php';?>