view.html.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * The view file of makeup module of RanZhi.
  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 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. <?php echo $this->fetch('action', 'history', "objectType=makeup&objectID=$makeup->id");?>
  63. <div class='page-actions'>
  64. <?php
  65. if($type == 'personal')
  66. {
  67. $switchLabel = $makeup->status == 'wait' ? $lang->makeup->cancel : $lang->makeup->commit;
  68. if(strpos(',wait,draft,', ",$makeup->status,") !== false)
  69. {
  70. extCommonModel::printLink('oa.makeup', 'switchstatus', "id=$makeup->id", $switchLabel, "class='switch-status btn'");
  71. }
  72. if(strpos(',wait,draft,reject,', ",$makeup->status,") !== false)
  73. {
  74. echo "<div class='btn-group'>";
  75. extCommonModel::printLink('oa.makeup', 'edit', "id=$makeup->id", $lang->edit, "class='btn loadInModal'");
  76. extCommonModel::printLink('oa.makeup', 'delete', "id=$makeup->id", $lang->delete, "class='btn deleteMakeup'");
  77. echo '</div>';
  78. }
  79. }
  80. elseif(strpos(',wait,doing,', ",$makeup->status,") !== false)
  81. {
  82. echo "<div class='btn-group'>";
  83. extCommonModel::printLink('oa.makeup', 'review', "id=$makeup->id&status=pass", $lang->makeup->statusList['pass'], "class='btn reviewPass'");
  84. extCommonModel::printLink('oa.makeup', 'review', "id=$makeup->id&status=reject", $lang->makeup->statusList['reject'], "class='btn loadInModal'");
  85. echo '</div>';
  86. }
  87. echo baseHTML::a('#', $lang->goback, "class='btn' data-dismiss='modal'");
  88. ?>
  89. </div>
  90. <?php include '../../../common/view/footer.modal.html.php';?>