|
|
|
@ -6,9 +6,18 @@
|
|
|
|
|
<h3 class="font-weight-bold">Followers & Following</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<hr>
|
|
|
|
|
@if(empty($following) && empty($followers))
|
|
|
|
|
<p class="text-center lead pt-5 mt-5">You are not following anyone, or followed by anyone.</p>
|
|
|
|
|
@if(empty($data))
|
|
|
|
|
<p class="text-center lead pt-5 mt-5">You are not {{$mode == 'following' ? 'following anyone.' : 'followed by anyone.'}}</p>
|
|
|
|
|
@else
|
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<a class="nav-link font-weight-bold {{$mode == 'followers' ? 'active' : ''}}" href="?mode=followers&page=1">Followers</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<a class="nav-link font-weight-bold {{$mode == 'following' ? 'active' : ''}}" href="?mode=following&page=1">Following</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<hr>
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
@ -21,39 +30,32 @@
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@foreach($followers as $follower)
|
|
|
|
|
@foreach($data as $follower)
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="row" class="pb-0 pt-1 my-0">
|
|
|
|
|
{{-- <input type="checkbox" class="form-control mr-1 check-row"> --}}
|
|
|
|
|
</th>
|
|
|
|
|
<td class="font-weight-bold">
|
|
|
|
|
<img src="{{$follower->avatarUrl()}}" width="20px" height="20px" class="rounded-circle border mr-2">{{$follower->username}}
|
|
|
|
|
<img src="{{$follower->avatarUrl()}}" width="20px" height="20px" class="rounded-circle border mr-2">
|
|
|
|
|
<span class="d-inline-block text-truncate" style="max-width: 160px;" title="{{$follower->username}}">{{$follower->username}}</span>
|
|
|
|
|
</td>
|
|
|
|
|
@if($mode == 'following')
|
|
|
|
|
<td class="text-center">Following</td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<a class="btn btn-outline-danger btn-sm py-0 action-btn" href="#" data-id="{{$follower->id}}" data-action="unfollow">Unfollow</a>
|
|
|
|
|
</td>
|
|
|
|
|
@else
|
|
|
|
|
<td class="text-center">Follower</td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<a class="btn btn-outline-primary btn-sm py-0 action-btn" href="#" data-id="{{$follower->id}}" data-action="mute">Mute</a>
|
|
|
|
|
<a class="btn btn-outline-danger btn-sm py-0 action-btn" href="#" data-id="{{$follower->id}}" data-action="block">Block</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
|
|
|
|
|
@foreach($following as $follower)
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="row" class="pb-0 pt-1 my-0">
|
|
|
|
|
<input type="checkbox" class="form-control mr-1 check-row">
|
|
|
|
|
</th>
|
|
|
|
|
<td class="font-weight-bold">
|
|
|
|
|
<img src="{{$follower->avatarUrl()}}" width="20px" height="20px" class="rounded-circle border mr-2">{{$follower->username}}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="text-success text-center">Following</td>
|
|
|
|
|
<td class="text-center">
|
|
|
|
|
<a class="btn btn-outline-danger btn-sm py-0 action-btn" href="#" data-id="{{$follower->id}}" data-action="unfollow">Unfollow</a>
|
|
|
|
|
</td>
|
|
|
|
|
@endif
|
|
|
|
|
</tr>
|
|
|
|
|
@endforeach
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="d-flex justify-content-center">{{$following->links() ?? $followers->links()}}</div>
|
|
|
|
|
<div class="d-flex justify-content-center">{{$data->appends(['mode' => $mode])->links()}}</div>
|
|
|
|
|
@endif
|
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
|