m.browse.html.php 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /**
  3. * The browse mobile view file of bug 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 bug
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. $featureMenu = $config->global->flow == 'full' ? customModel::getFeatureMenu($this->moduleName, $this->methodName) : array();
  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 $id => $menuItem):?>
  18. <?php if(isset($menuItem->hidden) || $menuItem->name == 'more') continue;?>
  19. <?php if(strpos($menuItem->name, 'QUERY') === 0) unset($featureMenu[$id]);?>
  20. <?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&browseType={$menuItem->name}&param=0"), $menuItem->text, '', "id='{$menuItem->name}Tab'");?>
  21. <?php endforeach;?>
  22. <a class='moreMenu hidden' data-display='dropdown' data-placement='beside-bottom'><?php echo $lang->more;?></a>
  23. <div id='moreMenu' class='list dropdown-menu'></div>
  24. </nav>
  25. <div class='heading'>
  26. <div class='title'>
  27. <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>
  28. </div>
  29. <?php if(common::hasPriv('bug', 'create')):?>
  30. <nav class='nav'>
  31. <a class='btn primary' data-display='modal' data-placement='bottom' data-remote='<?php echo $this->createLink('bug', 'create', "productID=$productID&branch=$branch")?>'>
  32. <i class='icon icon-plus'></i> &nbsp;&nbsp;<?php echo $lang->bug->create;?>
  33. </a>
  34. </nav>
  35. <?php endif;?>
  36. </div>
  37. <section id='page' class='section list-with-pager'>
  38. <?php $refreshUrl = $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=$param&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}");?>
  39. <div class='box' data-page='<?php echo $pager->pageID ?>' data-refresh-url='<?php echo $refreshUrl ?>'>
  40. <table class='table bordered no-margin'>
  41. <thead>
  42. <tr>
  43. <th><?php echo $lang->bug->title;?></th>
  44. <th class='w-80px text-center'><?php echo $lang->bug->status;?></th>
  45. </tr>
  46. </thead>
  47. <?php foreach($bugs as $bug):?>
  48. <tr class='text-center' data-url='<?php echo $this->createLink('bug', 'view', "bugID={$bug->id}")?>' data-id='<?php echo$bug->id;?>'>
  49. <td class='text-left'>
  50. <?php
  51. $class = 'confirm' . $bug->confirmed;
  52. echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}]</span> ";
  53. if($bug->branch)echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>{$branches[$bug->branch]}</span> ";
  54. if($modulePairs and $bug->module)echo "<span title='{$lang->bug->module}' class='label label-info label-badge'>{$modulePairs[$bug->module]}</span> ";
  55. ?>
  56. <?php echo "<span style='color:$bug->color'>" . $bug->title . '</span>';?>
  57. </td>
  58. <td class='bug-<?php echo $bug->status?>'><?php echo zget($lang->bug->statusList, $bug->status);?></td>
  59. </tr>
  60. <?php endforeach;?>
  61. </table>
  62. </div>
  63. <nav class='nav justified pager'>
  64. <?php $pager->show($align = 'justify');?>
  65. </nav>
  66. </section>
  67. <div class='list sort-panel hidden affix enter-from-bottom layer' id='sortPanel'>
  68. <?php
  69. $vars = "productID=$productID&branch=$branch&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
  70. $sortOrders = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'deadline', 'assignedTo', 'resolvedBy', 'resolution');
  71. foreach ($sortOrders as $order)
  72. {
  73. commonModel::printOrderLink($order, $orderBy, $vars, '<i class="icon icon-sort-indicator"></i>' . ($lang->bug->{$order}));
  74. }
  75. ?>
  76. </div>
  77. <script>
  78. $(function()
  79. {
  80. $('#<?php echo $browseType;?>Tab').addClass('active');
  81. <?php if($config->global->flow != 'full'):?>
  82. $('#appnav a').removeClass('active');
  83. $("#appnav a[href*='<?php echo $browseType?>']").addClass('active');
  84. <?php endif;?>
  85. })
  86. </script>
  87. <?php include '../../common/view/m.footer.html.php';?>