view.html.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * The detail view file of lieu 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 Gang Liu <liugang@cnezsoft.com>
  8. * @package lieu
  9. * @version $Id$
  10. * @link http://www.ranzhi.org
  11. */
  12. ?>
  13. <?php include '../../../common/view/header.modal.html.php';?>
  14. <table class='table table-bordered'>
  15. <tr>
  16. <th><?php echo $lang->lieu->status;?></th>
  17. <td class='lieu-<?php echo $lieu->status;?>'><?php echo zget($lang->lieu->statusList, $lieu->status);?></td>
  18. <th><?php echo $lang->lieu->hours;?></th>
  19. <td><?php echo $lieu->hours . $lang->lieu->hoursTip;?></td>
  20. </tr>
  21. <tr>
  22. <th><?php echo $lang->lieu->begin;?></th>
  23. <td><?php echo formatTime($lieu->begin . ' ' . $lieu->start, DT_DATETIME2);?></td>
  24. <th><?php echo $lang->lieu->end;?></th>
  25. <td><?php echo formatTime($lieu->end . ' ' . $lieu->finish, DT_DATETIME2);?></td>
  26. </tr>
  27. <?php if($lieu->overtime):?>
  28. <tr>
  29. <th class='text-middle'><?php echo $lang->lieu->overtime;?></th>
  30. <td colspan='3'>
  31. <?php foreach(explode(',', trim($lieu->overtime, ',')) as $overtime):?>
  32. <?php if($overtime) echo zget($overtimes, $overtime) . '</br>';?>
  33. <?php endforeach;?>
  34. </td>
  35. </tr>
  36. <?php endif;?>
  37. <?php if($lieu->trip):?>
  38. <tr>
  39. <th class='text-middle'><?php echo $lang->lieu->trip;?></th>
  40. <td colspan='3'>
  41. <?php foreach(explode(',', trim($lieu->trip, ',')) as $trip):?>
  42. <?php if($trip) echo zget($trips, $trip) . '</br>';?>
  43. <?php endforeach;?>
  44. </td>
  45. </tr>
  46. <?php endif;?>
  47. <tr>
  48. <th><?php echo $lang->lieu->desc;?></th>
  49. <td colspan='3'><?php echo $lieu->desc;?></td>
  50. </tr>
  51. <tr>
  52. <th><?php echo $lang->lieu->createdBy;?></th>
  53. <td><?php echo zget($users, $lieu->createdBy);?></td>
  54. <th><?php echo $lang->lieu->reviewedBy;?></th>
  55. <td id='reviewedBy'><?php echo zget($users, $lieu->reviewedBy);?></td>
  56. </tr>
  57. <tr>
  58. <th><?php echo $lang->lieu->createdDate;?></th>
  59. <td><?php echo formatTime($lieu->createdDate, DT_DATETIME1);?></td>
  60. <th><?php echo $lang->lieu->reviewedDate;?></th>
  61. <td><?php echo formatTime($lieu->reviewedDate, DT_DATETIME1);?></td>
  62. </tr>
  63. </table>
  64. <?php echo $this->fetch('action', 'history', "objectType=lieu&objectID=$lieu->id");?>
  65. <div class='page-actions'>
  66. <?php
  67. if($type == 'personal')
  68. {
  69. $switchLabel = $lieu->status == 'wait' ? $lang->lieu->cancel : $lang->lieu->commit;
  70. if(strpos(',wait,draft,', ",$lieu->status,") !== false)
  71. {
  72. extCommonModel::printLink('oa.lieu', 'switchstatus', "id={$lieu->id}", $switchLabel, "class='btn'");
  73. }
  74. if(strpos(',wait,draft,reject,', ",$lieu->status,") !== false)
  75. {
  76. echo "<div class='btn-group'>";
  77. extCommonModel::printLink('oa.lieu', 'edit', "id={$lieu->id}", $lang->edit, "class='btn loadInModal'");
  78. extCommonModel::printLink('oa.lieu', 'delete', "id={$lieu->id}", $lang->delete, "class='btn deleteLieu'");
  79. echo '</div>';
  80. }
  81. }
  82. elseif(strpos(',wait,doing,', ",$lieu->status,") !== false)
  83. {
  84. extCommonModel::printLink('oa.lieu', 'review', "id={$lieu->id}&status=pass", $lang->lieu->statusList['pass'], "class='btn reviewPass'");
  85. extCommonModel::printLink('oa.lieu', 'review', "id={$lieu->id}&status=reject", $lang->lieu->statusList['reject'], "class='btn loadInModal'");
  86. }
  87. echo baseHTML::a('javascript:;', $lang->goback, "class='btn' data-dismiss='modal'");
  88. ?>
  89. </div>
  90. <?php include '../../../common/view/footer.modal.html.php';?>