view.html.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * The view file of makeup 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 makeup
  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->makeup->confirmReview)?>
  16. <table class='table table-bordered'>
  17. <tr>
  18. <th><?php echo $lang->makeup->status;?></th>
  19. <td class='makeup-<?php echo $makeup->status;?>'><?php echo $lang->makeup->statusList[$makeup->status];?></td>
  20. <th><?php echo $lang->makeup->hours?></th>
  21. <td><?php echo $makeup->hours . $lang->makeup->hoursTip;?></td>
  22. </tr>
  23. <tr>
  24. <th><?php echo $lang->makeup->begin?></th>
  25. <td><?php echo formatTime($makeup->begin . ' ' . $makeup->start, DT_DATETIME2);?></td>
  26. <th><?php echo $lang->makeup->end?></th>
  27. <td><?php echo formatTime($makeup->end . ' ' . $makeup->finish, DT_DATETIME2);?></td>
  28. </tr>
  29. <?php if($makeup->leave):?>
  30. <tr>
  31. <th class='text-middle'><?php echo $lang->makeup->leave;?></th>
  32. <td colspan='3'>
  33. <?php foreach(explode(',', trim($makeup->leave, ',')) as $leave):?>
  34. <?php if($leave) echo zget($leaves, $leave) . '</br>';?>
  35. <?php endforeach;?>
  36. </td>
  37. </tr>
  38. <?php endif;?>
  39. <tr>
  40. <th><?php echo $lang->makeup->desc?></th>
  41. <td colspan='3'><?php echo $makeup->desc;?></td>
  42. </tr>
  43. <?php if($makeup->status == 'reject' and $makeup->rejectReason):?>
  44. <tr>
  45. <th><?php echo $lang->makeup->rejectReason;?></th>
  46. <td colspan='3'><?php echo $makeup->rejectReason;?></td>
  47. </tr>
  48. <?php endif;?>
  49. <tr>
  50. <th><?php echo $lang->makeup->createdBy;?></th>
  51. <td><?php echo zget($users, $makeup->createdBy);?></td>
  52. <th><?php echo $lang->makeup->reviewedBy;?></th>
  53. <td id='reviewedBy'><?php echo zget($users, $makeup->reviewedBy);?></td>
  54. </tr>
  55. <tr>
  56. <th><?php echo $lang->makeup->createdDate;?></th>
  57. <td><?php echo formatTime($makeup->createdDate, DT_DATETIME1);?></td>
  58. <th><?php echo $lang->makeup->reviewedDate;?></th>
  59. <td><?php echo formatTime($makeup->reviewedDate, DT_DATETIME1);?></td>
  60. </tr>
  61. </table>
  62. <div class='page-actions text-center'>
  63. <?php
  64. if($type == 'personal')
  65. {
  66. $switchLabel = $makeup->status == 'wait' ? $lang->makeup->cancel : $lang->makeup->commit;
  67. if(strpos(',wait,draft,', ",$makeup->status,") !== false)
  68. {
  69. extCommonModel::printLink('oa.makeup', 'switchstatus', "id=$makeup->id", $switchLabel, "class='switch-status btn btn-primary'");
  70. }
  71. if(strpos(',wait,draft,reject,', ",$makeup->status,") !== false)
  72. {
  73. extCommonModel::printLink('oa.makeup', 'edit', "id=$makeup->id", $lang->edit, "class='btn btn-primary loadInModal'");
  74. extCommonModel::printLink('oa.makeup', 'delete', "id=$makeup->id", $lang->delete, "class='btn btn-primary deleteMakeup'");
  75. }
  76. }
  77. elseif(strpos(',wait,doing,', ",$makeup->status,") !== false)
  78. {
  79. extCommonModel::printLink('oa.makeup', 'review', "id=$makeup->id&status=pass", $lang->makeup->statusList['pass'], "class='btn btn-primary reviewPass'");
  80. extCommonModel::printLink('oa.makeup', 'review', "id=$makeup->id&status=reject", $lang->makeup->statusList['reject'], "class='btn btn-primary loadInModal'");
  81. }
  82. echo baseHTML::a('#', $lang->goback, "class='btn' data-dismiss='modal'");
  83. ?>
  84. </div>
  85. <?php include '../../common/view/footer.modal.html.php';?>