2021-06-05 09:26:32 +00:00
@ extends ( 'layouts.main' )
@ section ( 'content' )
<!-- CONTENT HEADER -->
< section class = " content-header " >
< div class = " container-fluid " >
< div class = " row mb-2 " >
< div class = " col-sm-6 " >
2021-12-06 16:11:48 +00:00
< h1 > {{ __ ( 'Activity Logs' )}} </ h1 >
2021-06-05 09:26:32 +00:00
</ div >
< div class = " col-sm-6 " >
< ol class = " breadcrumb float-sm-right " >
2021-12-21 14:49:25 +00:00
< li class = " breadcrumb-item " >< a href = " { { route('home')}} " > {{ __ ( 'Dashboard' )}} </ a ></ li >
2021-12-06 16:11:48 +00:00
< li class = " breadcrumb-item " >< a class = " text-muted " href = " { { route('admin.activitylogs.index')}} " > {{ __ ( 'Activity Logs' )}} </ a >
2021-06-05 09:26:32 +00:00
</ li >
</ ol >
</ div >
</ div >
</ div >
</ section >
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
< section class = " content " >
< div class = " container-fluid " >
< div class = " row " >
< div class = " col-lg-4 " >
@ if ( $cronlogs )
< div class = " callout callout-success " >
< h4 > {{ $cronlogs }} </ h4 >
</ div >
@ else
< div class = " callout callout-danger " >
2021-12-06 16:11:48 +00:00
< h4 > {{ __ ( 'No recent activity from cronjobs' )}} </ h4 >
2023-01-14 21:51:19 +00:00
< p > {{ __ ( 'Are cronjobs running?' )}} < a class = " text-primary " target = " _blank " href = " https://controlpanel.gg/docs/Installation/getting-started#crontab-configuration " > {{ __ ( 'Check the docs for it here' )}} </ a ></ p >
2021-06-05 09:26:32 +00:00
</ div >
@ endif
</ div >
</ div >
< div class = " card " >
< div class = " card-header " >
2021-12-06 16:11:48 +00:00
< h5 class = " card-title " >< i class = " fas fa-history mr-2 " ></ i > {{ __ ( 'Activity Logs' )}} </ h5 >
2021-06-05 09:26:32 +00:00
</ div >
< div class = " card-body table-responsive " >
< div class = " row " >
< div class = " col-lg-3 offset-lg-9 col-xl-2 offset-xl-10 col-md-6 offset-md-6 " >
< form method = " get " action = " { { route('admin.activitylogs.index')}} " >
@ csrf
< div class = " input-group mb-3 " >
< input type = " text " class = " form-control form-control-sm " value = " " name = " search " placeholder = " Search " >
< div class = " input-group-append " >
< button class = " btn btn-light btn-sm " type = " submit " >< i class = " fa fa-search " ></ i ></ button >
</ div >
</ div >
</ form >
</ div >
</ div >
< table class = " table table-sm table-striped " >
< thead >
< tr >
2021-12-06 16:11:48 +00:00
< th > {{ __ ( 'Causer' ) }} </ th >
< th > {{ __ ( 'Description' ) }} </ th >
< th > {{ __ ( 'Created at' ) }} </ th >
2021-06-05 09:26:32 +00:00
</ tr >
</ thead >
< tbody >
@ foreach ( $logs as $log )
< tr >
2021-12-06 16:11:48 +00:00
< td > @ if ( $log -> causer ) < a href = '/admin/users/{{$log->causer_id}}' > {{ json_decode ( $log -> causer ) -> name }}
@ else
2021-09-27 13:32:27 +00:00
System
@ endif </ td >
2021-06-05 09:26:32 +00:00
< td >
< span >
2022-06-08 08:11:55 +00:00
@ if ( str_starts_with ( $log -> description , " created " ))
2021-06-05 09:26:32 +00:00
< small >< i class = " fas text-success fa-plus mr-2 " ></ i ></ small >
2022-06-08 08:11:55 +00:00
@ elseif ( str_starts_with ( $log -> description , " redeemed " ))
2021-07-10 07:41:24 +00:00
< small >< i class = " fas text-success fa-money-check-alt mr-2 " ></ i ></ small >
2022-06-08 08:11:55 +00:00
@ elseif ( str_starts_with ( $log -> description , " deleted " ))
2021-06-05 09:26:32 +00:00
< small >< i class = " fas text-danger fa-times mr-2 " ></ i ></ small >
2022-06-08 08:11:55 +00:00
@ elseif ( str_starts_with ( $log -> description , " gained " ))
< small >< i class = " fas text-success fa-money-bill mr-2 " ></ i ></ small >
@ elseif ( str_starts_with ( $log -> description , " updated " ))
2021-06-05 09:26:32 +00:00
< small >< i class = " fas text-info fa-pen mr-2 " ></ i ></ small >
2022-06-08 08:11:55 +00:00
@ endif
2021-06-05 09:26:32 +00:00
{{ explode ( " \\ " , $log -> subject_type )[ 2 ]}}
2022-06-08 08:11:55 +00:00
{{ $log -> description }}
2021-09-27 13:32:27 +00:00
@ php $first = true @ endphp
@ foreach ( json_decode ( $log -> properties , true ) as $properties )
@ if ( $first )
@ if ( isset ( $properties [ 'name' ]))
2022-06-08 08:11:55 +00:00
" { { $properties [ 'name' ] } } "
2021-09-27 13:32:27 +00:00
@ endif
@ if ( isset ( $properties [ 'email' ]))
< {{ $properties [ 'email' ]}} >
@ endif
@ php $first = false @ endphp
@ endif
@ endforeach
2021-06-05 09:26:32 +00:00
</ span >
</ td >
< td > {{ $log -> created_at -> diffForHumans ()}} </ td >
</ tr >
@ endforeach
</ tbody >
</ table >
< div class = " float-right " >
{ !! $logs -> links () !! }
</ div >
</ div >
</ div >
</ div >
<!-- END CUSTOM CONTENT -->
</ div >
</ section >
<!-- END CONTENT -->
@ endsection