all.html.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * The all view file of marketresearch module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Hu Fangzhou <hufangzhou@easycorp.ltd>
  7. * @package marketresearch
  8. * @link https://www.zentao.net
  9. */
  10. ?>
  11. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  12. <?php include $app->getModuleRoot() . 'common/view/datatable.fix.html.php';?>
  13. <div id="mainMenu" class="clearfix">
  14. <div class="btn-toolbar pull-left">
  15. <?php foreach($lang->marketresearch->featureBar['all'] as $key => $label):?>
  16. <?php $label = "<span class='text'>$label</span>";?>
  17. <?php
  18. $active = '';
  19. if($browseType == $key)
  20. {
  21. $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
  22. $active = 'btn-active-text';
  23. }
  24. ?>
  25. <?php echo html::a($this->createLink('marketresearch', $this->app->rawMethod, "marketID=$marketID&browseType=$key&param=0&orderBy=$orderBy"), $label, '', "class='btn btn-link $active' id='{$key}Tab'");?>
  26. <?php endforeach;?>
  27. <?php echo html::checkbox('involvedResearch', array('1' => $lang->marketresearch->mine), '', $this->cookie->involvedResearch ? 'checked=checked' : '');?>
  28. </div>
  29. <div class="btn-toolbar pull-right">
  30. <?php if(common::hasPriv('marketresearch', 'create')) echo html::a($this->createLink('marketresearch', 'create', "marketID=$marketID"), "<i class='icon-plus'></i> {$lang->marketresearch->create}", '', "class='btn btn-primary'");?>
  31. </div>
  32. </div>
  33. <div id="mainContent" class="main-row fade">
  34. <div class="main-col">
  35. <?php if(empty($researches)):?>
  36. <div class="table-empty-tip">
  37. <p>
  38. <span class="text-muted"><?php echo $lang->noData;?></span>
  39. <?php if(common::hasPriv('marketresearch', 'create')):?>
  40. <?php echo html::a($this->createLink('marketresearch', 'create', "marketID=$marketID"), "<i class='icon icon-plus'></i> " . $lang->marketresearch->create, '', "class='btn btn-info'");?>
  41. <?php endif;?>
  42. </p>
  43. </div>
  44. <?php else:?>
  45. <form class='main-table' method='post' id='marketresearchForm'>
  46. <div class="table-header fixed-right">
  47. <nav class="btn-toolbar pull-right setting"></nav>
  48. </div>
  49. <?php
  50. $datatableId = $this->moduleName . ucfirst($this->methodName);
  51. $useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable');
  52. $vars = "marketID=$marketID&browseType=$browseType&param=0&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";
  53. if($useDatatable) include $app->getModuleRoot() . 'common/view/datatable.html.php';
  54. $setting = $this->datatable->getOldSetting('marketresearch');
  55. $widths = $this->datatable->setFixedFieldWidth($setting);
  56. $columns = 0;
  57. ?>
  58. <?php if(!$useDatatable) echo '<div class="table-responsive">';?>
  59. <table class='table has-sort-head' id='marketresearchList'>
  60. <thead>
  61. <tr>
  62. <?php
  63. foreach($setting as $key => $value)
  64. {
  65. if($value->show)
  66. {
  67. $this->datatable->printHead($value, $orderBy, $vars, false);
  68. $columns ++;
  69. }
  70. }
  71. ?>
  72. </tr>
  73. </thead>
  74. <tbody>
  75. <?php foreach($researches as $research):?>
  76. <tr data-id='<?php echo $research->id?>'>
  77. <?php
  78. foreach($setting as $value) $this->marketresearch->printCell($value, $research, $users, $markets);
  79. ?>
  80. </tr>
  81. <?php endforeach;?>
  82. </tbody>
  83. </table>
  84. <?php if(!$useDatatable) echo '</div>';?>
  85. <div class="table-footer">
  86. <?php $pager->show('right', 'pagerjs');?>
  87. </div>
  88. </form>
  89. <?php endif;?>
  90. </div>
  91. </div>
  92. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>