|
1 | 1 | @extends('local-mailer::_template')
|
2 | 2 |
|
3 | 3 | @section('content')
|
4 |
| - |
5 |
| - <table class="table mt-4"> |
6 |
| - <thead class="table-light"> |
7 |
| - <tr> |
8 |
| - <td>Logs</td> |
9 |
| - <td class="text-center">Count</td> |
10 |
| - <td></td> |
11 |
| - </tr> |
12 |
| - </thead> |
13 |
| - <tbody> |
14 |
| - @foreach ($files as $file) |
| 4 | + @if (count($files) > 0) |
| 5 | + <table class="table mt-4"> |
| 6 | + <thead class="table-light"> |
15 | 7 | <tr>
|
16 |
| - <td> |
17 |
| - <a href="{{ route('local-mailer::show-by-date',$file['date']) }}"> |
18 |
| - {{ $file['file'] }} |
19 |
| - </a> |
20 |
| - </td> |
21 |
| - <td class="text-center"> |
22 |
| - <a href="{{ route('local-mailer::show-by-date',$file['date']) }}"> |
23 |
| - {{ $file['count'] }} |
24 |
| - </a> |
25 |
| - </td> |
26 |
| - <td class="text-right"> |
27 |
| - <a class="btn-success mr-2" href="{{ route('local-mailer::download-log',$file['date']) }}" |
28 |
| - target="_blank"> |
29 |
| - <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" |
30 |
| - fill="none" stroke-linecap="round" stroke-linejoin="round" |
31 |
| - class="css-i6dzq1"> |
32 |
| - <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path> |
33 |
| - <polyline points="7 10 12 15 17 10"></polyline> |
34 |
| - <line x1="12" y1="15" x2="12" y2="3"></line> |
35 |
| - </svg> |
36 |
| - </a> |
37 |
| - <a class="btn-danger" href="{{ route('local-mailer::delete-log',$file['date']) }}"> |
38 |
| - <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" |
39 |
| - fill="none" stroke-linecap="round" stroke-linejoin="round"> |
40 |
| - <polyline points="3 6 5 6 21 6"></polyline> |
41 |
| - <path |
42 |
| - d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path> |
43 |
| - <line x1="10" y1="11" x2="10" y2="17"></line> |
44 |
| - <line x1="14" y1="11" x2="14" y2="17"></line> |
45 |
| - </svg> |
46 |
| - </a> |
47 |
| - </td> |
| 8 | + <td>Logs</td> |
| 9 | + <td class="text-center">Count</td> |
| 10 | + <td></td> |
48 | 11 | </tr>
|
49 |
| - @endforeach |
50 |
| - </tbody> |
51 |
| - </table> |
52 |
| - |
| 12 | + </thead> |
| 13 | + <tbody> |
| 14 | + @foreach ($files as $file) |
| 15 | + <tr> |
| 16 | + <td> |
| 17 | + <a href="{{ route('local-mailer::show-by-date',$file['date']) }}"> |
| 18 | + {{ $file['file'] }} |
| 19 | + </a> |
| 20 | + </td> |
| 21 | + <td class="text-center"> |
| 22 | + <a href="{{ route('local-mailer::show-by-date',$file['date']) }}"> |
| 23 | + {{ $file['count'] }} |
| 24 | + </a> |
| 25 | + </td> |
| 26 | + <td class="text-right"> |
| 27 | + <a class="btn-success mr-2" href="{{ route('local-mailer::download-log',$file['date']) }}" |
| 28 | + target="_blank"> |
| 29 | + <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" |
| 30 | + fill="none" stroke-linecap="round" stroke-linejoin="round" |
| 31 | + class="css-i6dzq1"> |
| 32 | + <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path> |
| 33 | + <polyline points="7 10 12 15 17 10"></polyline> |
| 34 | + <line x1="12" y1="15" x2="12" y2="3"></line> |
| 35 | + </svg> |
| 36 | + </a> |
| 37 | + <a class="btn-danger" href="{{ route('local-mailer::delete-log',$file['date']) }}"> |
| 38 | + <svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" |
| 39 | + fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 40 | + <polyline points="3 6 5 6 21 6"></polyline> |
| 41 | + <path |
| 42 | + d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path> |
| 43 | + <line x1="10" y1="11" x2="10" y2="17"></line> |
| 44 | + <line x1="14" y1="11" x2="14" y2="17"></line> |
| 45 | + </svg> |
| 46 | + </a> |
| 47 | + </td> |
| 48 | + </tr> |
| 49 | + @endforeach |
| 50 | + </tbody> |
| 51 | + </table> |
| 52 | + @else |
| 53 | + <div class="mailbox"> |
| 54 | + <div class="mailbox-head"> |
| 55 | + <h2 class="mailbox-head_title">Mail logs</h2> |
| 56 | + </div> |
| 57 | + <div class="box-center"> |
| 58 | + <h2>List empty</h2> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + @endif |
53 | 62 |
|
54 | 63 | @endsection
|
0 commit comments