|
1 | 1 | @extends('layout') |
2 | 2 | @section('content') |
3 | 3 | <div class="table-responsive" data-role="panel" data-title-caption="{{ trans('cruds.log.title') }}" data-collapsible="false" data-title-icon="<span class='mif-log-file'></span>"> |
4 | | - <table class="table table-border cell-border"> |
5 | | - <tbody> |
6 | | - <tr> |
7 | | - <th style="width: 150px;"> |
8 | | - {{ trans('cruds.log.subject_id') }} |
9 | | - </th> |
10 | | - <td> |
11 | | - @if ($auditLogs->first()->subject_type=='App\\Models\\Measure') |
12 | | - <a href="/alice/show/{{ $auditLogs->first()->subject_id }} "> |
13 | | - {{ $auditLogs->first()->subject_id }} |
14 | | - </a> |
15 | | - @elseif ($auditLogs->first()->subject_type=='App\\Models\\Control') |
16 | | - <a href="/bob/show/{{ $auditLogs->first()->subject_id }} "> |
17 | | - {{ $auditLogs->first()->subject_id }} |
18 | | - </a> |
19 | | - @elseif ($auditLogs->first()->subject_type=='App\\Models\\Action') |
20 | | - <a href="/action/show/{{ $auditLogs->first()->subject_id }} "> |
21 | | - {{ $auditLogs->first()->subject_id }} |
22 | | - </a> |
23 | | - @elseif ($auditLogs->first()->subject_type=='App\\Models\\User') |
24 | | - <a href="/user/show/{{ $auditLogs->first()->subject_id }} "> |
25 | | - {{ $auditLogs->first()->subject_id }} |
26 | | - </a> |
27 | | - @else |
| 4 | + <table class="table table-border cell-border"> |
| 5 | + <tbody> |
| 6 | + <tr> |
| 7 | + <th style="width: 150px;"> |
| 8 | + {{ trans('cruds.log.subject_id') }} |
| 9 | + </th> |
| 10 | + <td> |
| 11 | + @if ($auditLogs->first()->subject_type=='App\\Models\\Measure') |
| 12 | + <a href="/alice/show/{{ $auditLogs->first()->subject_id }} "> |
| 13 | + {{ $auditLogs->first()->subject_id }} |
| 14 | + </a> |
| 15 | + @elseif ($auditLogs->first()->subject_type=='App\\Models\\Control') |
| 16 | + <a href="/bob/show/{{ $auditLogs->first()->subject_id }} "> |
| 17 | + {{ $auditLogs->first()->subject_id }} |
| 18 | + </a> |
| 19 | + @elseif ($auditLogs->first()->subject_type=='App\\Models\\Action') |
| 20 | + <a href="/action/show/{{ $auditLogs->first()->subject_id }} "> |
28 | 21 | {{ $auditLogs->first()->subject_id }} |
| 22 | + </a> |
| 23 | + @elseif ($auditLogs->first()->subject_type=='App\\Models\\User') |
| 24 | + <a href="/user/show/{{ $auditLogs->first()->subject_id }} "> |
| 25 | + {{ $auditLogs->first()->subject_id }} |
| 26 | + </a> |
| 27 | + @else |
| 28 | + {{ $auditLogs->first()->subject_id }} |
| 29 | + @endif |
| 30 | + </td> |
| 31 | + </tr> |
| 32 | + <tr> |
| 33 | + <th> |
| 34 | + id |
| 35 | + </th> |
| 36 | + @foreach($auditLogs as $auditLog) |
| 37 | + <td> |
| 38 | + <a href="/logs/show/{{ $auditLog->id }}"> |
| 39 | + {{ $auditLog->id }} |
| 40 | + </a> |
| 41 | + </td> |
| 42 | + @endforeach |
| 43 | + </tr> |
| 44 | + <tr> |
| 45 | + <th> |
| 46 | + {{ trans('cruds.log.action') }} |
| 47 | + </th> |
| 48 | + @foreach($auditLogs as $auditLog) |
| 49 | + <td> |
| 50 | + {{ $auditLog->description }} |
| 51 | + </td> |
| 52 | + @endforeach |
| 53 | + </tr> |
| 54 | + <tr> |
| 55 | + <th> |
| 56 | + {{ trans('cruds.log.user') }} |
| 57 | + </th> |
| 58 | + @foreach($auditLogs as $auditLog) |
| 59 | + <td> |
| 60 | + <a href="/user/{{ $auditLog->user_id }}"> |
| 61 | + {{ $auditLog->name }} |
| 62 | + </a> |
| 63 | + </td> |
| 64 | + @endforeach |
| 65 | + </tr> |
| 66 | + @foreach($auditLog->properties as $key => $value) |
| 67 | + <tr> |
| 68 | + <th>[{{ $key }}]</th> |
| 69 | + @php $previous = null; @endphp |
| 70 | + @foreach($auditLogs as $auditLog2) |
| 71 | + @php |
| 72 | + if (property_exists($auditLog2->properties,$key)) |
| 73 | + $value = $auditLog2->properties->{$key}; |
| 74 | + else |
| 75 | + $value = null; |
| 76 | + @endphp |
| 77 | + <td {!! (($loop->first)||($value==$previous)) ? "" : "class='info'" !!}> |
| 78 | + @if ((gettype($value)=="string")&&(strlen($value)>100)) |
| 79 | + {{ substr($value,0,100) }} |
| 80 | + @elseif ((gettype($value)=="array")) |
| 81 | + @foreach($value as $v) |
| 82 | + {{ $v->name }} |
| 83 | + @endforeach |
| 84 | + @else |
| 85 | + {{ $value }} |
29 | 86 | @endif |
30 | 87 | </td> |
31 | | - </tr> |
32 | | - <tr> |
33 | | - <th> |
34 | | - id |
35 | | - </th> |
36 | | - @foreach($auditLogs as $auditLog) |
37 | | - <td> |
38 | | - <a href="/logs/show/{{ $auditLog->id }}"> |
39 | | - {{ $auditLog->id }} |
40 | | - </a> |
41 | | - </td> |
| 88 | + @php $previous = $value; @endphp |
42 | 89 | @endforeach |
43 | | - </tr> |
44 | | - <tr> |
45 | | - <th> |
46 | | - {{ trans('cruds.log.action') }} |
47 | | - </th> |
48 | | - @foreach($auditLogs as $auditLog) |
49 | | - <td> |
50 | | - {{ $auditLog->description }} |
51 | | - </td> |
52 | | - @endforeach |
53 | | - </tr> |
54 | | - <tr> |
55 | | - <th> |
56 | | - {{ trans('cruds.log.user') }} |
57 | | - </th> |
58 | | - @foreach($auditLogs as $auditLog) |
59 | | - <td> |
60 | | - <a href="/user/{{ $auditLog->user_id }}"> |
61 | | - {{ $auditLog->name }} |
62 | | - </a> |
63 | | - </td> |
64 | | - @endforeach |
65 | | - </tr> |
66 | | - @foreach($auditLog->properties as $key => $value) |
67 | | - <tr> |
68 | | - <th>[{{ $key }}]</th> |
69 | | - @php $previous = null; @endphp |
70 | | - @foreach($auditLogs as $auditLog2) |
71 | | - @php |
72 | | - if (property_exists($auditLog2->properties,$key)) |
73 | | - $value = $auditLog2->properties->{$key}; |
74 | | - else |
75 | | - $value = null; |
76 | | - @endphp |
77 | | - <td {!! (($loop->first)||($value==$previous)) ? "" : "class='info'" !!}> |
78 | | - @if ((gettype($value)=="string")&&(strlen($value)>100)) |
79 | | - {{ substr($value,0,100) }} |
80 | | - @elseif ((gettype($value)=="array")) |
81 | | - @foreach($value as $v) |
82 | | - {{ $v->name }} |
83 | | - @endforeach |
84 | | - @else |
85 | | - {{ $value }} |
86 | | - @endif |
87 | | - </td> |
88 | | - @php $previous = $value; @endphp |
89 | | - @endforeach |
90 | | - </tr> |
| 90 | + </tr> |
| 91 | + @endforeach |
| 92 | + <tr> |
| 93 | + <th> |
| 94 | + {{ trans('cruds.log.host') }} |
| 95 | + </th> |
| 96 | + @foreach($auditLogs as $auditLog) |
| 97 | + <td> |
| 98 | + {{ $auditLog->host }} |
| 99 | + </td> |
91 | 100 | @endforeach |
92 | | - <tr> |
93 | | - <th> |
94 | | - {{ trans('cruds.log.host') }} |
95 | | - </th> |
96 | | - @foreach($auditLogs as $auditLog) |
97 | | - <td> |
98 | | - {{ $auditLog->host }} |
99 | | - </td> |
100 | | - @endforeach |
101 | | - </tr> |
102 | | - <tr> |
103 | | - <th> |
104 | | - {{ trans('cruds.log.timestamp') }} |
105 | | - </th> |
106 | | - @foreach($auditLogs as $auditLog) |
107 | | - <td> |
108 | | - {{ $auditLog->created_at }} |
109 | | - </td> |
110 | | - @endforeach |
111 | | - </tr> |
112 | | - </tbody> |
113 | | - </table> |
114 | | - </div> |
115 | | - <div> |
116 | | - <br> |
117 | | - <a class="button btn-default" href="/logs"> |
118 | | - {{ trans('common.cancel') }} |
119 | | - </a> |
120 | | - </div> |
| 101 | + </tr> |
| 102 | + <tr> |
| 103 | + <th> |
| 104 | + {{ trans('cruds.log.timestamp') }} |
| 105 | + </th> |
| 106 | + @foreach($auditLogs as $auditLog) |
| 107 | + <td> |
| 108 | + {{ $auditLog->created_at }} |
| 109 | + </td> |
| 110 | + @endforeach |
| 111 | + </tr> |
| 112 | + </tbody> |
| 113 | + </table> |
| 114 | +</div> |
| 115 | +<div> |
| 116 | + <br> |
| 117 | + <a class="button btn-default" href="/logs"> |
| 118 | + {{ trans('common.cancel') }} |
| 119 | + </a> |
| 120 | +</div> |
121 | 121 | @endsection |
122 | | -@section('style') |
123 | | - <style> |
124 | | - .table-responsive { |
125 | | - overflow-x: auto !important; |
126 | | - border: 1px solid red; /* Pour voir les limites du conteneur */ |
127 | | - } |
128 | | - .table { |
129 | | - min-width: max-content; |
130 | | - } |
131 | | - </style> |
| 122 | +@section('styles') |
| 123 | +<style> |
| 124 | + .table { |
| 125 | + min-width: max-content; |
| 126 | + } |
| 127 | +
|
| 128 | + .table-responsive .panel-content { |
| 129 | + overflow-x: auto !important; |
| 130 | + } |
| 131 | +
|
| 132 | +</style> |
132 | 133 | @endsection |
0 commit comments