index.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. {template '_header'}
  2. <div class="page-header">
  3. 当前位置:<span class="text-primary">专题管理</span>
  4. </div>
  5. <div class="page-content">
  6. <form action="" method="get" class="form-horizontal form-search" role="form">
  7. <input type="hidden" name="c" value="special" />
  8. <input type="hidden" name="a" value="index" />
  9. <div class="page-toolbar">
  10. <div class="col-sm-4">
  11. <div class="input-group">
  12. <input type="text" class="input-sm form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="请输入关键词">
  13. <span class="input-group-btn">
  14. <button class="btn btn-primary" type="submit"> 搜索</button>
  15. </span>
  16. </div>
  17. </div>
  18. </div>
  19. </form>
  20. <form action="" method="post">
  21. <div class="row">
  22. <div class="col-md-12">
  23. <div class="page-table-header">
  24. <input type='checkbox' />
  25. <span class="pull-right">
  26. <a href="{:U('config/special.add')}" class="btn btn-primary"><i class="fa fa-plus"></i> 添加专题</a>
  27. </span>
  28. <div class="btn-group">
  29. <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:U('config/special.delete')}">
  30. <i class="icow icow-shanchu1"></i>删除</button>
  31. </div>
  32. </div>
  33. <?php if( count($list)>0){ ?>
  34. <table class="table table-responsive">
  35. <thead>
  36. <tr>
  37. <th style="width:25px;"><input type='checkbox' /></th>
  38. <th>专题名称</th>
  39. <th></th>
  40. <th style='width:70px;'>状态</th>
  41. <th style='width:65px;'>操作</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <?php foreach( $list as $item ){ ?>
  46. <tr>
  47. <td>
  48. <input type='checkbox' value="{$item['id']}"/>
  49. </td>
  50. <td>{$item['name']}</td>
  51. <td></td>
  52. <td>
  53. <span class='label <?php if( $item['enabled']==1){ ?>label-primary<?php }else{ ?>label-default<?php } ?> defaults'
  54. data-toggle='ajaxSwitch'
  55. data-switch-value='{$item['enabled']}'
  56. data-switch-value0='0|禁用|label label-default defaults|{:U('config/special.enabled',array('enabled'=>1,'id'=>$item['id']))}'
  57. data-switch-value1='1|启用|label label-primary defaults|{:U('config/special.enabled',array('enabled'=>0,'id'=>$item['id']))}'
  58. data-switch-css='.defaults'
  59. data-switch-other = 'true'
  60. style="cursor: pointer;"
  61. >
  62. <?php if( $item['enabled']==1){ ?>启用<?php }else{ ?>禁用<?php } ?></span>
  63. </td>
  64. <td style="text-align:left;">
  65. <?php if( $item['uniacid']!=0){ ?>
  66. <a href="{:U('config/special.edit', array('id' => $item['id']))}" class="btn btn-default btn-sm btn-operation btn-op">
  67. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="修改">
  68. <i class="icow icow-bianji2"></i>
  69. </span>
  70. </a>
  71. <a data-toggle='ajaxRemove' href="{:U('config/special.delete', array('id' => $item['id']))}"class="btn btn-default btn-sm btn-operation btn-op" data-confirm='确认要删除此专题吗?'>
  72. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
  73. <i class="icow icow-shanchu1"></i>
  74. </span>
  75. </a>
  76. <?php } ?>
  77. </td>
  78. </tr>
  79. <?php } ?>
  80. <tr>
  81. <td colspan='4'>
  82. <div class='pagers' style='float:right;'>
  83. {$pager}
  84. </div>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. <?php }else{ ?>
  90. <div class='panel panel-default'>
  91. <div class='panel-body' style='text-align: center;padding:30px;'>
  92. 暂时没有任何专题!
  93. </div>
  94. </div>
  95. <?php } ?>
  96. </div>
  97. </div>
  98. </form>
  99. </div>
  100. {template '_footer'}