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

85 lines
4.0 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') }}" placeholder=""/>
</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.coupon.create') }}" 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 width="200">券码名称</th>
<th width="100">线上</th>
<th width="100">有效起始</th>
<th width="100">有效结束</th>
<th width="60">状态</th>
<th width="60">用途</th>
<th width="140" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>创建时间</th>
<th width="120"></th>
</tr>
</thead>
<tbody>
@foreach ($coupons as $coupon)
<tr>
<td>{{ $coupon->id }}</td>
<td>{{ $coupon->title }}</td>
<td>
@if($coupon->online == 1)
@else
@endif
</td>
<td>{{ $coupon->start_at }}</td>
<td>{{ $coupon->end_at }}</td>
<td>{!! $coupon->status_text !!}</td>
<td>{!! $coupon->type_text !!}</td>
<td>{{ $coupon->created_at }}</td>
<td>
<a title="编辑券码" target="navTab" href="{{ route('Admin.coupon.edit', $coupon) }}" rel="navTab_{{ time() }}">编辑</a>
@if($coupon->canCancel())
<a title="请确认要下架券码吗?" target="ajaxDelete" href="{{ route('Admin.coupon.destroy', $coupon) }}">下架</a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $coupons->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $coupons->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 ($coupons->perPage() == 30) selected @endif value="30">30</option>
<option @if ($coupons->perPage() == 100) selected @endif value="100">100</option>
<option @if ($coupons->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $coupons->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $coupons->total() }}" numPerPage="{{ $coupons->perPage() }}" pageNumShown="10" currentPage="{{ $coupons->currentPage() }}"></div>
</div>
</div>