index.blade.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. @if(check_auth('admin/share_message/add'))
  7. <div class="page-header">
  8. <a href="{{url('admin/share_message/add')}}" class="btn btn-primary">新增</a>
  9. </div>
  10. @endif
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="table-responsive">
  14. <table class="table table-striped table-bordered table-hover">
  15. <thead>
  16. <tr>
  17. <th>ID</th>
  18. <th>分享页面</th>
  19. <th>分享标题</th>
  20. <th>分享图标</th>
  21. <th>状态</th>
  22. <th>修改时间</th>
  23. <th>操作</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. @foreach ($list as $a)
  28. <tr>
  29. <th>{{$a['id']}}</th>
  30. <td>
  31. @foreach ( $pagesList as $pages=>$name)
  32. @if( $pages == $a['pages'])
  33. {{$name}}
  34. @endif
  35. @endforeach
  36. </td>
  37. <td>{{$a['title']}}</td>
  38. <td> <img src="{{path_compat($a['image_url'])}}" alt="" height="30"> </td>
  39. <td>{{$a['status']?'停用':'启用'}}</td>
  40. <td>{{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  41. <td>
  42. @if(check_auth('admin/share_message/edit'))
  43. <a href="{{url('admin/share_message/edit?'.http_build_query(['id'=>$a['id']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  44. @endif
  45. @if(check_auth('admin/share_message/set_status'))
  46. @if($a['status'])
  47. <a data-url="{{url('admin/share_message/set_status?'.http_build_query(['id'=>$a['id'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >启用</a>
  48. @else
  49. <a data-url="{{url('admin/share_message/set_status?'.http_build_query(['id'=>$a['id'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >停用</a>
  50. @endif
  51. @endif
  52. </td>
  53. </tr>
  54. @endforeach
  55. <tr>
  56. <td colspan="20" class="page">{{$list->render()}}</td>
  57. </tr>
  58. <tr>
  59. <td colspan="20">总计 {{$list->total()}} 个商店</td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. </div>
  66. @endsection