detail.html.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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['personal'] as $type => $name)
  24. {
  25. $class = strtolower($type) == $methodName ? "class='active'" : '';
  26. if(common::hasPriv('attend', $type)) echo "<li id='$type' $class>" . html::a($this->createLink('attend', $type), $name) . '</li>';
  27. }
  28. ?>
  29. </ul>
  30. </div>
  31. <?php include $app->getModuleRoot() . 'common/view/chosen.html.php';?>
  32. <?php include $app->getModuleRoot() . 'common/view/datepicker.html.php';?>
  33. <?php $lang->attend->abbrStatusList['rest'] = '';?>
  34. <div id='menuActions'>
  35. <?php extCommonModel::printLink('attend', 'exportDetail', "date=$currentYear$currentMonth", $lang->attend->export, "class='iframe btn btn-primary'")?>
  36. </div>
  37. <div class='with-side'>
  38. <div class='side'>
  39. <div class='panel'>
  40. <div class='panel-heading'><strong><?php echo $currentYear . ($this->app->clientLang != 'en' ? $lang->year : '') . $lang->attend->detail;?></strong></div>
  41. <div class='panel-body'>
  42. <?php
  43. $lastmonth = $currentYear == date('Y') ? date('m') : 12;
  44. for($month = 1; $month <= $lastmonth; $month++)
  45. {
  46. $class = $month == $currentMonth ? 'btn-primary' : '';
  47. $month = $month < 10 ? '0' . $month : $month;
  48. 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>';
  49. }
  50. ?>
  51. </div>
  52. </div>
  53. <div class='panel'>
  54. <div class='panel-heading'><strong><?php echo $lang->attend->search;?></strong></div>
  55. <div class='panel-body'>
  56. <form id='searchForm' method='post' action='<?php echo inlink('detail');?>'>
  57. <div class='form-group'>
  58. <div class='input-group'>
  59. <span class='input-group-addon'><?php echo $lang->user->dept;?></span>
  60. <?php echo html::select('dept', $deptList, $dept, "class='form-control chosen'");?>
  61. </div>
  62. </div>
  63. <div class='form-group'>
  64. <div class='input-group'>
  65. <span class='input-group-addon'><?php echo $lang->attend->user;?></span>
  66. <?php echo html::select('account', $userList, $account, "class='form-control chosen'");?>
  67. </div>
  68. </div>
  69. <div class='form-group'>
  70. <div class='input-group'>
  71. <span class='input-group-addon'><?php echo $lang->attend->date;?></span>
  72. <?php echo html::input('date', $date, "class='form-control form-month'");?>
  73. </div>
  74. </div>
  75. <div class='form-group'><?php echo baseHTML::submitButton($lang->attend->search);?></div>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80. <div class='main'>
  81. <div class='panel'>
  82. <div class='panel-heading text-center'>
  83. <strong><?php echo $fileName;?></strong>
  84. </div>
  85. <table class='table table-data table-bordered text-center table-fixedHeader'>
  86. <thead>
  87. <tr class='text-center'>
  88. <th><?php echo $lang->user->dept;?></th>
  89. <th><?php echo $lang->attend->user;?></th>
  90. <th><?php echo $lang->attend->date;?></th>
  91. <th><?php echo $lang->attend->dayName;?></th>
  92. <th><?php echo $lang->attend->status;?></th>
  93. <th><?php echo $lang->attend->signIn;?></th>
  94. <th><?php echo $lang->attend->signOut;?></th>
  95. <th><?php echo $lang->attend->ip;?></th>
  96. </tr>
  97. </thead>
  98. <?php foreach($attends as $attend):?>
  99. <tr>
  100. <td><?php echo $attend->dept;?></td>
  101. <td><?php echo $attend->realname;?></td>
  102. <td><?php echo formatTime($attend->date, DT_DATE1);?></td>
  103. <td><?php echo $attend->dayName;?>
  104. <td><?php echo empty($attend->desc) ? $attend->status : $attend->desc;?></td>
  105. <td><?php echo $attend->signIn;?></td>
  106. <td><?php echo $attend->signOut;?></td>
  107. <td><?php echo $attend->ip;?></td>
  108. </tr>
  109. <?php endforeach;?>
  110. </table>
  111. </div>
  112. </div>
  113. </div>
  114. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>