<?php $__env->startSection('css'); ?>
<?php echo Minify::stylesheet('/css/socialAction.css')->withFullUrl(); ?>

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

<?php $__env->startSection('title'); ?>
Listado de proyectos - <?php echo e($name); ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('description'); ?>
Listados de los proyectos en donde colabora Radio ECCA.
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<?php echo Breadcrumbs::render('social-action-category-project', $name); ?>

<div class="container">
   <div class="titulo_categoria">
      <span>Acción Social</span>
      <div class="subtitulo_categoria"><?php echo e($name); ?></div>
   </div>
   <div class="row">
      <div class="titulo col-md-12">
         Listado de proyectos - <?php echo e($name); ?>

      </div>
   </div>
   <div class="col-md-8">
      <div class="row">
         Selección de año:
      </div>
      <div class="row">
         <ul class="nav nav-pills">
            <?php foreach($years as $year): ?>
               <?php if( $year['year'] == $max['year'] ): ?>
                  <li role="presentation" class="active"><a class="yearSelector" data="<?php echo e($year['year']); ?>"><?php echo e($year['year']); ?></a></li>
               <?php else: ?>
                  <li role="presentation"><a class="yearSelector" data="<?php echo e($year['year']); ?>"><?php echo e($year['year']); ?></a></li>
               <?php endif; ?>
            <?php endforeach; ?>
         </ul>
      </div>
      <?php foreach($listProjects as $key => $project): ?>
         <?php if( $project->getYear()== $max['year'] ): ?>
            <div class="lista_proyectos row" data='<?php echo e($project->getYear()); ?>'>
         <?php else: ?>
            <div class="lista_proyectos row oculto" data='<?php echo e($project->getYear()); ?>'>
         <?php endif; ?>
            <div class="descripcion_proyecto">
               <a href="<?php echo e(route('social-action-detail-project', [ 'id'=>$project->getId() ])); ?>"><?php echo e($project->getTitle()); ?></a>
            </div>
         </div>
         <?php endforeach; ?>
      </div>
       <div class="spacer"></div>
      <div class="col-md-4">
         <img src="<?php echo e(asset($image)); ?>" class="img-responsive image-list-project">
      </div>
   </div>
   <div class="spacer"></div>
   <!-- /.row -->
   <?php $__env->stopSection(); ?>

   <?php $__env->startSection('js-code-post'); ?>
   <?php echo Minify::javascript('/js/custom.js')->withFullUrl(); ?>

   <script>
      $(document).ready(function () {
         $(".yearSelector").click(function () {
            var year = $(this).attr('data');
            $(".yearSelector").parent().removeClass('active');
            $(this).parent().addClass('active');

            $(".lista_proyectos").removeClass('oculto');

            $(".lista_proyectos").each(function () {
               if (year !== $(this).attr('data'))
                  $(this).addClass('oculto');
            });

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


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