| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- @extends('base.base')
- @section('base')
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-email"></i>
- </span>
- Route Mail Config
- </h3>
- </div>
- <div class="row">
- <div class="col-lg-12 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <div style="margin-bottom: 15px;">
- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
- <i class="mdi mdi-plus btn-icon-prepend"></i>
- Add Mail
- </button>
- </div>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>ID</th>
- <th>Mark</th>
- <th>Title</th>
- <th>Content</th>
- <th>Status</th>
- <th>Updated At</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list as $item)
- <tr>
- <td>{{ $item->ID }}</td>
- <td>{{ $item->MailMark }}</td>
- <td>{{ $item->TitleString }}</td>
- <td style="max-width: 360px; white-space: normal;">{{ $item->TextString }}</td>
- <td>{{ $item->Status ? 'Enabled' : 'Disabled' }}</td>
- <td>{{ $item->UpdatedAt }}</td>
- <td>
- <button type="button" class="btn btn-sm btn-gradient-dark" onclick="update({{ $item->ID }})">Edit</button>
- <button type="button" class="btn btn-sm btn-gradient-warning" onclick="switchStatus({{ $item->ID }})">
- {{ $item->Status ? 'Disable' : 'Enable' }}
- </button>
- <button type="button" class="btn btn-sm btn-gradient-danger" onclick="del({{ $item->ID }})">Delete</button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div class="box-footer clearfix">
- Total <b>{{ $list->total() }}</b> rows, <b>{{ $list->lastPage() }}</b> pages
- {!! $list->links() !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- function add() {
- layer.open({
- type: 2,
- title: 'Add Route Mail',
- shadeClose: true,
- shade: 0.8,
- area: ['60%', '75%'],
- content: '/admin/notice/route_mail/add'
- });
- }
- function update(id) {
- layer.open({
- type: 2,
- title: 'Edit Route Mail',
- shadeClose: true,
- shade: 0.8,
- area: ['60%', '75%'],
- content: '/admin/notice/route_mail/update/' + id
- });
- }
- function switchStatus(id) {
- myConfirm('Confirm status change?', function () {
- myRequest('/admin/notice/route_mail/switch/' + id, 'post', {}, function (res) {
- layer.msg(res.msg);
- setTimeout(function () {
- window.location.reload();
- }, 1000);
- });
- });
- }
- function del(id) {
- myConfirm('Delete config and related send logs?', function () {
- myRequest('/admin/notice/route_mail/delete/' + id, 'post', {}, function (res) {
- layer.msg(res.msg);
- setTimeout(function () {
- window.location.reload();
- }, 1000);
- });
- });
- }
- </script>
- @endsection
|