83 lines
3.8 KiB
PHP
83 lines
3.8 KiB
PHP
@php use App\Http\Helpers\Helper; @endphp
|
|
@extends("admin.main")
|
|
@section("content")
|
|
@if(auth()->guard('admins')->user()->can('manager email template'))
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-header">
|
|
<a href="{{ route('template.create') }}" class="btn btn-outline-secondary">
|
|
<i class="fas fa-plus"></i> Add New Template
|
|
</a>
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-invoice table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 10px">
|
|
<label for=""></label><input type="checkbox" name="check" class="check-all" id="">
|
|
</th>
|
|
<th>Status</th>
|
|
<th>Template Name</th>
|
|
<th>Type Name</th>
|
|
<th style="width: 40px"></th>
|
|
<th style="width: 40px"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@if($template->count())
|
|
@foreach($template->all() as $item)
|
|
<tr>
|
|
<td class="text-center">
|
|
<input type="checkbox" name="id[]" id="" value="{{ $item->id }}">
|
|
</td>
|
|
<td class="text-center">
|
|
{!! Helper::Status($item->status) !!}
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $item->name }}
|
|
</td>
|
|
<td class="text-center">
|
|
@if($item->Type)
|
|
{{ $item->Type->name }}
|
|
@else
|
|
General Message
|
|
@endif
|
|
</td>
|
|
<td>
|
|
<a class="btn btn-warning btn-sm"
|
|
href="{{ route('template.edit',['id' => $item->id]) }}">
|
|
<i class="fas fa-user-edit"></i>
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
@if(auth()->guard('admins')->user()->can('delete email template'))
|
|
<form method="post" class="d-inline"
|
|
action="{{ route('product.destroy') }}">
|
|
@csrf
|
|
@method('delete')
|
|
<button type="submit" data-toggle="tooltip" data-placement="top" title=""
|
|
class="btn btn-sm btn-danger" data-original-title="Xoá">
|
|
<i class="fas fa-trash"></i>
|
|
|
|
</button>
|
|
</form>
|
|
@endif
|
|
</td>
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer">
|
|
{{ $template->withQueryString()->links() }}
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="alert alert-danger alert-dismissible">
|
|
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Email template
|
|
management department</h5>
|
|
</div>
|
|
@endif
|
|
@endsection
|