

<?php $__env->startSection('css'); ?>
<link href="<?php echo e(asset('/css/bootstrapValidator.min.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>
<!-- hai hello -->
<?php $__env->startSection('content'); ?>
<section class="main_content">
    <div class="container">
    <ol class="breadcrumb cust-breadcrumb">
              <li><a href="<?php echo e(url('/')); ?>">Home</a></li>
              <li class="active">History</li>
            </ol>
                 <div class="row">
          <div class="col-md-12">
          <?php if(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>
                  <?php echo e(Session::get('error_msg')); ?>

              </div>
          <?php endif; ?>
          <?php 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>
                  <?php echo e(Session::get('succ_msg')); ?>

              </div>
          <?php endif; ?>
          </div>
        </div>
      <div class="row talent_home">
        <?php echo $__env->make("left_menu", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <div class="col-md-9 col-sm-9 recently-view-history"> 
          
             <h1 class="heading mtop-0">Recently Viewed</h1>
            <?php if(Session::get('error_msg') || Session::get('succ_msg')): ?>
   
        <?php endif; ?>
            <div class="row" id="mylikes_div">
            
               
             <div class="col-sm-12 findsiz">
              <div class="row rt-panel-block pad20">    
                  <h3 class="history-head">
                      Profiles            
                  </h3>
                  <table id="profile" class="table table-striped table-bordered th-display-none" cellspacing="0" width="100%">
                    <thead>
                      <tr>
                        <th></th>
                        <th></th>
                      
                      </tr>
                   </thead>
 
                 <tbody>
                  <?php if($profiles->count() > 0): ?>
                   <?php foreach($profiles as $views): ?>
                  <tr>
                   <td class="his-width-200">
                  
                     <div class="profile-image history-profile">
                      <?php if($views->profile_image && is_file('uploads/profile_images/'.$views->profile_image)): ?><a href="<?php echo e(url('profiles/'.$views->profile_id)); ?>"><img class="img-responsive img-circle" src="<?php echo e(url('uploads/profile_images/'.$views->profile_image)); ?>" alt=""/> </a><?php else: ?>
                      <a href="<?php echo e(url('profiles/'.$views->profile_id)); ?>"> <img src="<?php echo e(url('uploads/profile_images/default-profile.png')); ?>"  class="img-responsive img-circle"></a><?php endif; ?>
                    </div> 
                    
                  </td>
                  <td><h6><?php echo e($views->profile_name); ?></h6>
                  <br /><a href="<?php echo e(url('profiles/'.$views->profile_id)); ?>" class="btn btn-history">View Profile</a>&nbsp;<a href="javascript:void(0)" title="Delete" class="btn btn-danger delete_video" data-id="<?php echo e($views->id); ?>">Remove History</a></td>
               
                 </tr>
                  <?php endforeach; ?>
                   <?php endif; ?>
                </tbody>
               </table>
             
              </div>
            </div>  
             <!-- profile end-->   
                
              <!-- video start-->   
             <div class="col-sm-12  findsiz">
              <div class="row rt-panel-block pad20">    
               <h3 class="history-head">              
                    Videos                 
               </h3>
              <table id="video" class="table table-striped table-bordered th-display-none" cellspacing="0" width="100%">
                <thead>
                    <tr>
                        <th></th>
                        <th></th>
                       
                    </tr>
                </thead>
 
               <tbody>
                  <?php if($videos->count() > 0): ?>
                  <?php foreach($videos as $views): ?>
                  <tr>
                   <td class="his-width-200">
                  
                     <div class="profile-image history-pic173">
                    <img src="<?php echo e($views->thumb_img); ?>" iframe-src ="https://player.vimeo.com/video/<?php echo e($views->path); ?>" view-id="<?php echo e($views->view_id); ?>" class="img-responsive popup">
                    </div> 
                    
                  </td>
                  <td><h6><?php echo e($views->assets_name); ?></h6><br />
                  <a href="javascript:;" class="btn btn-history popup" iframe-src ="https://player.vimeo.com/video/<?php echo e($views->path); ?>" view-id="<?php echo e($views->view_id); ?>">View Video</a>&nbsp;<a href="javascript:void(0)" title="Delete" class="btn btn-danger delete_video" data-id="<?php echo e($views->id); ?>">Remove History</a></td>
               
                 </tr>
                  <?php endforeach; ?>
                   <?php endif; ?>
              </tbody>
             </table>
              </div>
            </div>
          <!-- video end-->   
          
            
           <!-- picture start-->
           
           <div class="col-sm-12  findsiz">
              <div class="row rt-panel-block pad20">    
               <h3 class="history-head">              
                    Pictures                 
               </h3>
              <table id="picture" class="table table-striped table-bordered th-display-none" cellspacing="0" width="100%">
                <thead>
                    <tr>
                         <th></th>
                        <th></th>
                     
                    </tr>
                </thead>
 
               <tbody>
                  <?php if($pictures->count() > 0): ?>
                  <?php foreach($pictures as $views): ?>
                  <tr>
                   <td class="his-width-200">
                  
                     <div class="profile-image history-pic173">
                    <a href="javascript:;" class="view_btn" data-id="<?php echo e($views->view_id); ?>" data-title="<?php echo e($views->assets_name); ?>" data-url="images/<?php echo e($views->path); ?>"><img class="img-responsive" src="images/<?php echo e($views->path); ?>"/></a>
                    </div> 
                    
                  </td>
                  <td><h6><?php echo e($views->assets_name); ?></h6><br /><a href="javascript:;" class="btn btn-history view_btn" data-id="<?php echo e($views->view_id); ?>" data-url="images/<?php echo e($views->path); ?>" title="View">View Picture</a>&nbsp;<a href="javascript:void(0)" title="Delete" class="btn btn-danger delete_video" data-id="<?php echo e($views->id); ?>">Remove History</a></td>
               
                 </tr>
                  <?php endforeach; ?>
                   <?php endif; ?>
              </tbody>
             </table>
              </div>
            </div>
         
            <!-- picture end-->
            
            
           <!--resume start-->
                
            <div class="col-sm-12  findsiz">
              <div class=" row rt-panel-block pad20">    
                  <h3 class="history-head">              
                    Resumes                 
                  </h3>
                  <table id="resume" class="table table-striped table-bordered th-display-none" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th></th>
                            <th></th>
                           
                        </tr>
                    </thead>
 
                    <tbody>
                          <?php if($resumes->count() > 0): ?>
                              <?php foreach($resumes as $views): ?>
                        <tr>
                            <td class="his-width-200">

                              <div class="profile-image history-profile">
                             <?php /**/ $addfile='images/text.png' /**/ ?>

                                  <?php /**/ $viewName = @end( @explode( '.', $views->path ) ) /**/ ?>
                                  <?php if($viewName=='txt'): ?>
                                  <?php /**/ $addfile='images/text.png' /**/ ?>
                                  <?php endif; ?>
                                  <?php if($viewName=='doc'): ?>
                                  <?php /**/ $addfile='images/doc.png' /**/ ?>
                                  <?php endif; ?>
                                  <?php if($viewName=='docx'): ?>
                                  <?php /**/ $addfile='images/docxs.png' /**/ ?>
                                  <?php endif; ?>
                                  <?php if($viewName=='pdf'): ?>
                                  <?php /**/ $addfile='images/pdfs.png' /**/ ?>
                                  <?php endif; ?>
                                   <?php if($viewName=='xls'): ?>
                                  <?php /**/ $addfile='images/xlss.png' /**/ ?>
                                  <?php endif; ?>
                                   <?php if($viewName=='xlsx'): ?>
                                  <?php /**/ $addfile='images/xlsxs.png' /**/ ?>
                                  <?php endif; ?>
                                   <?php if($viewName=='rtf'): ?>
                                  <?php /**/ $addfile='images/rtfs.png' /**/ ?>
                                  <?php endif; ?>
                                 <?php if($views->path): ?>
                               <a href="<?php echo e(URL::to('res_download', array($views->view_id))); ?>">  <img class="img-responsive" src="<?php echo e($addfile); ?>"  alt=""/></a>
                              <?php endif; ?>
                              </div> 

                            </td>
                            <td><h6><?php echo e($views->assets_name); ?></h6><br /><a href="<?php echo e(URL::to('res_download', array($views->view_id))); ?>" class="btn btn-history">View Resume</a>&nbsp;<a href="javascript:void(0)" title="Delete" class="btn btn-danger delete_video" data-id="<?php echo e($views->id); ?>">Remove History</a></td>

                        </tr>
                         <?php endforeach; ?>
                          <?php endif; ?>
                    </tbody>
                  </table>       
              </div>
            </div>
            <!--resume end-->
                
                
          </div>
            
        </div>
      </div>
    </div>
    <div id="view_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
        <div class="modal-dialog">
            <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title img-name"></h4>
                    </div>
                    <div class="modal-body">
                      <div class="form-horizontal">
                          <div class="form-group">
                               <div class="col-sm-12 text-center"><img src="" class="img-elem img-responsive"></div>
                          </div>
                          <div class="form-group">
                              <div class="col-md-12">
                                  <button data-dismiss="modal" class="btn-close btn delete-btn clear_form pull-right" type="button">Close</button>
                              </div>
                          </div>
                      </div>          
                   </div><!-- End of Modal body -->
            </div><!-- End of Modal content -->
        </div><!-- End of Modal dialog -->
    </div><!-- End of Profile Image Modal --> 
    
    <!--video model-->
    <!-- Modal -->
<div class="modal fade" id="popup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
  <div class="modal-dialog">
    <div class="modal-content">
         <iframe src="" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen width="600" height="400" id="modal-iframe"></iframe>
      <div class="modal-footer video-model-foot">
        <button type="button" class="btn-close btn delete-btn clear_form pull-right" id="modal-close" >Close</button>
      </div>
    </div>
  </div>
</div>
    
  </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script src="<?php echo e(asset('js/bootstrapValidator.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/maskedinput/jquery.maskedinput.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/bootbox.js')); ?>"></script>
<script src="<?php echo e(asset('js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/dataTables.bootstrap.js')); ?>"></script>
<script type="text/javascript">
    //for video popup
     $(document).on('click','.popup',function(){
      var atr_val=$(this).attr('view-id');
      var dataString = 'atr_val='+ atr_val +  '&_token=' + $("input[name=_token]").val();
       // alert(dataString);
                       $.ajax({
                              type: "POST",
                              url : "video_view",
                              data : dataString,
                              success : function(data){ }
                          },"json");
                          
                          $('#modal-iframe').attr('src',$(this).attr('iframe-src'));
                          $('#popup').modal('show'); 
                          
       
 });
 //video popup close
 $("#modal-close").click(function(){
        $('#modal-iframe').attr('src',"");
        $('#popup').modal('hide');
    })
    
 //picture popup   
   if($('.view_btn').length)
  {
    $(document).on('click','.view_btn',function(){
         var atr_val=$(this).attr('data-id');
          var atr_name=$(this).attr('data-title');
      $('#view_modal').modal('show');
        $('#view_modal .img-name').html(atr_name);
      $('#view_modal .img-elem').attr('src', $(this).attr('data-url'));
      $('#view_modal .assets_id_elem').val($(this).attr('data-id'));
        
         var dataString = 'atr_val='+ atr_val +  '&_token=' + $("input[name=_token]").val();
        
            $.ajax({
                              type: "POST",
                              url : "picture_view",
                              data : dataString,
                              success : function(data){//alert(data);
                              }
                          },"json");
                          
     
    });
  }
  
  //history delete functionality
   $(document).on('click','.delete_video',function(){
    var history_id = $(this).attr("data-id");
    bootbox.confirm("Are you sure, you want to delete this?", function(result) {
      if(result)
      location.href = '<?php echo e(url("history_delete/")); ?>/'+history_id;
    });  
  });
  
  //jquery data table
  $(document).ready(function() {
    $('#profile').DataTable( {
		"language": {
        "emptyTable":     "No profiles found"
    },
        responsive: true,
        "aLengthMenu": [[3, 6, 9, 12, 15, 25, 50, 75,-1], [3, 6, 9, 12, 15, 25, 50, 75, "All"]],
        "iDisplayLength": 3
    } );
    $('#video').DataTable( {
		"language": {
        "emptyTable":     "No videos found"
    },
        responsive: true,
         "aLengthMenu": [[3, 6, 9, 12, 15, 25, 50, 75,-1], [3, 6, 9, 12, 15, 25, 50, 75, "All"]],
        "iDisplayLength": 3
    } );
    $('#picture').DataTable( {
		"language": {
        "emptyTable":     "No pictures found"
    },
        responsive: true,
         "aLengthMenu": [[3, 6, 9, 12, 15, 25, 50, 75,-1], [3, 6, 9, 12, 15, 25, 50, 75, "All"]],
        "iDisplayLength": 3
    } );
    $('#resume').DataTable( {
		"language": {
        "emptyTable":     "No resumes found"
    },
        responsive: true,
         "aLengthMenu": [[3, 6, 9, 12, 15, 25, 50, 75,-1], [3, 6, 9, 12, 15, 25, 50, 75, "All"]],
        "iDisplayLength": 3
    } );
} );

</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>