index.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @extends('admin.layout')
  2. @section('content')
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-title">
  7. <h5>字典管理</h5>
  8. <div class="ibox-tools">
  9. <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
  10. </a>
  11. </div>
  12. </div>
  13. <div class="ibox-content">
  14. <div class="row">
  15. <form method="GET" action="" accept-charset="UTF-8">
  16. <div class="col-sm-4">
  17. <div class="input-group">
  18. <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词" name="keyword"class="input-sm form-control">
  19. <span class="input-group-btn">
  20. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  21. </span>
  22. </div>
  23. </div>
  24. </form>
  25. @if(role('Base/Dictionary/create'))
  26. <div class="col-sm-3 pull-right">
  27. <a href="{{ U('Base/Dictionary/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
  28. </div>
  29. @endif
  30. </div>
  31. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  32. <thead>
  33. <tr>
  34. <th class="sorting" data-sort="id"> ID </th>
  35. <th class="sorting" data-sort="dictionary_table_code"> 数据字典表 </th>
  36. <th class="sorting" data-sort="dictionary_code"> 数据字典代码 </th>
  37. <th class="sorting" data-sort="key"> 程序中使用,数据库使用value </th>
  38. <th class="sorting" data-sort="value"> 编码 </th>
  39. <th class="sorting" data-sort="name"> 名称 </th>
  40. <th class="sorting" data-sort="input_code"> 输入码,通常用于保留拼音 </th>
  41. <th width="22%">相关操作</th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. @if(isset($list))
  46. @foreach($list as $key => $item) <tr>
  47. <td>{{ $item->id }}</td>
  48. <td>{{ $item->dictionary_table_code }}</td>
  49. <td>{{ $item->dictionary_code }}</td>
  50. <td>{{ $item->key }}</td>
  51. <td>{{ $item->value }}</td>
  52. <td>{{ $item->name }}</td>
  53. <td>{{ $item->input_code }}</td>
  54. <td>
  55. <div class="btn-group">
  56. <button data-toggle="dropdown"
  57. class="btn btn-warning btn-sm dropdown-toggle"
  58. aria-expanded="false">
  59. 操作 <span class="caret"></span>
  60. </button>
  61. <ul class="dropdown-menu">
  62. @if(role('Base/Dictionary/update'))
  63. <li><a href="{{ U('Base/Dictionary/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
  64. @endif
  65. @if(role('Base/Dictionary/destroy'))
  66. <li class="divider"></li>
  67. <li><a href="{{ U('Base/Dictionary/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
  68. @endif
  69. </ul>
  70. </div>
  71. @if(role('Base/Dictionary/view'))
  72. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Base/Dictionary/view',['id'=>$item->id])}}'});" class="btn btn-primary ">查看</button>
  73. @endif
  74. </td>
  75. </tr>
  76. @endforeach
  77. @endif
  78. </tbody>
  79. </table>
  80. <div class="row">
  81. <div class="col-sm-6">
  82. <div class="dataTables_info" id="DataTables_Table_0_info"
  83. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
  84. </div>
  85. <div class="col-sm-6">
  86. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  87. {!! $list->setPath('')->appends(Request::all())->render() !!}
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. @endsection