index.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. @extends('admin.layout')
  2. @section('content')
  3. <div class="wrapper wrapper-content animated fadeInRight">
  4. <div class="row">
  5. <div class="col-sm-12">
  6. <div class="ibox float-e-margins">
  7. <div class="ibox-title">
  8. <h5>配置列表</h5>
  9. <div class="ibox-tools">
  10. <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <div class="row">
  16. <form method="GET" action="" accept-charset="UTF-8">
  17. <div class="col-sm-4">
  18. <div class="input-group">
  19. <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词" name="keyword"class="input-sm form-control">
  20. <span class="input-group-btn">
  21. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  22. </span>
  23. </div>
  24. </div>
  25. </form>
  26. @if(role('Base/Settings/create'))
  27. <div class="col-sm-3 pull-right">
  28. <a href="{{ U('Base/Settings/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
  29. </div>
  30. @endif
  31. </div>
  32. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  33. <thead>
  34. <tr>
  35. <th class="sorting" data-sort="id"> </th>
  36. <th class="sorting" data-sort="key"> 键 </th>
  37. <th class="sorting" data-sort="value"> 值 </th>
  38. <th class="sorting" data-sort="sort"> 排序 </th>
  39. <th class="sorting" data-sort="category"> 配置类别 </th>
  40. <th class="sorting" data-sort="pid"> 父id </th>
  41. <th class="sorting" data-sort="status"> 状态 </th>
  42. <th width="22%">相关操作</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @if(isset($list))
  47. @foreach($list as $key => $item) <tr>
  48. <td>{{ $item->id }}</td>
  49. <td>{{ $item->key }}</td>
  50. <td>{{ $item->value }}</td>
  51. <td>{{ $item->sort }}</td>
  52. <td>{{ $item->category }}</td>
  53. <td>{{ $item->pid }}</td>
  54. <td>{{ $item->status == '0' ? '禁用':'启用' }}</td>
  55. <td>
  56. @if($item->id>=1000)
  57. <div class="btn-group">
  58. <button data-toggle="dropdown"
  59. class="btn btn-warning btn-sm dropdown-toggle"
  60. aria-expanded="false">
  61. 操作 <span class="caret"></span>
  62. </button>
  63. <ul class="dropdown-menu">
  64. @if(role('Base/Settings/update'))
  65. <li><a href="{{ U('Base/Settings/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
  66. @endif
  67. @if(role('Base/Settings/destroy'))
  68. <li class="divider"></li>
  69. <li><a href="{{ U('Base/Settings/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
  70. @endif
  71. </ul>
  72. </div>
  73. @endif
  74. @if(role('Base/Settings/view'))
  75. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Base/Settings/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看</button>
  76. @endif
  77. </td>
  78. </tr>
  79. @endforeach
  80. @endif
  81. </tbody>
  82. </table>
  83. <div class="row">
  84. <div class="col-sm-6">
  85. <div class="dataTables_info" id="DataTables_Table_0_info"
  86. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
  87. </div>
  88. <div class="col-sm-6">
  89. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  90. {!! $list->setPath('')->appends(Request::all())->render() !!}
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. @endsection