view.html.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * The view file of overtime module of RanZhi.
  4. *
  5. * @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Tingting Dai <daitingting@xirangit.com>
  8. * @package overtime
  9. * @version $Id$
  10. * @link http://www.ranzhi.org
  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. <div class='page-actions text-center'>
  57. <?php
  58. if($type == 'personal')
  59. {
  60. $switchLabel = $overtime->status == 'wait' ? $lang->overtime->cancel : $lang->overtime->commit;
  61. if(strpos(',wait,draft,', ",$overtime->status,") !== false)
  62. {
  63. extCommonModel::printLink('oa.overtime', 'switchstatus', "id=$overtime->id", $switchLabel, "class='switch-status btn btn-primary'");
  64. }
  65. if(strpos(',wait,draft,reject,', ",$overtime->status,") !== false)
  66. {
  67. extCommonModel::printLink('oa.overtime', 'edit', "id=$overtime->id", $lang->edit, "class='btn btn-primary loadInModal'");
  68. extCommonModel::printLink('oa.overtime', 'delete', "id=$overtime->id", $lang->delete, "class='btn btn-primary deleteOvertime'");
  69. }
  70. }
  71. elseif(strpos(',wait,doing,', ",$overtime->status,") !== false)
  72. {
  73. extCommonModel::printLink('oa.overtime', 'review', "id=$overtime->id&status=pass", $lang->overtime->statusList['pass'], "class='btn btn-primary reviewPass'");
  74. extCommonModel::printLink('oa.overtime', 'review', "id=$overtime->id&status=reject", $lang->overtime->statusList['reject'], "class='btn btn-primary loadInModal'");
  75. }
  76. echo baseHTML::a('#', $lang->goback, "class='btn' data-dismiss='modal'");
  77. ?>
  78. </div>
  79. <?php include '../../common/view/footer.modal.html.php';?>