browse.html.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
  3. <?php unset($lang->baseline->objectList['']);?>
  4. <div id='mainMenu' class='clearfix'>
  5. <div id="sidebarHeader">
  6. <div class="title">
  7. <?php
  8. if($object)
  9. {
  10. echo zget($lang->baseline->objectList, $object);
  11. echo html::a(inlink($method, "type={$type}&object="), "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
  12. }
  13. else
  14. {
  15. echo $lang->reviewcl->browseByType;
  16. }
  17. ?>
  18. </div>
  19. </div>
  20. <div class="toolbar">
  21. <div class='btn-toolbar pull-left'>
  22. <?php include './menu.html.php';?>
  23. </div>
  24. <div class='btn-toolbar pull-right'>
  25. <?php if(common::hasPriv('reviewcl', 'create') and common::hasPriv('reviewcl', 'batchCreate')):?>
  26. <div class='btn-group dropdown'>
  27. <?php
  28. $actionLink = $this->createLink('reviewcl', 'create', "type=$type&object=$object");
  29. echo html::a($actionLink, "<i class='icon icon-plus'></i> {$lang->reviewcl->create}", '', "class='btn btn-primary'");
  30. ?>
  31. <button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
  32. <ul class='dropdown-menu pull-right'>
  33. <li><?php echo html::a($actionLink, $lang->reviewcl->create);?></li>
  34. <li><?php echo html::a($this->createLink('reviewcl', 'batchCreate', "type=$type&object=$object"), $lang->reviewcl->batchCreate);?></li>
  35. </ul>
  36. </div>
  37. <?php else:?>
  38. <?php common::printLink('reviewcl', 'batchCreate', "type=$type&object=$object", "<i class='icon icon-plus'></i>" . $lang->reviewcl->batchCreate, '', "class='btn btn-primary'");?>
  39. <?php common::printLink('reviewcl', 'create', "type=$type&object=$object", "<i class='icon icon-plus'></i>" . $lang->reviewcl->create, '', "class='btn btn-primary'");?>
  40. <?php endif;?>
  41. </div>
  42. </div>
  43. </div>
  44. <div id="mainContent" class="main-row fade in">
  45. <div class="side-col" id="sidebar">
  46. <div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
  47. <div class="cell">
  48. <ul class='tree'>
  49. <?php foreach($lang->baseline->objectList as $key => $value):?>
  50. <?php if(empty($key) or empty($value)) continue;?>
  51. <?php $active = $object == $key ? 'active' : '';?>
  52. <li><?php echo html::a($this->createLink('reviewcl', $method, "type={$type}&object={$key}"), $value, '', "class= $active");?></li>
  53. <?php endforeach;?>
  54. </ul>
  55. </div>
  56. </div>
  57. <div class="main-col">
  58. <div id="mainContent" class="main-table">
  59. <?php if(empty($reviewcls)):?>
  60. <div class="table-empty-tip">
  61. <p><span class="text-muted"><?php echo $lang->reviewcl->noReviewcl;?></span></p>
  62. </div>
  63. <?php else:?>
  64. <table class='table has-sort-head table-fixrd' id="reviewclTable">
  65. <?php $vars = "type=$type&object=$object&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
  66. <thead>
  67. <tr>
  68. <th class='w-100px'><?php common::printOrderLink('category', $orderBy, $vars, $lang->reviewcl->category);?></th>
  69. <th class='w-70px'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->reviewcl->id);?></th>
  70. <th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->reviewcl->title);?></th>
  71. <th class='w-150px'><?php common::printOrderLink('object', $orderBy, $vars, $lang->reviewcl->object);?></th>
  72. <th class='w-120px'><?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->reviewcl->createdBy);?></th>
  73. <th class='w-120px'><?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->reviewcl->createdDate);?></th>
  74. <th class='c-action w-80px'><?php echo $lang->reviewcl->actions;?></th>
  75. </tr>
  76. </thead>
  77. <tbody>
  78. <?php foreach($reviewcls as $categoryID => $values):?>
  79. <?php $firstRow = true;?>
  80. <?php foreach($reviewcls[$categoryID] as $reviewcl):?>
  81. <tr>
  82. <?php if($firstRow):?>
  83. <td rowspan=<?php echo count($reviewcls[$categoryID]);?>><?php echo zget($lang->reviewcl->{$type . 'CategoryList'}, $categoryID); ?></td>
  84. <?php endif;?>
  85. <td><?php echo $reviewcl->id;?></td>
  86. <td><?php echo html::a($this->createLink('reviewcl', 'view', "id=$reviewcl->id"), $reviewcl->title);?></td>
  87. <td><?php echo zget($lang->baseline->objectList, $reviewcl->object);?></td>
  88. <td><?php echo zget($users, $reviewcl->createdBy);?></td>
  89. <td><?php echo substr($reviewcl->createdDate, 0, 11);?></td>
  90. <td class='c-actions'>
  91. <?php
  92. $vars = "id={$reviewcl->id}";
  93. common::printIcon('reviewcl', 'edit', $vars, $reviewcl, 'list');
  94. common::printIcon('reviewcl', 'delete', $vars, $reviewcl, 'list', 'trash', 'hiddenwin');
  95. ?>
  96. </tr>
  97. <?php $firstRow = false;?>
  98. <?php endforeach;?>
  99. <?php endforeach;?>
  100. </tbody>
  101. </table>
  102. <div class='table-footer table-statistic'>
  103. <?php $pager->show('right', 'pagerjs');?>
  104. </div>
  105. <?php endif;?>
  106. </div>
  107. </div>
  108. </div>
  109. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>