|
| 1 | +@extends('layouts.admin') |
| 2 | +@section('content') |
| 3 | +<div class="form-group"> |
| 4 | + <a class="btn btn-default" href="{{ route('admin.audit-logs.index') }}"> |
| 5 | + {{ trans('global.back_to_list') }} |
| 6 | + </a> |
| 7 | +</div> |
| 8 | +<div class="card"> |
| 9 | + <div class="card-header"> |
| 10 | + {{ trans('global.show') }} {{ trans('cruds.auditLog.title') }} |
| 11 | + </div> |
| 12 | + |
| 13 | + <div class="card-body table-responsive"> |
| 14 | + <table class="table table-bordered table-striped" style="table-layout: fixed; width: {{ $auditLogs->count() * 300 + 150 }}px;"> |
| 15 | + <tbody> |
| 16 | + <tr> |
| 17 | + <th style="width: 150px;"> |
| 18 | + {{ trans('cruds.auditLog.fields.subject_id') }} |
| 19 | + </th> |
| 20 | + <td> |
| 21 | + <a href="{{ \App\AuditLog::subject_url($auditLogs->first()->subject_type) }}/{{ $auditLogs->first()->subject_id }}"> |
| 22 | + {{ $auditLogs->first()->subject_id }} |
| 23 | + </a> |
| 24 | + </td> |
| 25 | + </tr> |
| 26 | + <tr> |
| 27 | + <th> |
| 28 | + id |
| 29 | + </th> |
| 30 | + @foreach($auditLogs as $auditLog) |
| 31 | + <td> |
| 32 | + <a href="{{ route('admin.audit-logs.show', $auditLog->id) }}"> |
| 33 | + {{ $auditLog->id }} |
| 34 | + </a> |
| 35 | + </td> |
| 36 | + @endforeach |
| 37 | + </tr> |
| 38 | + <tr> |
| 39 | + <th> |
| 40 | + {{ trans('cruds.auditLog.fields.description') }} |
| 41 | + </th> |
| 42 | + @foreach($auditLogs as $auditLog) |
| 43 | + <td> |
| 44 | + {{ $auditLog->description }} |
| 45 | + </td> |
| 46 | + @endforeach |
| 47 | + </tr> |
| 48 | + <tr> |
| 49 | + <th> |
| 50 | + {{ trans('cruds.auditLog.fields.user_id') }} |
| 51 | + </th> |
| 52 | + @foreach($auditLogs as $auditLog) |
| 53 | + <td> |
| 54 | + <a href="{{ route('admin.users.show', $auditLog->user_id) }}"> |
| 55 | + {{ $auditLog->name }} |
| 56 | + </a> |
| 57 | + </td> |
| 58 | + @endforeach |
| 59 | + </tr> |
| 60 | + @foreach($auditLog->properties as $key => $value) |
| 61 | + <tr> |
| 62 | + <th>[{{ $key }}]</th> |
| 63 | + @php $previous = null; @endphp |
| 64 | + @foreach($auditLogs as $auditLog2) |
| 65 | + @php |
| 66 | + $value = $auditLog2->properties->{$key}; |
| 67 | + @endphp |
| 68 | + <td {!! (($loop->first)||($value==$previous)) ? "" : "class='bg-success'" !!}> |
| 69 | + @if ((gettype($value)=="string")&&(strlen($value)>100)) |
| 70 | + {{ substr($value,0,100) }} |
| 71 | + @else |
| 72 | + {{ $value }} |
| 73 | + @endif |
| 74 | + </td> |
| 75 | + @php $previous = $value; @endphp |
| 76 | + @endforeach |
| 77 | + </tr> |
| 78 | + @endforeach |
| 79 | + <tr> |
| 80 | + <th> |
| 81 | + {{ trans('cruds.auditLog.fields.host') }} |
| 82 | + </th> |
| 83 | + @foreach($auditLogs as $auditLog) |
| 84 | + <td> |
| 85 | + {{ $auditLog->host }} |
| 86 | + </td> |
| 87 | + @endforeach |
| 88 | + </tr> |
| 89 | + <tr> |
| 90 | + <th> |
| 91 | + {{ trans('global.created_at') }} |
| 92 | + </th> |
| 93 | + @foreach($auditLogs as $auditLog) |
| 94 | + <td> |
| 95 | + {{ $auditLog->created_at }} |
| 96 | + </td> |
| 97 | + @endforeach |
| 98 | + </tr> |
| 99 | + </tbody> |
| 100 | + </table> |
| 101 | + </div> |
| 102 | +</div> |
| 103 | +<div class="form-group"> |
| 104 | + <a class="btn btn-default" href="{{ route('admin.audit-logs.index') }}"> |
| 105 | + {{ trans('global.back_to_list') }} |
| 106 | + </a> |
| 107 | +</div> |
| 108 | +@endsection |
| 109 | +@section('styles') |
| 110 | + <style> |
| 111 | + /* Style to enable horizontal scroll */ |
| 112 | + .table-responsive { |
| 113 | + overflow-x: auto; |
| 114 | + } |
| 115 | + </style> |
| 116 | +@endsection |
0 commit comments