browse.html.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /**
  3. * The browse view file of chart 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)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package dataset
  9. * @version $Id: browse.html.php 4129 2013-01-18 01:58:14Z wwccss $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php include $app->getModuleRoot() . 'common/view/tablesorter.html.php';?>
  15. <?php js::set('groupID', $groupID);?>
  16. <?php js::set('confirmDesign', $lang->chart->confirm->design);?>
  17. <div id='mainMenu' class='clearfix'>
  18. <div id="sidebarHeader">
  19. <div class="title" title="<?php echo $groupName;?>">
  20. <?php
  21. echo $groupName;
  22. if(!empty($groupID)) echo html::a($this->createLink('chart', 'browse', "dimensionID=$dimensionID&groupID=0&orderBy=$orderBy&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage"), "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted' data-app='{$this->app->tab}'");
  23. ?>
  24. </div>
  25. </div>
  26. <div class="btn-toolbar pull-right">
  27. <?php common::printLink('chart', 'preview', '', $lang->chart->toPreview, '', "class='btn btn-secondary btn-toPreview'");?>
  28. <?php common::printLink('chart', 'create', "dimensionID=$dimensionID", '<i class="icon icon-plus"></i> ' . $lang->chart->create, '', 'class="btn btn-primary iframe"', true, true);?>
  29. </div>
  30. </div>
  31. <div id="mainContent" class='main-row split-row fade main-table'>
  32. <div class="side-col" id='sidebar' data-min-width='235'>
  33. <div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
  34. <div class='cell'>
  35. <?php if(empty($groupTree)):?>
  36. <hr class="space">
  37. <div class="text-center text-muted"><?php echo $lang->chart->noGroup;?></div>
  38. <hr class="space">
  39. <?php else:?>
  40. <?php echo $groupTree;?>
  41. <div class="text-center">
  42. <?php common::printLink('tree', 'browsegroup', "dimensionID=$dimensionID&groupID=$groupID&type=chart", $lang->chart->manageGroup, '', "class='btn btn-info btn-wide'");?>
  43. </div>
  44. <?php endif;?>
  45. </div>
  46. </div>
  47. <div class='main-col' data-min-width='400'>
  48. <table class="table" id='chartList'>
  49. <thead>
  50. <tr>
  51. <th class="c-id"><?php echo $lang->chart->id;?></th>
  52. <th class="c-name"><?php echo $lang->chart->name;?></th>
  53. <th class="c-openedByAB"><?php echo $lang->openedByAB;?></th>
  54. <th class="c-group"><?php echo $lang->chart->group;?></th>
  55. <th class="c-type"><?php echo $lang->chart->type;?></th>
  56. <th class="c-desc"><?php echo $lang->chart->desc;?></th>
  57. <th class="c-actions"><?php echo $lang->actions;?></th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. <?php foreach($charts as $chart):?>
  62. <?php
  63. $hasPriv = common::hasPriv('chart', 'design');
  64. $clickable = $this->chart->isClickable($chart, 'design');
  65. $class = (!empty($chart->used) ? "btn-design" : '');
  66. if(!$clickable && !helper::hasFeature('program') && strpos(strtolower($chart->code), 'program') !== false) continue;
  67. ?>
  68. <tr>
  69. <td>
  70. <?php echo ($hasPriv and $clickable) ? html::a(inlink('design', "id=$chart->id"), $chart->id, '', "class='$class' title={$chart->id}") : "<span class='unclickable' title={$chart->id}>$chart->id</span>";?>
  71. </td>
  72. <td class='c-name name-padding'>
  73. <?php echo ($hasPriv and $clickable) ? html::a(inlink('design', "id=$chart->id"), $chart->name, '', "class='$class' title={$chart->name}") : "<span class='unclickable' title={$chart->name}>$chart->name</span>";?>
  74. <?php if($chart->stage == 'draft') echo "<span class='label label-outline label-info draft-label label-position'>{$lang->chart->draftIcon}</span>";?>
  75. </td>
  76. <td class='c-name' title='<?php echo zget($users, $chart->createdBy);?>'><?php echo zget($users, $chart->createdBy);?></td>
  77. <?php $groupLabels = '';?>
  78. <?php foreach(explode(',', $chart->group) as $group):?>
  79. <?php if(zget($groups, $group, '')) $groupLabels .= zget($groups, $group) . ',';?>
  80. <?php endforeach;?>
  81. <?php $groupLabels = rtrim($groupLabels, ',');?>
  82. <td title='<?php echo $groupLabels;?>'><?php echo $groupLabels;?></td>
  83. <td><?php echo zget($lang->chart->browseTypeList, $chart->type, $chart->type);?></td>
  84. <td class='c-name' title='<?php echo $chart->desc;?>'><?php echo $chart->desc;?></td>
  85. <td class='c-actions'>
  86. <?php common::printIcon('chart', 'design', "id=$chart->id", $chart, 'list', 'design', '', !empty($chart->used) ? 'btn-design' : '');?>
  87. <?php common::printIcon('chart', 'edit', "id=$chart->id", $chart, 'list', '', '', 'iframe', true);?>
  88. <?php common::printIcon('chart', 'delete', "id=$chart->id", $chart, 'list', 'trash', 'hiddenwin');?>
  89. </td>
  90. </tr>
  91. <?php endforeach;?>
  92. </tbody>
  93. </table>
  94. <div class='table-footer'>
  95. <?php $pager->show('right', 'pagerjs');?>
  96. </div>
  97. </div>
  98. </div>
  99. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>