@extends('main')

@section('css')
<link href="{{ asset('/css/bootstrapValidator.min.css')}}" rel="stylesheet">
@endsection

@section('content')
<section class="main_content">
    <div class="container">
	<!---breadcurmb starts here-->
  <ol class="breadcrumb cust-breadcrumb">
  <li><a href="#">Home</a></li>
  <li class="active">My Profile</li>
  </ol><!---breadcurmb ends here-->
     <section class="body-content"> 
  <div class="row">
  
        @include("left_menu")
		<div class="col-sm-9 light-pannel">
<div class="rt-panel-block">
<div class="col-md-12">
          @if (Session::get('error_msg')!="" && Session::get('error_msg'))
              <div class="alert alert-danger clearfix">
                 <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                   <span aria-hidden="true">&times;</span>
                 </button>
                  {{Session::get('error_msg')}}
              </div>
          @endif
          @if (Session::get('succ_msg'))
              <div class="alert alert-success clearfix">
                 <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                   <span aria-hidden="true">&times;</span>
                 </button>
                  {{Session::get('succ_msg')}}
              </div>
          @endif
          </div>
<div class="my-profiles-block">
<h1>My Profiles</h1>
<div class="row mtop-20">
@if($profiles->count()>0)
<?php $i=1;$j=2;?>
            @foreach($profiles as $pro)
<div class="col-sm-6">
<div class="my-profle-cont-block <?php if($profiles->count()==1 || $profiles->count()==$i || $profiles->count()%2==$j){echo 'cond-border-btm';}?>">
<div class="row <?php if($profiles->count()==1 || $profiles->count()==$i){echo 'cond-border-rt';}?>">

<div class="col-md-4 col-xs-5">
 <div class="my-profiles-avatar">
<a href="{{url('profiles/'.$pro->id)}}">
 @if($pro->profile_image && is_file('uploads/profile_images/'.$pro->profile_image))
                      <img class="img-responsive" src="{{url('uploads/profile_images/'.$pro->profile_image)}}" alt=""/>
                    @else                    
                      <img class="img-responsive" src="{{url('uploads/profile_images/default-profile.png')}}" alt=""/>
                    @endif</div></a></div>
<div class="col-md-4 mtop-10 col-xs-3"><a href="{{url('profiles/'.$pro->id)}}"><p>{{$pro->name}}</p></a><a href="{{url('profiles/'.$pro->id)}}"><p class="talent-prof-text">@if($pro->profile_type=='T') {{'Talent Profile'}}@else {{'Organization Profile'}} @endif</p></a></div>
<div class="col-md-4 col-xs-4">
 <div class="my-profiles-ex-img"><img src="images/add_pic.png" class="img-responsive"></div></div>
</div>
</div>
</div>
<?php $i++;if($i/2==0){$j++;}?>
@endforeach
@else
<div class="col-sm-3">
                                      
                      <img class="img-responsive" src="{{url('uploads/profile_images/default-profile.png')}}" alt=""/>
                  
            </div>
            <div class="col-sm-6">
                      <h4>No profile found</h4>
             </div>
			 
            @endif
			</div>

</div>

 </div>
</div>  
  
  </div><!---page row ends-->
  </div>
  
  </section>
		
		
		
		
		
		
		
		
		
		
        
@endsection
@section('js')
<script src="{{ asset('js/bootstrapValidator.min.js')}}"></script>
<script src="{{ asset('js/maskedinput/jquery.maskedinput.min.js')}}"></script>
<script src="{{ asset('js/validation.js')}}"></script>

@endsection
