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

77 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="start" value="{{ Request::get('start') }}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" defaulttime="23:59:59" readonly="true">
</td>
<td>
止:
<input type="text" name="end" value="{{ Request::get('end') }}" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss" defaulttime="23:59:59" readonly="true">
</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 title="确实要删除这些记录吗?" target="selectedDelete" rel="ids[]" href="{{ route('Admin.notifications.destroy', 'batch') }}" class="delete"><span>批量删除</span></a></li>
</ul>
</div>
<table class="table" width="100%" layoutH="112">
<thead>
<tr>
<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
<th width="100">通知用户</th>
<th width="200">通知类型</th>
<th>交付数据</th>
<th width="120" orderField="read_at" @if (Request::input('orderField') == 'read_at') class="{{ Request::input('orderDirection') }}" @endif>阅读时间</th>
<th width="120" orderField="created_at" @if (Request::input('orderField') == 'created_at') class="{{ Request::input('orderDirection') }}" @endif>发送时间</th>
<th width="60"></th>
</tr>
</thead>
<tbody>
@foreach ($notifications as $notification)
<tr>
<td><input name="ids[]" value="{{ $notification->id }}" type="checkbox"></td>
<td>{{ $notification->notifiable->info->nickname }}</td>
<td>{{ $notification->type::title() }}</td>
<td>@json($notification->data)</td>
<td>{{ $notification->read_at }}</td>
<td>{{ $notification->created_at }}</td>
<td>
<a title="删除消息" target="ajaxDelete" href="{{ route('Admin.notifications.destroy', $notification) }}" class="btnDel">删除</a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="panelBar">
<form id="pagerForm" method="post" action="#rel#">
<input type="hidden" name="page" value="{{ $notifications->currentPage() }}" />
<input type="hidden" name="numPerPage" value="{{ $notifications->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 ($notifications->perPage() == 30) selected @endif value="30">30</option>
<option @if ($notifications->perPage() == 100) selected @endif value="100">100</option>
<option @if ($notifications->perPage() == 200) selected @endif value="200">200</option>
</select>
<span>条,共 {{ $notifications->total() }} </span>
</div>
<div class="pagination" targetType="navTab" totalCount="{{ $notifications->total() }}" numPerPage="{{ $notifications->perPage() }}" pageNumShown="10" currentPage="{{ $notifications->currentPage() }}"></div>
</div>
</div>