m.effort.html.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * The effort mobile view file of user module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2016 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Fei Chen <chenfei@cnezsoft.com>
  8. * @package user
  9. * @version $Id: index.html.php 3830 2016-05-18 09:34:17Z liugang $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php
  14. $bodyClass = 'with-menu-top';
  15. include "../../common/view/m.header.html.php";
  16. include "./m.featurebar.html.php";
  17. ?>
  18. <nav id='subMenu' class='menu nav gray'>
  19. <?php
  20. echo html::a(inlink('effort', "userID=$userID&date=today"), $lang->effort->todayEfforts, '', "id='today'");
  21. echo html::a(inlink('effort', "userID=$userID&date=yesterday"), $lang->effort->yesterdayEfforts, '', "id='yesterday'");
  22. echo html::a(inlink('effort', "userID=$userID&date=thisweek"), $lang->effort->thisWeekEfforts, '', "id='thisweek'");
  23. echo html::a(inlink('effort', "userID=$userID&date=lastweek"), $lang->effort->lastWeekEfforts, '', "id='lastweek'");
  24. echo html::a(inlink('effort', "userID=$userID&date=thismonth"), $lang->effort->thisMonthEfforts, '', "id='thismonth'");
  25. echo html::a(inlink('effort', "userID=$userID&date=lastmonth"), $lang->effort->lastMonthEfforts, '', "id='lastmonth'");
  26. echo html::a(inlink('effort', "userID=$userID&date=all"), $lang->effort->allDaysEfforts, '', "id='all'");
  27. ?>
  28. <a class='moreSubMenu hidden' data-display='dropdown' data-placement='beside-bottom'><?php echo $lang->more;?></a>
  29. <div id='moreSubMenu' class='list dropdown-menu'></div>
  30. </nav>
  31. <div class='heading'>
  32. <div class='title'>
  33. <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>
  34. </div>
  35. <nav class='nav'><a class='btn primary' href='<?php echo $this->createLink('company', 'browse');?>'><?php echo $lang->goback;?></a></nav>
  36. </div>
  37. <section id='page' class='section list-with-pager'>
  38. <div class='box' data-page='<?php echo $pager->pageID ?>' data-refresh-url='<?php echo $this->createLink('user', 'effort', http_build_query($this->app->getParams())); ?>'>
  39. <table class='table bordered'>
  40. <thead>
  41. <tr>
  42. <th class='w-100px'><?php echo $lang->effort->date;?></th>
  43. <th><?php echo $lang->effort->work;?></th>
  44. </tr>
  45. </thead>
  46. <?php foreach($efforts as $effort):?>
  47. <tr class='text-center' data-url='<?php echo $this->createLink('effort', 'view', "id=$effort->id");?>' data-id='<?php echo $effort->id;?>'>
  48. <td><?php echo $effort->date;?></td>
  49. <td class='text-left'><?php echo $effort->work . "({$effort->consumed}h)";?></td>
  50. </tr>
  51. <?php endforeach;?>
  52. </table>
  53. </div>
  54. <nav class='nav justify pager'>
  55. <?php $pager->show($align = 'justify');?>
  56. </nav>
  57. </section>
  58. <div class='list sort-panel enter-from-bottom hidden affix layer' id='sortPanel'>
  59. <?php
  60. $vars = "userID=$userID&type=$type&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage";
  61. $orders = array('id', 'date', 'consumed', 'left', 'work', 'objectType');
  62. foreach ($orders as $order)
  63. {
  64. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . $lang->effort->{$order});
  65. }
  66. ?>
  67. </div>
  68. <script>
  69. $('#<?php echo $methodName?>' + 'Tab').addClass('active');
  70. $('#subMenu > a').removeClass('active').filter('[href*="<?php echo $type?>"]').addClass('active');
  71. </script>
  72. <?php include "../../common/view/m.footer.html.php"; ?>