index.blade.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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>dfghfdhfgfghfg</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="请输入关键词" 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="dream"> 梦想名称 </th>
  37. <th class="sorting" data-sort="money"> 所需梦想币 </th>
  38. <th class="sorting" data-sort="time"> 梦想倒计时 </th>
  39. <th class="sorting" data-sort="get_money"> 获得梦想币 </th>
  40. <th class="sorting" data-sort="mark"> 梦想分 </th>
  41. <th class="sorting" data-sort="status"> 梦想状态 </th>
  42. <th width="22%">相关操作</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @if(isset($list))
  47. @foreach($list as $key => $item) <tr>
  48. <td>{{ $item->id }}</td>
  49. <td>{{ $item->dream }}</td>
  50. <td>{{ $item->money }}</td>
  51. <td>{{ $item->time }}</td>
  52. <td>{{ $item->get_money }}</td>
  53. <td>{{ $item->mark }}</td>
  54. <td>{{ $item->status }}</td>
  55. <td>
  56. <div class="btn-group">
  57. <button data-toggle="dropdown"
  58. class="btn btn-warning btn-sm dropdown-toggle"
  59. aria-expanded="false">
  60. 操作 <span class="caret"></span>
  61. </button>
  62. <ul class="dropdown-menu">
  63. @if(role('Dream/Info/update'))
  64. <li><a href="{{ U('Dream/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
  65. @endif
  66. @if(role('Dream/Info/destroy'))
  67. <li class="divider"></li>
  68. <li><a href="{{ U('Dream/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
  69. @endif
  70. </ul>
  71. </div>
  72. @if(role('Dream/Info/view'))
  73. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Dream/Info/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看</button>
  74. @endif
  75. </td>
  76. </tr>
  77. @endforeach
  78. @endif
  79. </tbody>
  80. </table>
  81. <div class="row">
  82. <div class="col-sm-6">
  83. <div class="dataTables_info" id="DataTables_Table_0_info"
  84. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
  85. </div>
  86. <div class="col-sm-6">
  87. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  88. {!! $list->setPath('')->appends(Request::all())->render() !!}
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. @endsection