index.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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/用户id/梦想名称" 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('Dream/Info/create'))
  27. <div class="col-sm-3 pull-right">
  28. <a href="{{ U('Dream/Info/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"> id</th>
  36. <th class="sorting" data-sort="user_id"> 用户ID </th>
  37. <th class="sorting" data-sort="name"> 梦想名称 </th>
  38. <th class="sorting" data-sort="coin"> 所需梦想币 </th>
  39. <th class="sorting" data-sort="get_coin"> 获得梦想币 </th>
  40. <th class="sorting" data-sort="mark"> 梦想分 </th>
  41. <th class="sorting" data-sort="sign"> 梦想标签 </th>
  42. <th class="sorting" data-sort="parameter"> 排行参数 </th>
  43. <th class="sorting" data-sort="code"> 二维码 </th>
  44. <th class="sorting" data-sort="status"> 梦想状态 </th>
  45. <th class="sorting" data-sort="created_at"> 梦想发布时间 </th>
  46. <th class="sorting" data-sort="end_time"> 梦想结束时间 </th>
  47. <th width="22%">相关操作</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. @if(isset($list))
  52. @foreach($list as $key => $item) <tr>
  53. <td>{{ $item->id }}</td>
  54. <td>{{ $item->user_id }}</td>
  55. <td>{{ $item->name }}</td>
  56. <td>{{ $item->coin }}</td>
  57. <td>{{ $item->get_coin }}</td>
  58. <td>{{ $item->mark }}</td>
  59. <td>{{ $item->sign }}</td>
  60. <td>
  61. @if(!empty($ab_value))
  62. A:{{ $ab_value->key }} <br>
  63. B:{{ $ab_value->value }}<br>
  64. @endif
  65. C:{{ $item->parameter }}
  66. </td>
  67. <td>
  68. <a onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('/Dream/Info/show_code',['code'=> $item->code])}}'});" class="btn btn-primary ">查看</a>
  69. </td>
  70. <td>{{ dict()->get('dream_info','status',$item->status) }}</td>
  71. <td>{{$item->created_at }}</td>
  72. <td>{{$item->end_time}}</td>
  73. <td>
  74. <div class="btn-group">
  75. <button data-toggle="dropdown"
  76. class="btn btn-warning btn-sm dropdown-toggle"
  77. aria-expanded="false">
  78. 操作 <span class="caret"></span>
  79. </button>
  80. <ul class="dropdown-menu">
  81. @if(role('Dream/Info/update'))
  82. <li><a href="{{ U('Dream/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
  83. @endif
  84. @if(role('Dream/Info/destroy'))
  85. <li class="divider"></li>
  86. <li><a href="{{ U('Dream/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
  87. @endif
  88. </ul>
  89. </div>
  90. @if(role('Dream/Info/view'))
  91. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Dream/Info/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看更多</button>
  92. @endif
  93. <a href = "{{ U('Interaction/Info/view',['id'=>$item->id])}} " class="btn btn-primary ">查看动态</a>
  94. </td>
  95. </tr>
  96. @endforeach
  97. @endif
  98. </tbody>
  99. </table>
  100. <div class="row">
  101. <div class="col-sm-6">
  102. <div class="dataTables_info" id="DataTables_Table_0_info"
  103. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
  104. </div>
  105. <div class="col-sm-6">
  106. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  107. {!! $list->setPath('')->appends(Request::all())->render() !!}
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. @endsection