m.browse.html.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * The browse mobile view file of productplan module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(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 Yidong Wang <yidong@cnezsoft.com>
  8. * @package productplan
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. $featureMenu = customModel::getFeatureMenu($this->moduleName, $this->methodName);
  13. if($featureMenu) $bodyClass = 'with-menu-top';
  14. ?>
  15. <?php include '../../common/view/m.header.html.php';?>
  16. <nav id='menu' class='menu nav affix dock-top canvas'>
  17. <?php foreach($featureMenu as $menuItem):?>
  18. <?php if(isset($menuItem->hidden)) continue;?>
  19. <?php echo html::a($this->inlink('browse', "productID=$productID&branch=$branch&browseType={$menuItem->name}"), $menuItem->text, '', "id='{$menuItem->name}Tab'");?>
  20. <?php endforeach;?>
  21. </nav>
  22. <div class='heading'>
  23. <div class='title'>
  24. <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>
  25. </div>
  26. </div>
  27. <section id='page' class='section list-with-pager'>
  28. <?php $refreshUrl = $this->createLink('productplan', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}");?>
  29. <div class='box' data-page='<?php echo $pager->pageID ?>' data-refresh-url='<?php echo $refreshUrl ?>'>
  30. <table class='table bordered no-margin'>
  31. <thead>
  32. <tr>
  33. <th><?php echo $lang->productplan->title;?></th>
  34. <th class='w-100px'><?php echo $lang->productplan->begin;?></th>
  35. <th class='w-100px'><?php echo $lang->productplan->end;?></th>
  36. </tr>
  37. </thead>
  38. <?php foreach($plans as $plan):?>
  39. <tr class='text-center' data-url='<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}")?>' data-id='<?php echo$plan->id;?>'>
  40. <td class='text-left'>
  41. <?php if($this->session->currentProductType != 'normal') echo "<span class='label label-branch label-badge'>{$branches[$plan->branch]}</span>"?>
  42. <?php echo $plan->title;?>
  43. </td>
  44. <td><?php echo $plan->begin;?></td>
  45. <td><?php echo $plan->end;?></td>
  46. </tr>
  47. <?php endforeach;?>
  48. </table>
  49. </div>
  50. <nav class='nav justified pager'>
  51. <?php $pager->show($align = 'justify');?>
  52. </nav>
  53. </section>
  54. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  55. <?php
  56. $vars = "productID=$productID&branch=$branch&browseType=$browseType&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
  57. $sortOrders = array('id', 'title', 'begin', 'end');
  58. foreach ($sortOrders as $order)
  59. {
  60. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->productplan->{$order}));
  61. }
  62. ?>
  63. </div>
  64. <script>
  65. $(function()
  66. {
  67. $('#<?php echo $browseType;?>Tab').addClass('active');
  68. })
  69. </script>
  70. <?php include '../../common/view/m.footer.html.php';?>