m.browse.html.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * The browse mobile view file of leave 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 leave
  9. * @version $Id
  10. * @link http://www.zdoo.com
  11. */
  12. if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
  13. include "../../common/view/m.header.html.php";?>
  14. <style>
  15. .list > .list {margin-left: 10px;}
  16. .list > .item {padding: 8px;}
  17. </style>
  18. <div class='heading'>
  19. <div class='title'>
  20. <?php if(!empty($yearList)):?>
  21. <a data-display='dropdown' data-placement='beside-bottom-start'><i class='icon-bars'></i> &nbsp; <?php echo $lang->leave->date;?></a>
  22. <div class='list dropdown-menu'>
  23. <?php foreach($yearList as $year):?>
  24. <a class='item item-year' href='<?php echo inlink($type, "date={$year}");?>'><?php echo $year;?></a>
  25. <div class='list'>
  26. <?php foreach($monthList[$year] as $month):?>
  27. <a class='item item-month' href='<?php echo inlink($type, "date=$year$month");?>'>
  28. <?php echo $year . $month;?>
  29. </a>
  30. <?php endforeach;?>
  31. </div>
  32. <?php endforeach;?>
  33. </div>
  34. <?php else:?>
  35. <a id='sortTrigger' class='text-right sort-trigger' data-display data-target='#sortPanel' data-backdrop='true'><i class='icon icon-sort'></i>&nbsp;<span class='sort-name'><?php echo $lang->sort;?></span></a>
  36. <?php endif;?>
  37. </div>
  38. <nav class='nav'>
  39. <?php if(!empty($yearList)):?>
  40. <a id='sortTrigger' class='text-right sort-trigger' data-display data-target='#sortPanel' data-backdrop='true'><i class='icon icon-sort'></i>&nbsp;<span class='sort-name'><?php echo $lang->sort;?></span></a>
  41. <?php endif;?>
  42. <a class='btn primary' data-display='modal' data-placement='bottom' data-remote='<?php echo $this->createLink('leave', 'create') ?>'>
  43. <i class='icon icon-plus'></i> &nbsp;&nbsp;<?php echo $lang->leave->create;?>
  44. </a>
  45. </nav>
  46. </div>
  47. <section id='page' class='section list-with-actions'>
  48. <?php $refreshUrl = $this->createLink('leave', 'browse', "type={$type}&date={$date}&orderBy=$orderBy");?>
  49. <div class='box' data-refresh-url='<?php echo $refreshUrl;?>'>
  50. <table class='table bordered'>
  51. <thead>
  52. <tr>
  53. <th class='w-100px text-center'><?php echo $lang->leave->createdBy;?></th>
  54. <th class='w-70px'><?php echo $lang->leave->type;?></th>
  55. <th class='w-80px'><?php echo $lang->leave->hours;?></th>
  56. <th class='w-120px text-center'><?php echo $lang->leave->status;?></th>
  57. </tr>
  58. </thead>
  59. <?php foreach($leaveList as $leave):?>
  60. <tr class='text-center' >
  61. <td><?php echo zget($users, $leave->createdBy);?></td>
  62. <td><?php echo zget($lang->leave->typeList, $leave->type);?></td>
  63. <td><?php echo $leave->hours;?></td>
  64. <td><span class='label status-<?php echo $leave->status?>-pale'><?php echo zget($lang->leave->statusList, $leave->status);?></span></td>
  65. </tr>
  66. <?php endforeach;?>
  67. </table>
  68. </div>
  69. </section>
  70. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  71. <?php
  72. $vars = "data={$date}&orderBy=%s";
  73. $orders = array('id', 'createdBy', 'type', 'begin', 'end', 'hours', 'status', 'reviewedBy');
  74. foreach($orders as $order)
  75. {
  76. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . $lang->leave->{$order});
  77. }
  78. ?>
  79. </div>
  80. <?php include "../../common/view/m.footer.html.php";?>