Преглед на файлове

Merge pull request #95 from m4sk1n/follow-button

Do not show “Follow” button in notifications if already followed
daniel преди 7 години
родител
ревизия
2d0442b420
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      resources/views/account/activity.blade.php

+ 3 - 1
resources/views/account/activity.blade.php

@@ -28,6 +28,7 @@
             {!! $notification->rendered !!}
             <span class="text-muted notification-timestamp pl-1">{{$notification->created_at->diffForHumans(null, true, true, true)}}</span>
           </span>
+          @if($notification->actor->followedBy(Auth::user()->profile) == false)
           <span class="float-right notification-action">
            <form class="follow-form" method="post" action="/i/follow" style="display: inline;" data-id="{{$notification->actor->id}}" data-action="follow">
               @csrf
@@ -35,6 +36,7 @@
               <button class="btn btn-primary font-weight-bold px-4 py-0" type="submit">Follow</button>
             </form>
           </span>
+          @endif
         @break
         @endswitch
       </li>
@@ -42,4 +44,4 @@
     </ul>
   </div>
 </div>
-@endsection
+@endsection