123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- @extends('admin.layout')
- @section('content')
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-title">
- <h5>新闻列表</h5>
- <div class="ibox-tools">
- <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
- </a>
- </div>
- </div>
- <div class="ibox-content">
- <div class="row">
- <form method="GET" action="" accept-charset="UTF-8">
- <div class="col-sm-4">
- <div class="input-group">
- <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入ID/标题/内容"
- name="keyword" class="input-sm form-control">
- <span class="input-group-btn">
- <button type="submit" class="btn btn-sm btn-primary">搜索</button>
- </span>
- </div>
- </div>
- </form>
- @if(role('Album/News/create'))
- <div class="col-sm-3 pull-right">
- <a href="{{ U('Album/News/create')}}"
- class="btn btn-sm btn-primary pull-right">添加</a>
- </div>
- @endif
- </div>
- <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
- <thead>
- <tr>
- <th class="sorting" data-sort="id">ID</th>
- <th class="sorting" data-sort="title"> 标题</th>
- <th class="sorting" data-sort="sort"> 排序</th>
- <th class="sorting" data-sort="created_at">创建时间</th>
- <th class="sorting" data-sort="updated_at">更新时间</th>
- <th width="22%">相关操作</th>
- </tr>
- </thead>
- <tbody>
- @if(isset($list))
- @foreach($list as $key => $item)
- <tr>
- <td>{{ $item->id }}</td>
- <td>{{ $item->title }}</td>
- <td>{{ $item->sort }}</td>
- <td>{{ $item->created_at }}</td>
- <td>{{ $item->updated_at }}</td>
- <td>
- <div class="pull-left">
- @if(role('Album/News/update'))
- <a href="{{ U('Album/News/update',['id'=>$item->id])}}" class="btn btn-sm btn-warning pull-right">修改</a>
- @endif
- @if(role('Album/News/destroy'))
- <a href="{{ U('Album/News/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
- @endif
- @if(role('Album/News/view'))
- <a onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Album/News/view',['id'=>$item->id])}}'});"
- class="btn btn-sm btn-primary pull-right">查看
- </a>
- @endif
- </div>
- </td>
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- <div class="row">
- <div class="col-sm-6">
- <div class="dataTables_info" id="DataTables_Table_0_info"
- role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
- 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
- </div>
- </div>
- <div class="col-sm-6">
- <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
- {!! $list->setPath('')->appends(Request::all())->render() !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endsection
|