mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-29 16:33:17 +00:00
Merge pull request #844 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
a0f15adcca
2 changed files with 3 additions and 13 deletions
|
@ -207,11 +207,11 @@ class AdminController extends Controller
|
|||
$order = $request->input('order') ?? 'desc';
|
||||
$limit = $request->input('limit') ?? 12;
|
||||
if($search) {
|
||||
$profiles = Profile::where('username','like', "%$search%")->orderBy('id','desc')->paginate($limit);
|
||||
$profiles = Profile::select('id','username')->where('username','like', "%$search%")->orderBy('id','desc')->paginate($limit);
|
||||
} else if($filter && $order) {
|
||||
$profiles = Profile::withCount(['likes','statuses','followers'])->orderBy($filter, $order)->paginate($limit);
|
||||
$profiles = Profile::select('id','username')->withCount(['likes','statuses','followers'])->orderBy($filter, $order)->paginate($limit);
|
||||
} else {
|
||||
$profiles = Profile::orderBy('id','desc')->paginate($limit);
|
||||
$profiles = Profile::select('id','username')->orderBy('id','desc')->paginate($limit);
|
||||
}
|
||||
|
||||
return view('admin.profiles.home', compact('profiles'));
|
||||
|
|
|
@ -102,21 +102,11 @@
|
|||
<th scope="col" class="border-0" width="20%">
|
||||
<span>
|
||||
Followers
|
||||
@if(request()->filter && request()->filter == 'followers_count' && request()->order == 'asc')
|
||||
<a href="#" class="col-ord" data-col="followers_count" data-dir="desc"><i class="fas fa-chevron-down"></i></a>
|
||||
@else
|
||||
<a href="#" class="col-ord" data-col="followers_count" data-dir="asc"><i class="fas fa-chevron-up"></i></a>
|
||||
@endif
|
||||
</span>
|
||||
</th>
|
||||
<th scope="col" class="border-0" width="20%">
|
||||
<span>
|
||||
Likes
|
||||
@if(request()->filter && request()->filter == 'likes_count' && request()->order == 'asc')
|
||||
<a href="#" class="col-ord" data-col="likes_count" data-dir="desc"><i class="fas fa-chevron-down"></i></a>
|
||||
@else
|
||||
<a href="#" class="col-ord" data-col="likes_count" data-dir="asc"><i class="fas fa-chevron-up"></i></a>
|
||||
@endif
|
||||
</span>
|
||||
</th>
|
||||
<th scope="col" class="border-0" width="20%">
|
||||
|
|
Loading…
Reference in a new issue