view.html.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * The detail view file of lieu 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 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. <div class='page-actions text-center'>
  65. <?php
  66. if($type == 'personal')
  67. {
  68. $switchLabel = $lieu->status == 'wait' ? $lang->lieu->cancel : $lang->lieu->commit;
  69. if(strpos(',wait,draft,', ",$lieu->status,") !== false)
  70. {
  71. extCommonModel::printLink('oa.lieu', 'switchstatus', "id={$lieu->id}", $switchLabel, "class='btn btn-primary'");
  72. }
  73. if(strpos(',wait,draft,reject,', ",$lieu->status,") !== false)
  74. {
  75. extCommonModel::printLink('oa.lieu', 'edit', "id={$lieu->id}", $lang->edit, "class='btn btn-primary loadInModal'");
  76. extCommonModel::printLink('oa.lieu', 'delete', "id={$lieu->id}", $lang->delete, "class='btn btn-primary deleteLieu'");
  77. }
  78. }
  79. elseif(strpos(',wait,doing,', ",$lieu->status,") !== false)
  80. {
  81. extCommonModel::printLink('oa.lieu', 'review', "id={$lieu->id}&status=pass", $lang->lieu->statusList['pass'], "class='btn btn-primary reviewPass'");
  82. extCommonModel::printLink('oa.lieu', 'review', "id={$lieu->id}&status=reject", $lang->lieu->statusList['reject'], "class='btn btn-primary loadInModal'");
  83. }
  84. echo baseHTML::a('javascript:;', $lang->goback, "class='btn' data-dismiss='modal'");
  85. ?>
  86. </div>
  87. <?php include '../../common/view/footer.modal.html.php';?>