From 46e2cece9460335bde6d41515e3a8fd8a901ce02 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 12 Feb 2019 21:14:33 -0700 Subject: [PATCH] Fix profile bookmarks --- app/Http/Controllers/ProfileController.php | 2 +- resources/views/profile/bookmarks.blade.php | 121 ++++++++++++++++++++ 2 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 resources/views/profile/bookmarks.blade.php diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 1b544ce7..6a6a418a 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -238,7 +238,7 @@ class ProfileController extends Controller $timeline = $user->bookmarks()->withCount(['likes','comments'])->orderBy('created_at', 'desc')->simplePaginate(10); $is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false; $is_admin = is_null($user->domain) ? $user->user->is_admin : false; - return view('profile.show', compact('user', 'settings', 'owner', 'following', 'timeline', 'is_following', 'is_admin')); + return view('profile.bookmarks', compact('user', 'profile', 'settings', 'owner', 'following', 'timeline', 'is_following', 'is_admin')); } public function createCollection(Request $request) diff --git a/resources/views/profile/bookmarks.blade.php b/resources/views/profile/bookmarks.blade.php new file mode 100644 index 00000000..52ed7284 --- /dev/null +++ b/resources/views/profile/bookmarks.blade.php @@ -0,0 +1,121 @@ +@extends('layouts.app',['title' => $user->username . " on " . config('app.name')]) + +@section('content') +@if (session('error')) +
+ {{ session('error') }} +
+@endif +@include('profile.partial.user-info') + +@if(true === $owner) +
+ +
+@endif +
+ @if($owner && request()->is('*/saved')) +
+

{{__('profile.savedWarning')}}

+
+ @endif + +
+
+ {{$timeline->links()}} +
+
+ @else +
+
+
+
+ @if($owner && request()->is('*/saved')) +

{{ __('profile.emptySaved') }}

+ @else +

{{ __('profile.emptyTimeline') }}

+ @endif +
+
+
+
+
+ @endif + + + +@endsection + +@push('meta') + + + @if(false == $settings->crawlable || $user->remote_url) + + @endif +@endpush + +@push('scripts') + + +@endpush +