@if($timeline->type == "group")
@if(Auth::check() && $group->post_privacy == "only_admins" && $group->is_admin(Auth::user()->id))
@include('socialite::partials.create-post', compact('timeline','user_post','username'))
@elseif(Auth::check() && ($group->post_privacy == "members" && (Auth::user()->get_group($group->id) == 'approved') || $group->is_admin(Auth::user()->id)))
@include('socialite::partials.create-post', compact('timeline','user_post','username'))
@elseif($group->post_privacy == "everyone")
@include('socialite::partials.create-post', compact('timeline','user_post','username'))
@endif
@endif
@if($posts->count() > 0)
@foreach($posts as $post)
@include('socialite::partials.post', compact('post','timeline','next_page_url'))
@endforeach
@else
{{ trans('socialite::common.posts') }}
{{ trans('socialite::messages.no_posts') }}
@endif