<div style="padding-bottom: 10px" class="box profilesidecnt">
	<?php 
		$profilePresenter = $profileUser->present();
		$resumeLink = $profilePresenter->resumeLink($profileUser->id);
		$profileFullName = $profilePresenter->fullName();
		$likeToLearn = $profilePresenter->getLikeToLearn();
		$wantToConnect = $profilePresenter->getWantToConnect();
	?>
    @if($resumeLink)
		<div class="box-title view-interactive-profile-btn racingcommunityhidemenu">
        	<a href="{{$resumeLink}}" target="_blank">
        		@if (\Auth::check() and \Auth::user()->id==$profileUser->id and !$loggedInUser->present()->isResumeCreated())
                    Create a Personal Website
				@else
                    <!--{{trans('connection.view-interactive-resume')}}-->
                    

                    ABOUT {{strtoupper($profileFullName)}}
				@endif
            </a>
            
             @if (\Auth::check() and \Auth::user()->id==$profileUser->id)
             	@if($loggedInUser->present()->isResumeCreated())
				  <a href="{{generateResumeUrl($loggedInUser->present()->isResumeCreated()->slug)}}" target="_blank" class="view-resume-icon"><i class="icon ion-eye"></i></a>
                @endif  
			 @endif
        </div>
	@endif
    
	<div class="box-title racingcommunityhidemenu">{{$profileFullName}}
    {{trans('global.information')}}
    @if($profileUser->isOwner())
        <a href="{{URL::route('user-organization')}}" data-ajaxify="true"><i class="icon ion-edit"></i> {{trans('connection.edit-social-profile')}}</a>
    @endif
     </div>
	 
	<div style="background:#000; font-size:16px; color:#fff;" class="box-title racingcommunityshowmenu">{{$profileFullName}}
		
		<!--@if($profileUser->isOwner())
			<a style="color:#fff; float:right;" href="{{URL::route('user-organization')}}" data-ajaxify="true"><i class="icon ion-edit"></i> {{trans('connection.edit-social-profile')}}</a>
		@endif-->
		
     </div>

     <table class="profile-side-detail table table-striped">

        <tbody>

			<tr>
				<td><strong>{{trans('user.date-joined')}} :
				
					<?php
						$datetime1 = new DateTime($profileUser->created_at);
						$datetime2 = new DateTime('now');
						$interval = $datetime1->diff($datetime2);
						$dateJoined=$interval->format('%y Year %m Month %d Day');
					
						$dateExp=explode(" ",$dateJoined);
						
						$setDate="";
						if(isset($dateExp[0]) and $dateExp[0]>0){
							$setDate=$dateExp[0]." "."Year ";
						}
						
						if(isset($dateExp[2]) and $dateExp[2]>0){
							$setDate=$setDate.$dateExp[2]." "."Month ";
						}
						
						if(isset($dateExp[4]) and $dateExp[4]>0){
							$setDate=$setDate.$dateExp[4]." "."Day ago";
						}else{
							$setDate="Today";
						}
					?>
				
				 </strong></td>
				<td><span class="post-time" ><span title="{{$profileUser->present()->joinedOn()}}">{{$setDate}}</span></span> </td>
			</tr>

			@if(Config::get('user-enable-birth-date', 1))
				@if($profileUser->birth_day)
					<tr>
						<td><strong>{{trans('month.born-on')}} : </strong></td>
						<td>
							{{getMonthName($profileUser->birth_month)}}, {{$profileUser->birth_day}}

							@if($profileUser->present()->canSeeBirth())
								,{{$profileUser->birth_year}} ({{getProperAge($profileUser->birth_year, $profileUser->birth_day, $profileUser->birth_month)}} {{trans('month.years-old')}})
							@endif
						</td>
					</tr>
				@endif
			@endif
                       

			@if(count($likeToLearn)>0)  
                <tr>
                    <td><strong>Would like to learn more about: </strong></td>
                    <td>

					   @foreach($likeToLearn as $lrn){{$lrn->name}}, @endforeach     
                    </td>
                </tr>  
            @endif
            

			@if(count($wantToConnect)>0)  
                <tr>
                    <td><strong>Want to connect with : </strong></td>
                    <td>

					   @foreach($wantToConnect as $cnt)
                       		{{$cnt->name}},
                       @endforeach     
                    </td>
                </tr>  
            @endif            
            
                
            <?php
				$personalProfile=$profilePresenter->personalProfile();
			?>  
            
            @if($personalProfile)
            	@if($personalProfile->organization_name)  
                    <tr>
                        <td><strong>Organization name: </strong></td>
                        <td>
                           {{$personalProfile->organization_name}}
                        </td>
                    </tr>  
                @endif
                
                @if($personalProfile->designation)  
                    <tr>
                        <td><strong>Designation: </strong></td>
                        <td>
                           {{$personalProfile->designation}}
                        </td>
                    </tr>  
                @endif
                
                @if($personalProfile->experience)  
                    <tr>
                        <td><strong>Experience: </strong></td>
                        <td>
                           {!! $personalProfile->experience !!}
                        </td>
                    </tr>  
                @endif
           @endif
           
		   @if(\Session::has('appLogin') and \Session::get('appLogin')=='appLogin')
	
		   @else
			   @if($profileUser->origin_city) 
					@if($profileUser->present()->canViewMyCity()) 
						<tr>
							<td><strong>City of Origin: </strong></td>
							<td>
							   {{$profileUser->origin_city}}
							</td>
						</tr>  
					@endif    
			   @endif
           @endif
			
           @if($personalProfile)
                
				@if(\Session::has('appLogin') and \Session::get('appLogin')=='appLogin')
	
				@else			
					@if($personalProfile->address and $profileUser->present()->canViewMyAddress())  
						<tr>
							<td><strong>Address: </strong></td>
							<td>
							   {{$personalProfile->address}}
							</td>
						</tr>  
					@endif
                @endif
				
                @if($personalProfile->city)  
                    <tr>
                        <td><strong>City: </strong></td>
                        <td>
                           {{$personalProfile->city}}
                        </td>
                    </tr>  
                @endif
                
                @if($personalProfile->state)  
                    <tr>
                        <td><strong>State: </strong></td>
                        <td>
                           {{$personalProfile->state}}
                        </td>
                    </tr>  
                @endif
                
                @if($personalProfile->country)  
                    <tr>
                        <td><strong>Country: </strong></td>
                        <td>
                           {{$personalProfile->country}}
                        </td>
                    </tr>  
                @endif
                
				@if(\Session::has('appLogin') and \Session::get('appLogin')=='appLogin')
	
				@else
					@if($personalProfile->zip and $profileUser->present()->canViewMyAddress())  
						<tr>
							<td><strong>Zip: </strong></td>
							<td>
							   {{$personalProfile->zip}}
							</td>
						</tr>  
					@endif
				@endif
				
            @endif
            
            @if($profileUser->about_me) 
                <tr>
                    <td><strong>About me: </strong></td>
                    <td>
                       {!! nl2br($profileUser->about_me) !!}
                    </td>
                </tr>  
            @endif
            
			<?php /*?>@foreach($profileUser->present()->fields() as $field)				
					<?php $value = $profileUser->present()->profile($field->id)?>
					@if(!empty($value) and $field->name!="You want to share the name of your company or organization? (optional)" and $field->name!="Brief introduction?")
						<tr>
							<td><strong>{{$field->name}} : </strong></td>
							<td>
								@if(is_array($profileUser->present()->profile($field->id)))
									{{implode(", ",$profileUser->present()->profile($field->id))}}
								@else
									{{$profileUser->present()->profile($field->id)}}
								@endif
							</td>
						</tr>
					@endif				
			@endforeach<?php */?>
        </tbody>
	</table>
</div>
