index.blade.php 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. @extends('admin/public/layout')
  2. @section('title')商城管理@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>积分商城管理</h1>
  6. </section>
  7. <section class="content">
  8. <div class="row">
  9. <div class="col-xs-12">
  10. <div class="box">
  11. <form role="form" name="item_form" id="item_form" method="post">
  12. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  13. <div class="box-header">
  14. <div class="row">
  15. <div class="col-xs-12">
  16. <div class="btn-group">
  17. <a href="{{ route('admin.goods.create') }}" class="btn btn-default btn-sm" data-toggle="tooltip" title="添加商品"><i class="fa fa-plus"></i></a>
  18. <button type="button" class="btn btn-default btn-sm" data-toggle="tooltip" title="删除选中项" onclick="confirm_submit('item_form','{{ route('admin.goods.destroy') }}','确认删除选中项?')"><i class="fa fa-trash-o"></i></button>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="box-body no-padding">
  24. <div class="table-responsive">
  25. <table class="table table-striped">
  26. <tr>
  27. <th><input type="checkbox" class="checkbox-toggle"/></th>
  28. <th>logo</th>
  29. <th>名称</th>
  30. <th>分类</th>
  31. <th>是否需要邮寄</th>
  32. <th>金币</th>
  33. <th>剩余数量</th>
  34. <th>创建时间</th>
  35. <th>状态</th>
  36. <th>操作</th>
  37. </tr>
  38. @foreach($goods as $good)
  39. <tr>
  40. <td><input type="checkbox" value="{{ $good->id }}" name="ids[]"/></td>
  41. <td>
  42. @if($good->logo)
  43. <img src="{{ route('website.image.show',['image_name'=>$good->logo]) }}" style="width: 27px;"/>
  44. @endif
  45. </td>
  46. <td>{{ $good->name }}</td>
  47. <td>@if($good->category){{ $good->category->name }} @else 无 @endif</td>
  48. <td>{{ trans_goods_post_type($good->post_type) }}</td>
  49. <td>{{ $good->coins }}</td>
  50. <td>{{ $good->remnants }}</td>
  51. <td>{{ $good->created_at }}</td>
  52. <td><span class="label @if($good->status===0) label-danger @else label-success @endif">{{ trans_common_status($good->status) }}</span> </td>
  53. <td>
  54. <div class="btn-group-xs" >
  55. <a class="btn btn-default" href="{{ route('admin.goods.edit',['id'=>$good->id]) }}" data-toggle="tooltip" title="编辑公告信息"><i class="fa fa-edit"></i></a>
  56. </div>
  57. </td>
  58. </tr>
  59. @endforeach
  60. </table>
  61. </div>
  62. </div>
  63. <div class="box-footer clearfix">
  64. {!! str_replace('/?', '?', $goods->render()) !!}
  65. </div>
  66. </form>
  67. </div>
  68. </div>
  69. </div>
  70. </section>
  71. @endsection
  72. @section('script')
  73. <script type="text/javascript">
  74. set_active_menu('operations',"{{ route('admin.goods.index') }}");
  75. </script>
  76. @endsection