m.view.html.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /**
  3. * The view mobile view file of overtime 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 overtime
  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->overtimeList ? $this->session->overtimeList : 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->overtime->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->overtime->createdBy;?></td>
  28. <td><?php echo zget($users, $overtime->createdBy);?></td>
  29. </tr>
  30. <tr>
  31. <td><?php echo $lang->overtime->type;?></td>
  32. <td><?php echo zget($lang->overtime->typeList, $overtime->type);?></td>
  33. </tr>
  34. <tr>
  35. <td><?php echo $lang->overtime->status;?></td>
  36. <td><span class='label status-<?php echo $overtime->status;?>-pale'><?php echo zget($lang->overtime->statusList, $overtime->status);?></span></td>
  37. </tr>
  38. <tr>
  39. <td><?php echo $lang->overtime->begin;?></td>
  40. <td><?php echo $overtime->begin . ' ' . $overtime->start;?></td>
  41. </tr>
  42. <tr>
  43. <td><?php echo $lang->overtime->end;?></td>
  44. <td><?php echo $overtime->end . ' ' . $overtime->finish;?></td>
  45. </tr>
  46. <?php if(!empty($overtime->hours)):?>
  47. <tr>
  48. <td><?php echo $lang->overtime->hours;?></td>
  49. <td><?php echo $overtime->hours;?></td>
  50. </tr>
  51. <?php endif;?>
  52. <?php if(!empty($overtime->desc)):?>
  53. <tr>
  54. <td><?php echo $lang->overtime->desc;?></td>
  55. <td><?php echo $overtime->desc;?></td>
  56. </tr>
  57. <?php endif;?>
  58. <?php if(!empty($overtime->reviewedBy)):?>
  59. <tr>
  60. <td><?php echo $lang->overtime->reviewedBy;?></td>
  61. <td><?php echo zget($users, $overtime->reviewedBy);?></td>
  62. </tr>
  63. <?php endif;?>
  64. </table>
  65. </div>
  66. </div>
  67. <div class='section' id='history'>
  68. </div>
  69. <nav class='nav affix dock-bottom nav-auto footer-actions'>
  70. <?php
  71. if($type == 'personal')
  72. {
  73. $canEdit = $this->overtime->isClickable($overtime, 'edit');
  74. $canDelete = $this->overtime->isClickable($overtime, 'delete');
  75. $canSwitch = $this->overtime->isClickable($overtime, 'switchStatus');
  76. if($canSwitch)
  77. {
  78. $switchLabel = $overtime->status == 'wait' ? $lang->overtime->cancel : $lang->overtime->submit;
  79. echo "<a data-remote='" . $this->createLink('overtime', 'switchstatus', "id={$overtime->id}") . "' data-display='ajaxAction' data-locate='self'>{$switchLabel}</a>";
  80. }
  81. if($canEdit) echo "<a data-remote='" . $this->createLink('overtime', 'edit', "id={$overtime->id}") . "' data-display='modal' data-placement='bottom'>{$lang->edit}</a>";
  82. if($canDelete) echo "<a data-remote='" . $this->createLink('overtime', 'delete', "id={$overtime->id}") . "' data-display='ajaxAction' data-ajax-delete='true' data-locate='self'>{$lang->delete}</a>";
  83. }
  84. else
  85. {
  86. $canReview = $this->overtime->isClickable($overtime, 'review');
  87. if($canReview) echo "<a data-remote='" . $this->createLink('overtime', 'review', "id={$overtime->id}&status=pass") . "' data-display='ajaxAction' data-confirm='{$lang->overtime->confirmReview['pass']}' data-locate='self'>{$lang->overtime->statusList['pass']}</a>";
  88. if($canReview) echo "<a data-remote='" . $this->createLink('overtime', 'review', "id={$overtime->id}&status=reject") . "' data-display='modal' data-placement='bottom'>{$lang->overtime->statusList['reject']}</a>";
  89. }
  90. ?>
  91. </nav>
  92. </div>
  93. <?php include "../../common/view/m.footer.html.php"; ?>