index.blade.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. <div class="page-header">
  7. <a href="{{url('admin/banner/add')}}" class="btn btn-primary">新增</a>
  8. </div>
  9. <form action="" method="get" class="form-horizontal form-line">
  10. <div class="form-group col col-lg-2 col-md-4 col-sm-6 col-xs-12" style="margin-right: 2px;">
  11. <input type="text" class="form-control" name="name" value="{{request('name','')}}" placeholder="请输入banner名称查询" />
  12. </div>
  13. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  14. <a href="{{url('admin/banner/index')}}" class="btn btn-sm btn-default" >重置</a>
  15. </form>
  16. <div class="row">
  17. <div class="col-xs-12">
  18. <div class="table-responsive">
  19. <table class="table table-striped table-bordered table-hover">
  20. <thead>
  21. <tr>
  22. <th>ID</th>
  23. <th>名称</th>
  24. <th>轮播图片</th>
  25. <th>跳转链接</th>
  26. <th>显示类型</th>
  27. <th>下单开始时间</th>
  28. <th>下单结束时间</th>
  29. <th>状态</th>
  30. <th>修改时间</th>
  31. <th>操作</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @foreach ($list as $a)
  36. <tr>
  37. <td> {{$a['id']}}</td>
  38. <td> {{$a['name']}}</td>
  39. <td> <img src="{{$a['thumb']}}" alt="" height="50"> </td>
  40. <td> {{$a['link_url']}} </td>
  41. <td> {{$a['type']?'下单显示':'正常显示'}} </td>
  42. <td> {{date('Y/m/d H:i:s',$a['start_time'])}}</td>
  43. <td> {{date('Y/m/d H:i:s',$a['end_time'])}}</td>
  44. <td> {{$a['status']?'停用':'启用'}} </td>
  45. <td> {{date('Y/m/d H:i:s',$a['update_time'])}}</td>
  46. <td>
  47. @if(check_auth('admin/banner/edit'))
  48. <a class="btn btn-sm btn-warning" href="{{url('admin/banner/edit?'.http_build_query(['id'=>$a['id']]))}}" title="查看">
  49. 编辑
  50. </a>
  51. @endif
  52. @if(check_auth('admin/banner/set_status'))
  53. @if ($a['status'])
  54. <a class="delete btn btn-sm btn-success" data-url="{{url('admin/banner/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'0']))}}">
  55. 启用
  56. </a>
  57. @else
  58. <a class="delete btn btn-sm btn-danger" data-url="{{url('admin/banner/set_status?'.http_build_query(['id'=>$a['id'],'status'=>'1']))}}">
  59. 停用
  60. </a>
  61. @endif
  62. @endif
  63. </td>
  64. </tr>
  65. @endforeach
  66. <tr>
  67. <td colspan="20" class="page">{{$list->render()}}</td>
  68. </tr>
  69. <tr>
  70. <td colspan="20">总计 {{$list->total()}} 个Banner</td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. </div>
  75. </div>
  76. </div>
  77. @endsection