m.view.html.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. /**
  3. * The view mobile view file of lieu module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(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 lieu
  9. * @version $Id
  10. * @link http://www.zdoo.com
  11. */
  12. if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
  13. $moduleMenu = false;
  14. $bodyClass = 'with-nav-bottom';
  15. $browseLink = $this->session->lieuList ? $this->session->lieuList : inlink('personal');
  16. include "../../common/view/m.header.html.php";
  17. ?>
  18. <div id='page' class='list-with-actions'>
  19. <div class='section'>
  20. <div class='heading gray'>
  21. <div class='title'><i class='icon-calendar'> </i><?php echo $lang->lieu->view;?></div>
  22. <nav class='nav'><a class='btn primary' href='<?php echo $browseLink;?>'><?php echo $lang->goback ?></a></nav>
  23. </div>
  24. <div class='box'>
  25. <table class='table bordered table-detail'>
  26. <tr>
  27. <td class='w-80px'><?php echo $lang->lieu->createdBy;?></td>
  28. <td><?php echo zget($users, $lieu->createdBy);?></td>
  29. </tr>
  30. <tr>
  31. <td><?php echo $lang->lieu->status;?></td>
  32. <td><span class='label status-<?php echo $lieu->status;?>-pale'><?php echo zget($lang->lieu->statusList, $lieu->status);?></span></td>
  33. </tr>
  34. <tr>
  35. <td><?php echo $lang->lieu->begin;?></td>
  36. <td><?php echo $lieu->begin . ' ' . $lieu->start;?></td>
  37. </tr>
  38. <tr>
  39. <td><?php echo $lang->lieu->end;?></td>
  40. <td><?php echo $lieu->end . ' ' . $lieu->finish;?></td>
  41. </tr>
  42. <?php if($lieu->overtime):?>
  43. <tr>
  44. <td><?php echo $lang->lieu->overtime;?></th>
  45. <td>
  46. <?php foreach(explode(',', trim($lieu->overtime, ',')) as $overtime):?>
  47. <?php if($overtime) echo zget($overtimes, $overtime) . '<br/>';?>
  48. <?php endforeach;?>
  49. </td>
  50. </tr>
  51. <?php endif;?>
  52. <?php if($lieu->trip):?>
  53. <tr>
  54. <td><?php echo $lang->lieu->trip;?></th>
  55. <td>
  56. <?php foreach(explode(',', trim($lieu->trip, ',')) as $trip):?>
  57. <?php if($trip) echo zget($trips, $trip) . '<br/>';?>
  58. <?php endforeach;?>
  59. </td>
  60. </tr>
  61. <?php endif;?>
  62. <?php if(!empty($lieu->hours)):?>
  63. <tr>
  64. <td><?php echo $lang->lieu->hours;?></td>
  65. <td><?php echo $lieu->hours;?></td>
  66. </tr>
  67. <?php endif;?>
  68. <?php if(!empty($lieu->desc)):?>
  69. <tr>
  70. <td><?php echo $lang->lieu->desc;?></td>
  71. <td><?php echo $lieu->desc;?></td>
  72. </tr>
  73. <?php endif;?>
  74. <?php if(!empty($lieu->reviewedBy)):?>
  75. <tr>
  76. <td><?php echo $lang->lieu->reviewedBy;?></td>
  77. <td><?php echo zget($users, $lieu->reviewedBy);?></td>
  78. </tr>
  79. <?php endif;?>
  80. </table>
  81. </div>
  82. </div>
  83. <div class='section' id='history'>
  84. </div>
  85. <nav class='nav affix dock-bottom nav-auto footer-actions'>
  86. <?php
  87. if($type == 'personal')
  88. {
  89. $canEdit = $this->lieu->isClickable($lieu, 'edit');
  90. $canDelete = $this->lieu->isClickable($lieu, 'delete');
  91. $canSwitch = $this->lieu->isClickable($lieu, 'switchStatus');
  92. if($canSwitch)
  93. {
  94. $switchLabel = $lieu->status == 'wait' ? $lang->lieu->cancel : $lang->lieu->submit;
  95. echo "<a data-remote='" . $this->createLink('lieu', 'switchstatus', "id={$lieu->id}") . "' data-display='ajaxAction' data-locate='self'>{$switchLabel}</a>";
  96. }
  97. if($canEdit) echo "<a data-remote='" . $this->createLink('lieu', 'edit', "id={$lieu->id}") . "' data-display='modal' data-placement='bottom'>{$lang->edit}</a>";
  98. if($canDelete) echo "<a data-remote='" . $this->createLink('lieu', 'delete', "id={$lieu->id}") . "' data-display='ajaxAction' data-ajax-delete='true' data-locate='self'>{$lang->delete}</a>";
  99. }
  100. else
  101. {
  102. $canReview = $this->lieu->isClickable($lieu, 'review');
  103. if($canReview) echo "<a data-remote='" . $this->createLink('lieu', 'review', "id={$lieu->id}&status=pass") . "' data-display='ajaxAction' data-confirm='{$lang->lieu->confirmReview['pass']}' data-locate='self'>{$lang->lieu->statusList['pass']}</a>";
  104. if($canReview) echo "<a data-remote='" . $this->createLink('lieu', 'review', "id={$lieu->id}&status=reject") . "' data-display='modal' data-placement='bottom'>{$lang->lieu->statusList['reject']}</a>";
  105. }
  106. ?>
  107. </nav>
  108. </div>
  109. <?php include "../../common/view/m.footer.html.php"; ?>