index.blade.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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="请输入ID/名称"
  20. name="keyword" class="input-sm form-control">
  21. <span class="input-group-btn">
  22. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  23. </span>
  24. </div>
  25. </div>
  26. </form>
  27. @if(role('Album/Nav/create'))
  28. <div class="col-sm-3 pull-right">
  29. <a href="{{ U('Album/Nav/create')}}"
  30. class="btn btn-sm btn-primary pull-right">添加</a>
  31. </div>
  32. @endif
  33. </div>
  34. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  35. <thead>
  36. <tr>
  37. <th class="sorting" data-sort="id"> ID</th>
  38. <th class="sorting" data-sort="name"> 名称</th>
  39. <th class="sorting" data-sort="open_type"> 打开方式</th>
  40. <th class="sorting" data-sort="state"> 位置</th>
  41. <th class="sorting" data-sort="pic_url"> 图标</th>
  42. <th class="sorting" data-sort="pic_url_active"> 选中图标</th>
  43. <th width="22%">相关操作</th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. @if(isset($list))
  48. @foreach($list as $key => $item)
  49. <tr>
  50. <td>{{ $item->id }}</td>
  51. <td>{{ $item->name }}</td>
  52. @if($item->open_type == 1)
  53. <td>一键拨号</td>
  54. @elseif($item->open_type == 2)
  55. <td>一键导航</td>
  56. @elseif($item->open_type == 3)
  57. <td>跳转小程序</td>
  58. @elseif($item->open_type == 4)
  59. <td>跳转页面</td>
  60. @endif
  61. @if($item->state ==0 )
  62. <td>底部</td>
  63. @else
  64. <td>顶部</td>
  65. @endif
  66. <td><img src="{{ $item->pic_url }}" width="50"/></td>
  67. <td><img src="{{ $item->pic_url_active }}" width="50"/></td>
  68. <td>
  69. <div class="pull-left">
  70. @if(role('Album/Nav/update'))
  71. <a href="{{ U('Album/Nav/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
  72. @endif
  73. @if(role('Album/Nav/destroy'))
  74. <a href="{{ U('Album/Nav/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
  75. @endif
  76. </div>
  77. {{--@if(role('Album/Nav/view'))
  78. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/Nav/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看</button>
  79. @endif--}}
  80. </td>
  81. </tr>
  82. @endforeach
  83. @endif
  84. </tbody>
  85. </table>
  86. <div class="row">
  87. <div class="col-sm-6">
  88. <div class="dataTables_info" id="DataTables_Table_0_info"
  89. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  90. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  91. </div>
  92. </div>
  93. <div class="col-sm-6">
  94. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  95. {!! $list->setPath('')->appends(Request::all())->render() !!}
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. @endsection