@@ -20,10 +20,10 @@ discard block |
||
| 20 | 20 | $name = $user->profile->getNickname(); |
| 21 | 21 | |
| 22 | 22 | $this->layout('_layouts/default', [ |
| 23 | - 'title' => __('Profile') . ': ' . $name, |
|
| 23 | + 'title' => __('Profile').': '.$name, |
|
| 24 | 24 | 'breadcrumbs' => [ |
| 25 | 25 | Url::to('/') => __('Home'), |
| 26 | - __('Profile') . ': ' . $name |
|
| 26 | + __('Profile').': '.$name |
|
| 27 | 27 | ] |
| 28 | 28 | ]); |
| 29 | 29 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | <img src="<?= $user->profile->getAvatarUrl('big') ?>" class="img-fluid img-thumbnail" /> |
| 44 | 44 | <?php if ($ratingOn): |
| 45 | 45 | $rateClass = 'btn-secondary'; |
| 46 | - $rateValue = (int)$user->profile->rating; |
|
| 46 | + $rateValue = (int) $user->profile->rating; |
|
| 47 | 47 | if ($user->profile->rating > 0) { |
| 48 | 48 | $rateClass = 'btn-info'; |
| 49 | 49 | } elseif ($user->profile->rating < 0) { |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | <?php |
| 81 | 81 | $userMenu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs flex-column']); |
| 82 | 82 | if ($isSelf) { |
| 83 | - $userMenu->menu(['link' => ['profile/feed'], 'text' => '<i class="fa fa-rss-square"></i> ' . __('Feed'), 'html' => true]); |
|
| 84 | - $userMenu->menu(['link' => ['profile/avatar'], 'text' => '<i class="fa fa-camera"></i> ' . __('Picture'), 'html' => true]); |
|
| 85 | - $userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-envelope"></i> ' . __('Messages') . ' <span class="badge pm-count-block">0</span>', 'html' => true]); |
|
| 86 | - $userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true]); |
|
| 87 | - } else if(\App::$User->isAuth()) { |
|
| 83 | + $userMenu->menu(['link' => ['profile/feed'], 'text' => '<i class="fa fa-rss-square"></i> '.__('Feed'), 'html' => true]); |
|
| 84 | + $userMenu->menu(['link' => ['profile/avatar'], 'text' => '<i class="fa fa-camera"></i> '.__('Picture'), 'html' => true]); |
|
| 85 | + $userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-envelope"></i> '.__('Messages').' <span class="badge pm-count-block">0</span>', 'html' => true]); |
|
| 86 | + $userMenu->menu(['link' => ['profile/messages'], 'text' => '<i class="fa fa-cogs"></i> '.__('Settings'), 'html' => true]); |
|
| 87 | + } else if (\App::$User->isAuth()) { |
|
| 88 | 88 | $userMenu->menu(['link' => ['profile/messages', null, ['newdialog' => $user->id]], 'text' => __('Write message')]); |
| 89 | 89 | $userMenu->menu(['link' => ['profile/ignore', null, ['id' => $user->id]], 'text' => __('Block')]); |
| 90 | 90 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | foreach ($hobbyArray as $item) { |
| 161 | 161 | $item = \App::$Security->strip_tags($item); |
| 162 | 162 | if (!Str::likeEmpty($item)) { |
| 163 | - echo Url::a(['profile/index', ['hobby', trim($item, ' ')]], $item, ['class' => 'label label-success']) . ' '; |
|
| 163 | + echo Url::a(['profile/index', ['hobby', trim($item, ' ')]], $item, ['class' => 'label label-success']).' '; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | ?> |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | <div class="col-xs-8 col-md-10"> |
| 216 | 216 | <div class="h5" style="margin-top: 0;margin-bottom: 5px;"> |
| 217 | 217 | <i class="glyphicon glyphicon-user"></i> |
| 218 | - <?= Url::a(['profile/show', [$post->sender_id]], $post->senderUser->profile->getNickname(), ['style' => 'color: ' . $post->senderUser->role->color]) ?> |
|
| 218 | + <?= Url::a(['profile/show', [$post->sender_id]], $post->senderUser->profile->getNickname(), ['style' => 'color: '.$post->senderUser->role->color]) ?> |
|
| 219 | 219 | <small class="pull-right"><?= Date::humanize($post->updated_at); ?></small> |
| 220 | 220 | </div> |
| 221 | 221 | <div class="object-text"> |
@@ -58,7 +58,8 @@ discard block |
||
| 58 | 58 | </button> |
| 59 | 59 | </div> |
| 60 | 60 | </div> |
| 61 | - <?php else: ?> |
|
| 61 | + <?php else { |
|
| 62 | + : ?> |
|
| 62 | 63 | <div class="row"> |
| 63 | 64 | <div class="col-md-8" style="padding-right: 0;"> |
| 64 | 65 | <a href="javascript:void(0);" class="btn btn-block <?= $rateClass ?>"> |
@@ -75,7 +76,9 @@ discard block |
||
| 75 | 76 | <button class="btn btn-block btn-danger" id="reduceRating">-</button> |
| 76 | 77 | </div> |
| 77 | 78 | </div> |
| 78 | - <?php endif; ?> |
|
| 79 | + <?php endif; |
|
| 80 | +} |
|
| 81 | +?> |
|
| 79 | 82 | <?php endif; ?> |
| 80 | 83 | <?php |
| 81 | 84 | $userMenu = $this->bootstrap()->nav('ul', ['class' => 'nav-tabs flex-column']); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function show(string $userId): ?string |
| 33 | 33 | { |
| 34 | 34 | $cfg = $this->application->configs; |
| 35 | - if (!(bool)$cfg['guestView'] && !App::$User->isAuth()) { |
|
| 35 | + if (!(bool) $cfg['guestView'] && !App::$User->isAuth()) { |
|
| 36 | 36 | throw new ForbiddenException(__('You must login to view other profile')); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | App::$Session->getFlashBag()->add('error', __('This user are in your black list or you are in blacklist!')); |
| 56 | 56 | } else { |
| 57 | 57 | // check if message added |
| 58 | - if ($wallModel->makePost($targetPersone, $viewerPersone, (int)$cfg['delayBetweenPost'])) { |
|
| 58 | + if ($wallModel->makePost($targetPersone, $viewerPersone, (int) $cfg['delayBetweenPost'])) { |
|
| 59 | 59 | App::$Session->getFlashBag()->add('success', __('The message was successful posted!')); |
| 60 | 60 | } else { |
| 61 | 61 | App::$Session->getFlashBag()->add('warning', __('Posting message was failed! Please, wait few seconds')); |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | $wallQuery = WallPost::where('target_id', $targetPersone->getId()); |
| 69 | 69 | |
| 70 | 70 | // pagination and query params |
| 71 | - $wallPage = (int)$this->request->query->get('page'); |
|
| 72 | - $wallStep = (int)$cfg['wallPostOnPage']; |
|
| 71 | + $wallPage = (int) $this->request->query->get('page'); |
|
| 72 | + $wallStep = (int) $cfg['wallPostOnPage']; |
|
| 73 | 73 | $wallOffset = $wallPage * $wallStep; |
| 74 | 74 | $wallTotalCount = $wallQuery->count(); |
| 75 | 75 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | 'total' => $wallTotalCount, |
| 94 | 94 | 'page' => $wallPage |
| 95 | 95 | ], |
| 96 | - 'ratingOn' => (int)$cfg['rating'] === 1 |
|
| 96 | + 'ratingOn' => (int) $cfg['rating'] === 1 |
|
| 97 | 97 | ]); |
| 98 | 98 | } |
| 99 | 99 | } |