0
0
Files
Babyclass/app/Admin/Views/articles/index.blade.php
2020-08-04 10:09:42 +08:00

67 lines
3.3 KiB
PHP

<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="{{ url()->current() }}" method="post">
<div class="searchBar">
<table class="searchContent">
<tr>
<td>
新闻标题:
<input type="text" name="title" value="{{ Request::input('title') }}"/>
</td>
<td><div class="buttonActive"><div class="buttonContent"><button type="submit">检索结果</button></div></div></td>
</tr>
</table>
</div>
</form>
</div>
<div class="pageContent">
<div class="panelBar">
<ul class="toolBar">
<li><a class="add" href="{{ route('Admin.articles.create',['type'=>$type]) }}" mask="true" target="navTab" rel="navTab_{{ time() }}" title="添加文章"><span>添加文章</span></a></li>
</ul>
</div>
<table class="table" width="100%" layoutH="112">
<thead>
<tr>
<th width="50" orderField="id" @if (Request::input('orderField') == 'id') class="{{ Request::input('orderDirection') }}" @endif>编号</th>
<th>文章标题</th>
<th width="140" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>创建时间</th>
<th width="80"></th>
</tr>
</thead>
<tbody>
@foreach ($articles as $article)
<tr>
<td>{{ $article->id }}</td>
<td>{{ $article->title }}</td>
<td>{{ $article->created_at }}</td>
<td>
<a title="编辑文章" target="navTab" href="{{ route('Admin.articles.edit', $article) }}" rel="navTab_{{ time() }}" class="btnEdit">编辑</a>
<a title="删除文章" target="ajaxDelete" href="{{ route('Admin.articles.destroy', $article) }}" class="btnDel">删除</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $articles->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $articles->perPage() }}" />
<input type="hidden" name="orderField" value="{{ Request::input('orderField') }}" />
<input type="hidden" name="orderDirection" value="{{ Request::input('orderDirection') }}" />
</form>
<div class="pages">
<span>显示</span>
<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
<option @if ($articles->perPage() == 30) selected @endif value="30">30</option>
<option @if ($articles->perPage() == 100) selected @endif value="100">100</option>
<option @if ($articles->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $articles->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $articles->total() }}" numPerPage="{{ $articles->perPage() }}" pageNumShown="10" currentPage="{{ $articles->currentPage() }}"></div>
</div>
</div>