<?php 
	$posted_in_community=0;
	$socialNetworkLink="";
	$socialNetworkLink="";
	
	$bookingRideUrl="";
	if($posted_community){
		$posted_in_community=$posted_community->id;
		$communitySocialNetworking2=$posted_community->present()->getLogo();
		$socialNetworkingBackground=$posted_community->present()->getSocialNetworkingBackGroundcolor();
		$socialNetworkLink=$posted_community->present()->url();
		
		if($posted_community->race_community==1 || $selected_pricing_plan_type=='racing'){
			$bookingRideUrl=URL::route('community-ride-booking',['slug'=>$posted_community->id]);
		}	
	}
?>

<div class="container page-content clearfix">
    
    <div class="left-column">

    {!! Theme::section('advertisement.index') !!}
    
    {!! Theme::section('user.home.accept-moderator') !!}

    {!! Theme::extend('timeline-before-post-editor') !!}

    {!! Theme::section('user.home.social-search',['communitySocialNetworking2'=>$communitySocialNetworking2,'socialNetworkingBackground'=>$socialNetworkingBackground,'socialNetworkLink'=>$socialNetworkLink]) !!}
    
     @if(\Request::segment(1)=="home") 
        {!! Theme::section('user.home.take-primary-community') !!}
     @endif
    
    @if($loggedInUser->present()->canApplyForCommunityPrimaryMember() and !$posted_community)
         {!! Theme::section('user.home.apply-community') !!}
    @endif	
    
    <div class="racingcommunityhidemenu" style="position:relative">
    	<span class="mobile-right-panel-toggle-btn"><i class="fa fa-th-large" aria-hidden="true"></i>
</span>

        {!! Theme::section('post.editor.main',['posted_in_community'=>$posted_in_community]) !!}
    </div>
    
    @if($bookingRideUrl!="")
        <style>
            @media (max-width: 1024px) {
                .header-logo-box-on-mobile{
                    display: block;
                }
                
                .platform-announcement-message{
                    margin-top: 0px !important;
                    margin-bottom:10px;	
                }	
            }	
        </style>
        @if(Session::has('purchasemessage'))
                <div class="alert alert-dismissible alert-info"> <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>{{Session::get('purchasemessage')}}</div>
        @endif
    
        <div class="book-a-ride-box">
            <a href="{{$bookingRideUrl}}">BOOK A RIDE</a>		
        </div>

        <?php
            //$slots=app('App\\Repositories\\CommunityRideTimeslotsRepository')->getAllSlots($posted_community->id)
        ?>
        
        <?php
            /*@if(!empty($slots))
                <div class="booking-slots-box">
                    @foreach($slots as $slot)
                        <a class="slot-row" href="{{URL::route('community-ride-booking',['slug'=>$posted_community->id,'slotid'=>$slot->id])}}">
                            Book a {{$slot->times}} {{$slot->name}} ride
                        </a>					
                    @endforeach	
                </div>	

                <br>	
            @endif*/ 
        ?>			
    @endif	

    {!! Theme::extend('timeline-after-post-editor') !!}
    <?php Theme::widget()->add('user.home.feeds', ['user-feeds'])?>
    {!! Theme::widget()->get('user-feeds') !!}
    
    {!! Theme::section('user.home.share-on-own-community') !!}
</div>

<div class="right-column social-media-right-column">
    
    {{--<div class="box-title black-ommunity-tittle blue-socialhome-title hidehomeonmobile" style="@if($socialNetworkingBackground) background:{{$socialNetworkingBackground}} !important; @endif">
        <a href="@if($socialNetworkLink!="") {{$socialNetworkLink}} @else {{URL::route('user-home')}} @endif" style="color:#FFF">
            <img src="@if($communitySocialNetworking2) {{$communitySocialNetworking2}} @else {{Theme::asset()->img('theme/images/idhubs-texts.png')}} @endif" class="idhubs-social-network-text"/>
        
            @if($socialNetworkLink!="") <span class="social-media-visit-name">{{trans('user.social-community-network')}}</span> @endif
        </a>
    </div>--}}

    {!! Theme::section('user.side-info',['bookingRideUrl'=>$bookingRideUrl]) !!}
    
    <div id="suggested-friends-view-list" data-id="{{$posted_in_community}}">
         <div class="box friend-request-invitations suggested-friends-list" style="min-height:1px; margin-bottom:0px;">
            <div class="box-title invitations-title">{{trans('connection.suggested')}} ({{trans('connection.friends')}}) <a href="{{URL::route('user-account-privacy')}}"><i class="fa fa-cog" aria-hidden="true"></i></a> 

            </div>
         </div> 
    </div>
    
    <div class="userProfile" style="color:#d74d4d; padding:10px; display:none; ">
    	<a href="{{URL::route('user-organization')}}" style="text-decoration:none; color:#f2aa84; ">Click to complete your profile now to unlock personalized matches and discover verified peers in the idhubs community who share your interests and goals.</a>
    </div>
    
    @if(\Request::segment(1)=="home" and !$loggedInUser->present()->isIdentityVerified(\Auth::user()->id))        
        {!! Theme::section('user.identification.identification') !!}
    @endif
    </div>
</div>

