2020-06-26 23:32:33 +00:00
@ extends ( 'adminlte::page' )
2020-09-01 16:46:27 +00:00
@ section ( 'title' , config ( 'app.name' ) . ' | ' . __ ( 'messages.profile.title' , [ 'name' => $profile -> user -> name ]))
2020-06-26 23:32:33 +00:00
@ section ( 'content_header' )
2020-09-01 16:46:27 +00:00
< h4 > {{ __ ( 'messages.profile.users' )}} / {{ __ ( 'messages.profile.profile' )}} / {{ $profile -> user -> name }} </ h4 >
2020-06-26 23:32:33 +00:00
@ stop
@ section ( 'js' )
< script src = " /js/app.js " ></ script >
< x - global - errors ></ x - global - errors >
@ stop
@ section ( 'content' )
2021-07-20 21:35:49 +00:00
@ if ( is_array ( $suspensionInfo ))
2020-06-26 23:32:33 +00:00
< div class = " alert alert-danger " >
2021-07-20 21:35:49 +00:00
< span >< i class = " fa fa-ban " ></ i > < b > {{ __ ( 'messages.profile.account_banned' )}} {{ ( $suspensionInfo [ 'isPermanent' ]) ? __ ( 'permanently.' ) : __ ( 'until :date.' , [ 'date' => $suspensionInfo [ 'bannedUntil' ]]) }} </ b ></ span >
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< p > {{ __ ( 'messages.profile.account_banned_exp' )}} </ p >
2020-06-26 23:32:33 +00:00
< p >
2021-07-20 21:35:49 +00:00
< i class = " fas fa-chevron-right " ></ i > < b > {{ $suspensionInfo [ 'reason' ]}} </ b >
2020-06-26 23:32:33 +00:00
</ p >
</ div >
@ endif
@ if ( Auth :: user () -> hasRole ( 'admin' ))
2020-09-03 01:08:14 +00:00
< x - modal id = " banAccountModal " modal - label = " banAccount " modal - title = " { { __('messages.reusable.confirm')}} " include - close - button = " true " >
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< p > {{ __ ( 'messages.profile.ban_confirm' )}} </ p >
2020-06-26 23:32:33 +00:00
< form id = " banAccountForm " name = " banAccount " method = " POST " action = " { { route('banUser', ['user' => $profile->user ->id])}} " >
@ csrf
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fas fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2021-07-20 21:35:49 +00:00
< div class = " row " >
< div class = " col " >
< label for = " reason " > {{ __ ( 'Public note' )}} </ label >
< input type = " text " name = " reason " id = " reason " class = " form-control " placeholder = " { { __('messages.profile.p_duration_exp')}} " >
</ div >
< div class = " col " >
< label for = " duration " > {{ __ ( 'Duration' ) }} </ label >
< input type = " text " name = " duration " id = " duration " class = " form-control " placeholder = " { { __('in days') }} " >
2020-06-26 23:32:33 +00:00
</ div >
</ div >
2021-07-20 21:35:49 +00:00
< div class = " mt-2 " >
< input type = " hidden " name = " suspensionType " value = " off " >
< label for = " suspensionType " > Suspension type </ label >< br >
< input type = " checkbox " id = " suspensionType " name = " suspensionType " checked data - toggle = " toggle " data - on = " Temporary " data - off = " Permanent " data - onstyle = " success " data - offstyle = " danger " data - width = " 130 " data - height = " 40 " >
< p class = " text-muted text-sm " >< i class = " fas fa-info-circle " ></ i > {{ __ ( 'Temporary suspensions will be automatically lifted. The suspension note is visible to all users. Suspended users will not be able to login or register.' ) }} </ p >
2020-06-26 23:32:33 +00:00
</ div >
</ form >
< x - slot name = " modalFooter " >
2021-09-03 23:44:54 +00:00
< button id = " banAccountButton " type = " button " class = " btn btn-danger " {{ ( $demoActive ) ? 'disabled' : '' }} >< i class = " fa fa-gavel " ></ i > {{ __ ( 'Confirm' )}} </ button >
2020-06-26 23:32:33 +00:00
</ x - slot >
</ x - modal >
@ if ( ! Auth :: user () -> is ( $profile -> user ) && $profile -> user -> isStaffMember ())
2020-09-03 01:08:14 +00:00
< x - modal id = " terminateUser " modal - label = " terminateUser " modal - title = " { { __('messages.reusable.confirm')}} " include - close - button = " true " >
2020-06-26 23:32:33 +00:00
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fas fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-09-01 16:46:27 +00:00
< p >< i class = " fa fa-exclamation-triangle " ></ i > < b > {{ __ ( 'messages.profile.terminate_notice' )}} </ b ></ p >
2020-06-26 23:32:33 +00:00
< p >
2020-09-01 16:46:27 +00:00
{{ __ ( 'messages.profile.terminate_notice_warning' )}}
2020-06-26 23:32:33 +00:00
</ p >
< p >
2020-09-01 16:46:27 +00:00
< b > {{ __ ( 'messages.profile.terminate_notice_consequence' )}} </ b >
2020-06-26 23:32:33 +00:00
</ p >
< x - slot name = " modalFooter " >
< form method = " POST " action = " { { route('terminateStaffMember', ['user' => $profile->user ->id])}} " id = " terminateUserForm " >
@ csrf
@ method ( 'PATCH' )
2021-09-03 23:44:54 +00:00
< button type = " submit " class = " btn btn-warning " {{ ( $demoActive ) ? 'disabled' : '' }} >< i class = " fas fa-exclamation-circle " ></ i > {{ __ ( 'messages.reusable.confirm' )}} </ button >
2020-06-26 23:32:33 +00:00
</ form >
</ x - slot >
</ x - modal >
@ endif
2020-09-03 01:08:14 +00:00
< x - modal id = " deleteAccount " modal - label = " deleteAccount " modal - title = " { { __('messages.reusable.confirm')}} " include - close - button = " true " >
2020-06-26 23:32:33 +00:00
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fas fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-09-01 16:46:27 +00:00
< p >< i class = " fa fa-exclamation-triangle " ></ i >< b > {{ __ ( 'messages.profile.delete_acc_warn' )}} </ b ></ p >
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< p > {{ __ ( 'messages.profile.delete_acc_consequence' )}} </ p >
2020-06-26 23:32:33 +00:00
< form id = " deleteAccountForm " method = " POST " action = {{ route ( 'deleteUser' , [ 'user' => $profile -> user -> id ])}} >
@ csrf
@ method ( 'DELETE' )
2020-09-01 16:46:27 +00:00
< label for = " promptConfirm " > {{ __ ( 'messages.profile.type_to_confirm' )}} " DELETE ACCOUNT " </ label >
< input type = " text " name = " confirmPrompt " class = " form-control " placeholder = " { { __('messages.profile.type_placeholder')}} " >
2020-06-26 23:32:33 +00:00
</ form >
< x - slot name = " modalFooter " >
2021-09-03 23:44:54 +00:00
< button type = " button " class = " btn btn-danger " {{ ( $demoActive ) ? 'disabled' : '' }} onclick = " document.getElementById('deleteAccountForm').submit() " >< i class = " fa fa-trash " ></ i > {{ strtoupper ( __ ( 'messages.reusable.confirm' ))}} </ button >
2020-06-26 23:32:33 +00:00
</ x - slot >
</ x - modal >
2021-09-03 23:44:54 +00:00
< x - modal id = " ipInfo " modal - label = " ipInfo " modal - title = " { { __('IP Address Information')}} " include - close - button = " true " >
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< h4 class = " text-center " > {{ __ ( 'messages.profile.search_result' )}} </ h3 >
2020-06-26 23:32:33 +00:00
@ if ( ! isset ( $ipInfo -> message ))
< table class = " table table-borderless " >
< tbody >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.origin_cc' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> country_name ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.state_prov' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> state_prov ? ? 'None' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.district' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> district ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.city' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> city ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.zipcode' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> zipcode ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.coords' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> latitude ? ? 0 }}, {{ $ipInfo -> longitude ? ? 0 }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.european' )}} </ th >
< td > {{( $ipInfo -> is_eu ) ? __ ( 'messages.reusable.yes' ) : __ ( 'messages.reusable.no' )}} </ td >
2020-06-26 23:32:33 +00:00
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.isp' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> isp ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.org' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> organization ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.ctype' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> connection_type ? ? 'N/A' }} </ td >
</ tr >
< tr >
2020-09-01 16:46:27 +00:00
< th > {{ __ ( 'messages.profile.timezone' )}} </ th >
2020-06-26 23:32:33 +00:00
< td > {{ $ipInfo -> time_zone -> name ? ? 'N/A' }} </ td >
</ tr >
</ tbody >
</ table >
@ else
< div class = " alert alert-danger " >
2020-09-01 16:46:27 +00:00
< i class = " fas fa-exclamation-circle " ></ i > < b > {{ __ ( 'messages.profile.noresults' )}} </ b >
2020-06-26 23:32:33 +00:00
< p >
{{ $ipInfo -> message }}
</ p >
</ div >
@ endif
< x - slot name = " modalFooter " ></ x - slot >
</ x - modal >
2020-09-01 16:46:27 +00:00
< x - modal id = " editUser " modal - label = " editUser " modal - title = " { { __('messages.profile.edituser')}} " include - close - button = " true " >
2020-06-26 23:32:33 +00:00
2021-09-03 23:44:54 +00:00
@ if ( $demoActive )
< div class = " alert alert-danger " >
< p class = " font-weight-bold " >< i class = " fas fa-exclamation-triangle " ></ i > This feature is disabled </ p >
</ div >
@ endif
2020-06-26 23:32:33 +00:00
< form id = " updateUserForm " method = " post " action = " { { route('updateUser', ['user' => $profile->user ->id]) }} " >
@ csrf
@ method ( 'PATCH' )
2020-09-01 16:46:27 +00:00
< label for = " email " > {{ __ ( 'messages.contactlabel_email' )}} </ label >
2021-09-03 23:44:54 +00:00
< input {{ ( $demoActive ) ? 'disabled' : '' }} id = " email " type = " text " name = " email " class = " form-control " required value = " { { $profile->user ->email }} " />
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< label for = " name " > {{ __ ( 'messages.contactlabel_name' )}} </ label >
2021-09-03 23:44:54 +00:00
< input {{ ( $demoActive ) ? 'disabled' : '' }} id = " name " type = " text " name = " name " class = " form-control " required value = " { { $profile->user ->name }} " />
2020-06-26 23:32:33 +00:00
< label for = " uuid " > Mojang UUID </ label >
2021-09-03 23:44:54 +00:00
< input {{ ( $demoActive ) ? 'disabled' : '' }} id = " uuid " type = " text " name = " uuid " class = " form-control " required value = " { { $profile->user ->uuid }} " />
2020-06-26 23:32:33 +00:00
< p class = " text-muted text-sm " >
2020-09-01 16:46:27 +00:00
< i class = " fas fa-exclamation-triangle " ></ i > {{ __ ( 'messages.profile.edituser_consequence' )}}
2020-06-26 23:32:33 +00:00
</ p >
< div class = " form-group mt-3 " >
2020-09-01 16:46:27 +00:00
< label > {{ __ ( 'messages.reusable.roles' )}} </ label >
2020-06-26 23:32:33 +00:00
< table class = " table table-borderless " >
< tbody >
@ foreach ( $roles as $roleName => $status )
< tr >
2021-09-03 23:44:54 +00:00
< th >< input {{ ( $demoActive ) ? 'disabled' : '' }} type = " checkbox " name = " roles[] " value = " { { $roleName }} " {{ ( $status ) ? 'checked' : '' }} ></ th >
2020-06-26 23:32:33 +00:00
< td class = " col-md-2 " > {{ ucfirst ( $roleName ) }} </ td >
</ tr >
@ endforeach
</ tbody >
</ table >
</ div >
</ form >
< x - slot name = " modalFooter " >
2021-09-03 23:44:54 +00:00
< button type = " button " {{ ( $demoActive ) ? 'disabled' : '' }} class = " btn btn-warning " onclick = " $ ('#updateUserForm').submit() " >< i class = " fa fa-exclamation-cicle " ></ i > {{ __ ( 'messages.vacancy.save' )}} </ button >
2020-06-26 23:32:33 +00:00
</ x - slot >
</ x - modal >
@ endif
< div class = " row mb-3 " >
< div class = " col " >
< div class = " text-center " >
@ if ( $profile -> avatarPreference == 'gravatar' )
< img class = " profile-user-img img-fluid img-circle " src = " https://gravatar.com/avatar/ { { md5( $profile->user ->email)}} " alt = " User profile picture " >
@ else
< img class = " profile-user-img img-fluid img-circle " src = " https://crafatar.com/avatars/ { { $profile -> user -> uuid } } " alt = " User profile picture " >
@ endif
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col-md-4 offset-md-4 " >
< div class = " card " >
< div class = " card-body text-center " >
@ if ( $profile -> user -> isBanned ())
< del >< h3 > {{ $profile -> user -> name }} </ h3 ></ del >
@ else
< h3 > {{ $profile -> user -> name }} </ h3 >
@ endif
< p class = " text-muted " > {{ $profile -> profileShortBio }} </ p >
2020-09-01 16:46:27 +00:00
< p class = " text-muted " > {{ __ ( 'messages.reusable.member_since' , [ 'date' => $since ])}} </ p >
2020-06-26 23:32:33 +00:00
@ if ( Auth :: user () -> hasRole ( 'admin' ))
2021-09-03 23:44:54 +00:00
< button type = " button " class = " btn btn-sm btn-info " onclick = " $ ('#ipInfo').modal('show') " > {{ __ ( 'messages.reusable.lookup' , [ 'ipAddress' => ( ! $demoActive ) ? $profile -> user -> originalIP : '0.0.0.0' ])}} </ button >
2020-06-26 23:32:33 +00:00
@ endif
@ if ( $profile -> user -> is ( Auth :: user ()))
< button type = " button " class = " btn btn-sm btn-warning " onclick = " window.location.href=' { { route('showProfileSettings')}}' " >< i class = " fas fa-pencil-alt " ></ i ></ button >
@ elseif ( Auth :: user () -> hasRole ( 'admin' ) && $profile -> user -> isStaffMember ())
2020-09-01 16:46:27 +00:00
< button type = " button " class = " btn btn-sm btn-danger " onclick = " $ ('#terminateUser').modal('show') " > {{ __ ( 'messages.profile.terminate_txt' )}} </ button >
2020-06-26 23:32:33 +00:00
@ endif
</ div >
< div class = " card-footer text-center " >
@ foreach ( $profile -> user -> roles as $role )
< span class = " badge badge-success mr-2 " > {{ ucfirst ( $role -> name )}} </ span >
@ endforeach
</ div >
</ div >
</ div >
@ if ( Auth :: user () -> hasRole ( 'admin' ))
< div class = " col " >
< div class = " card " >
< h5 class = " card-header " >
< a class = " collapsed d-block " data - toggle = " collapse " href = " #collapse-collapsed " aria - expanded = " true " aria - controls = " collapse-collapsed " id = " heading-collapsed " >
< i class = " fa fa-chevron-down pull-right " ></ i >
2020-09-01 16:46:27 +00:00
{{ __ ( 'messages.profile.acc_management' )}}
2020-06-26 23:32:33 +00:00
</ a >
</ h5 >
< div id = " collapse-collapsed " class = " collapse " aria - labelledby = " heading-collapsed " >
< div class = " card-body " >
< div class = " management-btn text-center " >
@ if ( ! $profile -> user -> isBanned ())
2021-07-20 21:35:49 +00:00
< button class = " btn btn-danger mb-2 " id = " banAccountTrigger " >< i class = " fa fa-ban " ></ i > {{ __ ( 'Suspend' )}} </ button >< br >
2020-06-26 23:32:33 +00:00
@ else
< form method = " post " action = " { { route('unbanUser', ['user' => $profile->user ->id])}} " >
@ method ( 'DELETE' )
@ csrf
2021-07-20 21:35:49 +00:00
< button type = " submit " class = " btn btn-warning mb-2 " >< i class = " fa fa-check " ></ i > {{ __ ( 'Lift Suspension' )}} </ button >
2020-06-26 23:32:33 +00:00
</ form >
@ endif
2020-09-01 16:46:27 +00:00
< button class = " btn btn-danger mb-2 " onclick = " $ ('#deleteAccount').modal('show') " >< i class = " fas fa-trash-alt " ></ i > {{ __ ( 'messages.profile.delete_acc' )}} </ button >< br >
2020-06-26 23:32:33 +00:00
2020-09-01 16:46:27 +00:00
< button class = " btn btn-warning mb-2 " onclick = " $ ('#editUser').modal('show') " >< i class = " fas fa-pencil-alt " ></ i > {{ __ ( 'messages.profile.edit_acc' )}} </ button >< br >
2020-06-26 23:32:33 +00:00
</ div >
</ div >
</ div >
</ div >
</ div ><!-- . col -->
@ endif
</ div >
< div class = " row buttonBar " >
< div class = " col-md-4 offset-md-4 " >
< div class = " card " style = " border-radius: 50px " >
< div class = " card-body text-center " >
< a href = " https://github.com/ { { $github } } " class = " pr-2 pl-2 " >< i class = " fab fa-github fa-2x " ></ i ></ a >
2020-09-01 16:46:27 +00:00
< a href = " # " onclick = " toastr.info(' { { __('messages.profile.discord_tag', ['discordTag' => $discord ])}}') " class = " pr-2 pl-2 " >< i class = " fab fa-discord fa-2x " ></ i ></ a >
2020-06-26 23:32:33 +00:00
< a href = " https://twitter.com/ { { $twitter } } " class = " pr-2 pl-2 " >< i class = " fab fa-twitter fa-2x " ></ i ></ a >
< a href = " https://instagram.com/ { { $insta } } " class = " pr-2 pl-2 " >< i class = " fab fa-instagram fa-2x " ></ i ></ a >
</ div >
</ div >
</ div >
</ div >
< div class = " row " >
< div class = " col " >
< div class = " card " >
< div class = " card-header " >
2020-09-01 16:46:27 +00:00
< h4 > {{ __ ( 'messages.reusable.abt' )}} </ h4 >
2020-06-26 23:32:33 +00:00
</ div >
< div class = " card-body " >
{{ $profile -> profileAboutMe }}
</ div >
</ div >
</ div >
</ div >
2020-07-16 05:46:20 +00:00
@ stop
2020-06-26 23:32:33 +00:00
2020-07-16 05:46:20 +00:00
@ section ( 'footer' )
@ include ( 'breadcrumbs.dashboard.footer' )
2020-06-26 23:32:33 +00:00
@ stop