<?php if (isset($component)) { $__componentOriginal783808d09c489a73db593e82465042f2d47695ce = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\PortalLayout::class, [] + (isset($attributes) ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('portal-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $constructor = (new ReflectionClass(App\View\Components\PortalLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>

    <section id="breadcrumbs" class="breadcrumbs">
        <div class="container">

            <div class="d-flex justify-content-between align-items-center">
                <h2>Publications</h2>
                <ol>
                    <li><a href="<?php echo e(route('portal.home')); ?>">Accueil</a></li>
                    <li>Publications</li>
                </ol>
            </div>

        </div>
    </section>

    <section id="document" class="pricing">
        <div class="container" data-aos="fade-up">
            <div class="d-flex gap-3 mb-4">
                <div class="col-lg-6"></div>
                <select name="forum_id" class="form-select" onchange="window.location.assign('<?php echo e(route('portal.publications').'/forum/'); ?>'+this.value)">
                    <option value="">Tous les forums</option>
                    <?php $__currentLoopData = $forums; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $forum): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($forum->id); ?>" <?php if($type=='forum' and $forum->id==$id): ?> selected <?php endif; ?>><?php echo e($forum->annee); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <select name="commune_id" class="form-select" onchange="window.location.assign('<?php echo e(route('portal.publications').'/commune/'); ?>'+this.value)">
                    <option value="">Toutes les communes</option>
                    <?php $__currentLoopData = $communes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $commune): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($commune->id); ?>" <?php if($type=='commune' and $commune->id==$id): ?> selected <?php endif; ?>><?php echo e($commune->name); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </div>
            
            <div class="col-lg-12">
                <div class="row m-0">
                    <?php $__currentLoopData = $participations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $participation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <?php $__currentLoopData = $participation->publications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $publication): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-lg-4 d-flex flex-column mb-4">
                            <div class="box h-100 bg-light p-3">
                                <div class="d-flex gap-2 mb-3">
                                    <div class="col-4"><a href="<?php echo e(route('portal.forums.show', $publication->participation->forum)); ?>"><?php echo e($publication->participation->forum->annee); ?></a></div>
                                    <div class="col-8"><a href="<?php echo e(route('portal.communes.show', $publication->participation->commune)); ?>"><?php echo e($publication->participation->commune->name); ?></a></div>
                                </div>
                                <iframe src="<?php echo e(asset('storage/publications/' . $publication->filename)); ?>" frameBorder="0"></iframe>

                                <div class="py-3">
                                    <a class="btn-buy" href="<?php echo e(asset('storage/publications/' . $publication->filename)); ?>">Télécharger</a>
                                </div>
                                <p class="mb-0"><?php echo e($publication->title); ?></p>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>

        </div>
    </section>


 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal783808d09c489a73db593e82465042f2d47695ce)): ?>
<?php $component = $__componentOriginal783808d09c489a73db593e82465042f2d47695ce; ?>
<?php unset($__componentOriginal783808d09c489a73db593e82465042f2d47695ce); ?>
<?php endif; ?><?php /**PATH /var/www/html/beta/elv3/resources/views/portal/publications/index.blade.php ENDPATH**/ ?>