いいねタブが常に表示されるように変更

This commit is contained in:
shibafu 2019-04-09 23:04:42 +09:00
parent ddac533539
commit 566d288395
3 changed files with 8 additions and 10 deletions

View File

@ -185,10 +185,6 @@ SQL
abort(404); abort(404);
} }
if (!$user->isMe()) {
abort(403);
}
$likes = $user->likes() $likes = $user->likes()
->orderBy('created_at', 'desc') ->orderBy('created_at', 'desc')
->with('ejaculation.user', 'ejaculation.tags') ->with('ejaculation.user', 'ejaculation.tags')

View File

@ -20,11 +20,13 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link {{ Route::currentRouteName() === 'user.okazu' ? 'active' : '' }}" href="{{ route('user.okazu', ['name' => $user->name]) }}">オカズ</a> <a class="nav-link {{ Route::currentRouteName() === 'user.okazu' ? 'active' : '' }}" href="{{ route('user.okazu', ['name' => $user->name]) }}">オカズ</a>
</li> </li>
@if ($user->isMe()) <li class="nav-item">
<li class="nav-item"> <a class="nav-link {{ Route::currentRouteName() === 'user.likes' ? 'active' : '' }}" href="{{ route('user.likes', ['name' => $user->name]) }}">いいね
<a class="nav-link {{ Route::currentRouteName() === 'user.likes' ? 'active' : '' }}" href="{{ route('user.likes', ['name' => $user->name]) }}">いいね <span class="badge badge-primary">{{ $user->likes()->count() }}</span></a> @if ($user->isMe() || !($user->is_protected || $user->private_likes))
</li> <span class="badge badge-primary">{{ $user->likes()->count() }}</span>
@endif @endif
</a>
</li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
@yield('tab-content') @yield('tab-content')

View File

@ -3,7 +3,7 @@
@section('title', $user->display_name . ' (@' . $user->name . ') さんがいいねしたチェックイン') @section('title', $user->display_name . ' (@' . $user->name . ') さんがいいねしたチェックイン')
@section('tab-content') @section('tab-content')
@if ($user->is_protected && !$user->isMe()) @if (($user->is_protected || $user->private_likes) && !$user->isMe())
<p class="mt-4"> <p class="mt-4">
<span class="oi oi-lock-locked"></span> このユーザはいいね一覧を公開していません。 <span class="oi oi-lock-locked"></span> このユーザはいいね一覧を公開していません。
</p> </p>