browsereport.html.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * The browseReport view file of report module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2014 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
  6. * @license LGPL (http://www.gnu.org/licenses/lgpl.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package report
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <div id='mainContent' class='main-row'>
  15. <div class='side-col col-lg'>
  16. <div class='panel'>
  17. <div class='panel-heading'>
  18. <div class='panel-title'><?php echo $lang->report->list;?></div>
  19. </div>
  20. <div class='panel-body'>
  21. <div id='report-list' class='list-group'>
  22. <?php
  23. foreach($lang->crystal->moduleList as $module => $name)
  24. {
  25. if(empty($name)) $name = $lang->crystal->all;
  26. $class = $currentModule == $module ? 'selected' : '';
  27. echo html::a(inlink('browseReport', "module=$module"), '<i class="icon icon-file-text"></i> ' . $name, '', "class='$class'");
  28. }
  29. ?>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class='main-col'>
  35. <div class='cell'>
  36. <div class='panel'>
  37. <div class="panel-heading">
  38. <div class="panel-title">
  39. <?php echo $currentModule == '' ? $lang->crystal->all : $lang->crystal->moduleList[$currentModule];?>
  40. </div>
  41. <?php if(common::hasPriv('report', 'custom')):?>
  42. <nav class="panel-actions btn-toolbar">
  43. <?php echo html::a($this->createLink('report', 'custom'), $lang->crystal->custom, '', "class='btn btn-primary btn-sm'")?>
  44. </nav>
  45. <?php endif;?>
  46. </div>
  47. <div class='main-table' data-ride='table'>
  48. <table class='table table-condensed table-striped table-bordered table-fixed no-margin'>
  49. <thead>
  50. <tr>
  51. <th class='w-50px'><?php echo $lang->crystal->id?></th>
  52. <th width='160'><?php echo $lang->crystal->name?></th>
  53. <th><?php echo $lang->crystal->desc?></th>
  54. <th class='w-90px'><?php echo $lang->crystal->module?></th>
  55. <th class='w-130px'><?php echo $lang->actions?></th>
  56. </tr>
  57. </thead>
  58. <tbody class='text-center'>
  59. <?php foreach($reports as $report):?>
  60. <tr>
  61. <td><?php echo $report->id;?></td>
  62. <td class='text-left'>
  63. <?php
  64. $name = json_decode($report->name, true);
  65. if(empty($name)) $name[$this->app->getClientLang()] = $report->name;
  66. echo zget($name, $this->app->getClientLang(), '');
  67. ?>
  68. </td>
  69. <?php
  70. $desc = json_decode($report->desc, true);
  71. $desc = zget($desc, $this->app->getClientLang(), '');
  72. ?>
  73. <td class='text-left' title='<?php echo $desc?>'><?php echo $desc;?></td>
  74. <td>
  75. <?php
  76. $modules = explode(',', trim($report->module, ','));
  77. foreach($modules as $module) echo $lang->crystal->moduleList[$module] . ' ';
  78. ?>
  79. </td>
  80. <td>
  81. <?php
  82. if(common::hasPriv('report', 'useReport')) echo html::a(inlink('useReport', "reportID=$report->id"), $lang->report->useReport, '', $report->vars ? "data-type='iframe' data-toggle='modal'" : '');
  83. if(common::hasPriv('report', 'editReport')) echo html::a(inlink('editReport', "reportID=$report->id"), $lang->report->editReport, '', "data-type='iframe' data-toggle='modal'");
  84. if(common::hasPriv('report', 'deleteReport')) echo html::a(inlink('deleteReport', "reportID=$report->id"), $lang->delete, 'hiddenwin');
  85. ?>
  86. </td>
  87. </tr>
  88. <?php endforeach;?>
  89. </tbody>
  90. </table>
  91. <div class='table-footer'>
  92. <?php $pager->show('right', 'pagerjs');?>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>