detail.html.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /**
  3. * The detail view file of attend 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 attend
  9. * @version $Id$
  10. * @link http://www.ranzhi.org
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <style>
  15. #menuActions{float:right !important; margin-top: -60px !important;}
  16. .input-group-required > .required::after, .required-wrapper.required::after {top:12px !important;}
  17. .modal-body .table {margin-bottom:0px !important;}
  18. </style>
  19. <div id='featurebar'>
  20. <ul class='nav'>
  21. <?php
  22. $methodName = strtolower($this->app->getMethodName());
  23. foreach($lang->attend->featurebar as $key => $menu)
  24. {
  25. if(is_string($menu)) $link = $menu;
  26. if(is_array($menu)) $link = $menu['link'];
  27. list($name, $currentModule, $currentMethod, $params) = explode('|', $link);
  28. $class = strtolower($key) == $methodName ? "class='active'" : '';
  29. if(isset($menu['alias'])) $class = strpos(strtolower($menu['alias']), strtolower($key)) !== false ? "class='active'" : $class;
  30. if(common::hasPriv($currentModule, $currentMethod)) echo "<li id='$key' $class>" . html::a($this->createLink($currentModule, $currentMethod, $params), $name) . '</li>';
  31. }
  32. ?>
  33. </ul>
  34. </div>
  35. <?php include $app->getModuleRoot() . 'common/view/chosen.html.php';?>
  36. <?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
  37. <?php $lang->attend->abbrStatusList['rest'] = '';?>
  38. <div id='menuActions'>
  39. <?php extCommonModel::printLink('attend', 'exportDetail', "date=$currentYear$currentMonth", $lang->attend->export, "class='iframe btn btn-primary'")?>
  40. </div>
  41. <div class='with-side'>
  42. <div class='side'>
  43. <div class='panel'>
  44. <div class='panel-heading'><strong><?php echo $currentYear . ($this->app->clientLang != 'en' ? $lang->year : '') . $lang->attend->detail;?></strong></div>
  45. <div class='panel-body'>
  46. <?php
  47. $lastmonth = $currentYear == date('Y') ? date('m') : 12;
  48. for($month = 1; $month <= $lastmonth; $month++)
  49. {
  50. $class = $month == $currentMonth ? 'btn-primary' : '';
  51. $month = $month < 10 ? '0' . $month : $month;
  52. echo "<div class='col-xs-3 monthDIV'>" . baseHTML::a(inlink('detail', "date=$currentYear$month"), $month . ($this->app->clientLang != 'en' ? $lang->month : ''), "class='btn btn-mini $class'") . '</div>';
  53. }
  54. ?>
  55. </div>
  56. </div>
  57. <div class='panel'>
  58. <div class='panel-heading'><strong><?php echo $lang->attend->search;?></strong></div>
  59. <div class='panel-body'>
  60. <form id='searchForm' method='post' action='<?php echo inlink('detail');?>'>
  61. <div class='form-group'>
  62. <div class='input-group'>
  63. <span class='input-group-addon'><?php echo $lang->user->dept;?></span>
  64. <?php echo html::select('dept', $deptList, $dept, "class='form-control chosen'");?>
  65. </div>
  66. </div>
  67. <div class='form-group'>
  68. <div class='input-group'>
  69. <span class='input-group-addon'><?php echo $lang->attend->user;?></span>
  70. <?php echo html::select('account', $userList, $account, "class='form-control chosen'");?>
  71. </div>
  72. </div>
  73. <div class='form-group'>
  74. <div class='input-group'>
  75. <span class='input-group-addon'><?php echo $lang->attend->date;?></span>
  76. <?php echo html::input('date', $date, "class='form-control form-month'");?>
  77. </div>
  78. </div>
  79. <div class='form-group'><?php echo baseHTML::submitButton($lang->attend->search);?></div>
  80. </form>
  81. </div>
  82. </div>
  83. </div>
  84. <div class='main'>
  85. <div class='panel'>
  86. <div class='panel-heading text-center'>
  87. <strong><?php echo $fileName;?></strong>
  88. </div>
  89. <table class='table table-data table-bordered text-center table-fixedHeader'>
  90. <thead>
  91. <tr class='text-center'>
  92. <th><?php echo $lang->user->dept;?></th>
  93. <th><?php echo $lang->attend->user;?></th>
  94. <th><?php echo $lang->attend->date;?></th>
  95. <th><?php echo $lang->attend->dayName;?></th>
  96. <th><?php echo $lang->attend->status;?></th>
  97. <th><?php echo $lang->attend->signIn;?></th>
  98. <th><?php echo $lang->attend->signOut;?></th>
  99. <th><?php echo $lang->attend->ip;?></th>
  100. </tr>
  101. </thead>
  102. <?php foreach($attends as $attend):?>
  103. <tr>
  104. <td><?php echo $attend->dept;?></td>
  105. <td><?php echo $attend->realname;?></td>
  106. <td><?php echo formatTime($attend->date, DT_DATE1);?></td>
  107. <td><?php echo $attend->dayName;?>
  108. <td><?php echo empty($attend->desc) ? $attend->status : $attend->desc;?></td>
  109. <td><?php echo $attend->signIn;?></td>
  110. <td><?php echo $attend->signOut;?></td>
  111. <td><?php echo $attend->ip;?></td>
  112. </tr>
  113. <?php endforeach;?>
  114. </table>
  115. </div>
  116. </div>
  117. </div>
  118. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>