Просмотр файла resources/views/users/user.blade.php

Размер файла: 8.76Kb
  1. @extends('layout')
  2.  
  3. @section('title', __('index.account') . ' ' . $user->getName())
  4.  
  5. @section('header')
  6. <h1>
  7. {{ $user->getName() }}
  8.  
  9. <small>
  10. @if ($user->login !== $user->getName())
  11. ({{ $user->login }})
  12. @endif
  13. #{{ $user->id }}
  14. </small>
  15. </h1>
  16. @stop
  17.  
  18. @section('breadcrumb')
  19. <nav>
  20. <ol class="breadcrumb">
  21. <li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
  22. <li class="breadcrumb-item active">{{ __('index.account') }} {{ $user->getName() }}</li>
  23. </ol>
  24. </nav>
  25. @stop
  26.  
  27. @section('content')
  28. @if ($user->level === 'pended')
  29. <div class="p-1 my-1 bg-danger text-white">
  30. <i class="fas fa-exclamation-triangle"></i>
  31. {{ __('users.user_not_active') }}
  32. </div>
  33. @endif
  34.  
  35. @if ($user->level === 'banned' && $user->timeban > SITETIME)
  36. <div class="alert alert-danger">
  37. <b>{{ __('users.user_banned') }}</b><br>
  38. {{ __('users.ending_ban') }}: {{ formatTime($user->timeban - SITETIME) }}<br>
  39.  
  40. @if ($user->lastBan->id)
  41. {{ __('users.reason_ban') }}: {{ bbCode($user->lastBan->reason) }}<br>
  42. @endif
  43. </div>
  44. @endif
  45.  
  46. @if (in_array($user->level, $adminGroups, true))
  47. <div class="alert alert-info">{{ __('users.position') }}: <b>{{ $user->getLevel() }}</b></div>
  48. @endif
  49.  
  50. <div class="container-fluid mb-3">
  51. <div class="row">
  52. <div class="col-md-6">
  53. {{ __('users.status') }}: <b><a href="/statusfaq">{{ $user->getStatus() }}</a></b><br>
  54.  
  55. {{ $user->getGender() }}
  56. {{ __('users.gender') }}:
  57. {{ $user->gender === 'male' ? __('main.male') : __('main.female') }}<br>
  58.  
  59. {{ __('users.login') }}: <b>{{ $user->login }}</b><br>
  60.  
  61. @if (! empty($user->name))
  62. {{ __('users.name') }}: <b>{{ $user->name }}<br></b>
  63. @endif
  64.  
  65. @if (! empty($user->country))
  66. {{ __('users.country') }}: <b>{{ $user->country }}<br></b>
  67. @endif
  68.  
  69. @if (! empty($user->city))
  70. {{ __('users.city') }}: {{ $user->city }}<br>
  71. @endif
  72.  
  73. @if (! empty($user->birthday))
  74. {{ __('users.birthday') }}: {{ $user->birthday }}<br>
  75. @endif
  76.  
  77. @if (! empty($user->phone))
  78. {{ __('users.phone') }}: {{ $user->phone }}<br>
  79. @endif
  80.  
  81. {{ __('users.visits') }}: {{ $user->visits }}<br>
  82. {{ __('users.forum_posts') }}: {{ $user->allforum }}<br>
  83. {{ __('users.guest_posts') }}: {{ $user->allguest }}<br>
  84. {{ __('main.comments') }}: {{ $user->allcomments }}<br>
  85. {{ __('users.assets') }}: {{ plural($user->point, setting('scorename')) }}<br>
  86. {{ __('users.moneys') }}: {{ plural($user->money, setting('moneyname')) }}<br>
  87.  
  88. @if ($user->themes)
  89. {{ __('users.theme') }}: {{ $user->themes }}<br>
  90. @endif
  91. {{ __('main.registration_date') }}: {{ dateFixed($user->created_at, 'd.m.Y') }}<br>
  92.  
  93. @if ($invite)
  94. {{ __('users.invitation') }}: {{ $invite->user->getProfile() }}<br>
  95. @endif
  96.  
  97. {{ __('users.last_visit') }}: {{ $user->getVisit() }}<br>
  98.  
  99. @foreach($fields as $field)
  100. {{ $field->name }}:
  101. @if ($field->type === 'textarea')
  102. {{ bbCode($field->value) }}
  103. @else
  104. {{ $field->value }}
  105. @endif
  106. <br>
  107. @endforeach
  108.  
  109. @if (getUser())
  110. <a href="/ratings/{{ $user->login }}">{{ __('main.reputation') }}: <b>{{ formatNum($user->rating) }}</b> (+{{ $user->posrating }}/-{{ $user->negrating }})</a><br>
  111. @if (getUser('login') !== $user->login)
  112. <a href="/users/{{ $user->login }}/rating?vote=plus"><i class="fa fa-arrow-up"></i><span style="color:#0099cc"> {{ __('main.plus') }}</span></a> /
  113. <a href="/users/{{ $user->login }}/rating?vote=minus"><span style="color:#ff0000">{{ __('main.minus') }}</span> <i class="fa fa-arrow-down"></i></a><br>
  114. @endif
  115. @else
  116. {{ __('main.reputation') }}: <b>{{ formatNum($user->rating) }}</b> (+{{ $user->posrating }}/-{{ $user->negrating }})<br>
  117. @endif
  118. </div>
  119.  
  120. <div class="col-md-6">
  121. @if (!empty($user->picture) && file_exists(public_path($user->picture)))
  122. <a class="gallery" href="{{ $user->picture }}">
  123. {{ resizeImage($user->picture, ['alt' => $user->getName(), 'class' => 'float-end img-fluid rounded']) }}</a>
  124. @else
  125. <img src="/assets/img/images/photo.png" alt="Photo" class="float-end img-fluid rounded">
  126. @endif
  127. </div>
  128. <div class="col-md-12 mt-3">
  129. @if (!empty($user->info))
  130. <div class="alert alert-warning">
  131. <b>{{ __('users.about') }}:</b><br>
  132. {{ bbCode($user->info) }}
  133. </div>
  134. @endif
  135.  
  136. <b><a href="/forums/active/topics?user={{ $user->login }}">{{ __('index.forums') }}</a></b> (<a href="/forums/active/posts?user={{ $user->login }}">{{ __('main.messages') }}</a>) /
  137. <b><a href="/downs/active/files?user={{ $user->login }}">{{ __('index.loads') }}</a></b> (<a href="/downs/active/comments?user={{ $user->login }}">{{ __('main.comments') }}</a>) /
  138. <b><a href="/blogs/active/articles?user={{ $user->login }}">{{ __('index.blogs') }}</a></b> (<a href="/blogs/active/comments?user={{ $user->login }}">{{ __('main.comments') }}</a>) /
  139. <b><a href="/photos/albums/{{ $user->login }}">{{ __('index.photos') }}</a></b> (<a href="/photos/comments/active/{{ $user->login }}">{{ __('main.comments') }}</a>)<br>
  140. </div>
  141. </div>
  142. </div>
  143.  
  144. @if (isAdmin())
  145. <div class="alert alert-success mb-3">
  146. <i class="fa fa-thumbtack"></i> <b>{{ __('main.note') }}:</b> (<a href="/users/{{ $user->login }}/note">{{ __('main.change') }}</a>)<br>
  147.  
  148. @if (! empty($user->note->text))
  149. {{ bbCode($user->note->text) }}<br>
  150. {{ __('main.changed') }}: {{ $user->note->editUser->getProfile() }} ({{ dateFixed($user->note->updated_at) }})<br>
  151. @else
  152. {{ __('users.empty_note') }}<br>
  153. @endif
  154.  
  155. </div>
  156. @endif
  157.  
  158. <div class="alert alert-info mb-3">
  159. <i class="fa fa-sticky-note"></i> <a href="/walls/{{ $user->login }}">{{ __('index.wall_posts') }}</a> ({{ $user->getCountWall() }})<br>
  160.  
  161. @if (!empty($user->site))
  162. <i class="fa fa-home"></i> <a href="{{ $user->site }}">{{ __('users.go_website') }} {{ $user->getName() }}</a><br>
  163. @endif
  164.  
  165. @if (getUser())
  166. @if ($user->login !== getUser('login'))
  167. <i class="fa fa-address-book"></i> {{ __('users.add_to') }}
  168. <a href="/contacts?user={{ $user->login }}">{{ __('index.contacts') }}</a> /
  169. <a href="/ignores?user={{ $user->login }}">{{ __('index.ignores') }}</a><br>
  170. <i class="fa fa-envelope"></i> <a href="/messages/talk/{{ $user->login }}">{{ __('users.send_message') }}</a><br>
  171. <i class="fas fa-coins"></i> <a href="/transfers?user={{ $user->login }}">{{ __('index.money_transfer') }}</a><br>
  172.  
  173. @if (isAdmin('moder'))
  174. @if (setting('invite'))
  175. <i class="fa fa-ban"></i> <a href="/admin/invitations/send?user={{ $user->login }}&amp;_token={{ csrf_token() }}">{{ __('users.send_invite') }}</a><br>
  176. @endif
  177. <i class="fa fa-ban"></i> <a href="/admin/bans/edit?user={{ $user->login }}">{{ __('index.ban_unban') }}</a><br>
  178. <i class="fa fa-history"></i> <a href="/admin/banhists/view?user={{ $user->login }}">{{ __('index.ban_history') }}</a><br>
  179. @endif
  180.  
  181. @if (isAdmin('boss'))
  182. <i class="fa fa-wrench"></i> <a href="/admin/users/edit?user={{ $user->login }}">{{ __('main.edit') }}</a><br>
  183. @endif
  184. @else
  185. <i class="fa fa-user-circle"></i> <a href="/profile">{{ __('index.my_profile') }}</a><br>
  186. <i class="fa fa-cog"></i> <a href="/accounts">{{ __('index.my_details') }}</a><br>
  187. <i class="fa fa-wrench"></i> <a href="/settings">{{ __('index.my_settings') }}</a><br>
  188. @endif
  189. @endif
  190. </div>
  191. @stop