browse.html.php 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. /**
  3. * The browse view file of pivot module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology 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->pivot->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('pivot', '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('pivot', 'preview', '', $lang->pivot->toPreview, '', "class='btn btn-secondary'");?>
  28. <?php common::printLink('pivot', 'create', "dimensionID=$dimensionID", '<i class="icon icon-plus"></i> ' . $lang->pivot->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->pivot->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=pivot", $lang->pivot->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='pivotList'>
  49. <thead>
  50. <tr>
  51. <th class="c-id"><?php echo $lang->pivot->id;?></th>
  52. <th class="c-name"><?php echo $lang->pivot->name;?></th>
  53. <th class="c-openedByAB"><?php echo $lang->openedByAB;?></th>
  54. <th class="c-group"><?php echo $lang->pivot->group;?></th>
  55. <th class="c-desc"><?php echo $lang->pivot->desc;?></th>
  56. <th class="c-actions"><?php echo $lang->actions;?></th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. <?php foreach($pivots as $pivot):?>
  61. <?php
  62. $hasPriv = common::hasPriv('pivot', 'design');
  63. $clickable = !$pivot->builtin;
  64. $class = !empty($pivot->used) ? "btn-design" : '';
  65. ?>
  66. <tr>
  67. <td>
  68. <?php echo ($hasPriv and $clickable) ? html::a(inlink('design', "id=$pivot->id"), $pivot->id, '', "class='$class' title={$pivot->id}") : "<span class='unclickable' title={$pivot->id}>$pivot->id</span>";?>
  69. </td>
  70. <td class='c-name name-padding'>
  71. <?php echo ($hasPriv and $clickable) ? html::a(inlink('design', "id=$pivot->id"), $pivot->name, '', "class='$class' title={$pivot->name}") : "<span class='unclickable' title={$pivot->name}>$pivot->name</span>";?>
  72. <?php if($pivot->stage == 'draft') echo "<span class='label label-outline label-info draft-label label-position'>{$lang->pivot->draftIcon}</span>";?>
  73. </td>
  74. <td class='c-name' title='<?php echo zget($users, $pivot->createdBy);?>'><?php echo zget($users, $pivot->createdBy);?></td>
  75. <?php $groupLabels = '';?>
  76. <?php foreach(explode(',', $pivot->group) as $group):?>
  77. <?php if(zget($groups, $group, '')) $groupLabels .= zget($groups, $group) . ',';?>
  78. <?php endforeach;?>
  79. <?php $groupLabels = rtrim($groupLabels, ',');?>
  80. <td title="<?php echo $groupLabels;?>">
  81. <?php echo $groupLabels;?>
  82. </td>
  83. <td class='c-name' title='<?php echo $pivot->desc;?>'><?php echo $pivot->desc;?></td>
  84. <td class='c-actions'>
  85. <?php common::printIcon('pivot', 'design', "id=$pivot->id", $pivot, 'list', 'design', '', !empty($pivot->used) ? 'btn-design' : '', false, '', '', 0, $clickable);?>
  86. <?php common::printIcon('pivot', 'edit', "id=$pivot->id", $pivot, 'list', '', '', 'iframe', true, '', '', 0, $clickable);?>
  87. <?php common::printIcon('pivot', 'delete', "id=$pivot->id&confirm=no", $pivot, 'list', 'trash', 'hiddenwin', false, '', '', '', 0, $clickable);?>
  88. </td>
  89. </tr>
  90. <?php endforeach;?>
  91. </tbody>
  92. </table>
  93. <div class='table-footer'>
  94. <?php $pager->show('right', 'pagerjs');?>
  95. </div>
  96. </div>
  97. </div>
  98. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>