

<?php $__env->startSection('content'); ?>

<?php if(session('slide_create_msg')): ?>
<div class="alert alert-success">
    <?php echo e(session('slide_create_msg')); ?>

</div>
<?php endif; ?>

<h2 class="mb-3"> <?php echo e(awtTrans('كل الاعلانات')); ?></h2>
<form action="<?php echo e(route('admin.slider.bluck-delete')); ?>" method="post">
    <?php echo csrf_field(); ?>
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary text-left">
                <button type="submit" style="display: none;" title="<?php echo e(awtTrans('delete')); ?>" class="btn btn-danger bluck-button btn-circle btn-sm">
                    <i class="fas fa-trash"></i>
                </button>
                <a href="<?php echo e(route('admin.sliders.create')); ?>" title="<?php echo e(awtTrans('add')); ?>" class="btn btn-primary btn-circle btn-sm">
                    <i class="fas fa-plus"></i>
                </a>
            </h6>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered table-striped" id="dataTablesliders" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th><?php echo e(awtTrans('Delete')); ?></th>
                            <th><?php echo e(awtTrans('Title Arabic')); ?></th>
                            <th><?php echo e(awtTrans('Title English')); ?></th>
                            <th><?php echo e(awtTrans('Description Arabic')); ?></th>
                            <th><?php echo e(awtTrans('Description English')); ?></th>
                            <th><?php echo e(awtTrans('Image')); ?></th>
                            <th><?php echo e(awtTrans('Created At')); ?> </th>
                            <th><?php echo e(awtTrans('Actions')); ?> </th>
                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <th><?php echo e(awtTrans('Delete')); ?></th>
                            <th><?php echo e(awtTrans('Title Arabic')); ?></th>
                            <th><?php echo e(awtTrans('Title English')); ?></th>
                            <th><?php echo e(awtTrans('Description Arabic')); ?></th>
                            <th><?php echo e(awtTrans('Description English')); ?></th>
                            <th><?php echo e(awtTrans('Image')); ?></th>
                            <th><?php echo e(awtTrans('Created At')); ?> </th>
                            <th><?php echo e(awtTrans('Actions')); ?> </th>
                        </tr>
                    </tfoot>
                    <tbody>
                        <?php if(!empty($sliders)): ?>
                        <?php $__currentLoopData = $sliders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slider): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><input type="checkbox" name="ids[]" value="<?php echo e($slider->id); ?>" class="from-control bluck-delete"> </td>
                            <td><a href="<?php echo e(route('admin.sliders.edit', $slider->id)); ?>"><?php echo e($slider->title_ar); ?></a></td>
                            <td><a href="<?php echo e(route('admin.sliders.edit', $slider->id)); ?>"><?php echo e($slider->title_en); ?></a></td>
                            <td><?php echo e(strip_tags($slider->desc_ar)); ?></td>
                            <td><?php echo e(strip_tags($slider->desc_en)); ?></td>
                            <?php if($slider->type == 'image'): ?>
                            <td><img height="44" src="<?php echo e($slider->photo); ?>" alt=""></td>
                            <?php elseif($slider->type == 'device'): ?>
                            <td>
                                <video width="400px" controls>
                                    <source src="<?php echo e(url($slider->photo)); ?>" type="video/mp4">
                                    <source src="<?php echo e(url($slider->photo)); ?>" type="video/ogg">
                                </video>
                            </td>
                            <?php else: ?>
                            <?php
                            $url = $slider->photo;
                            $url_components = parse_url($url);
                            parse_str($url_components['query'], $params);
                            $key = $params['v'];
                            ?>
                            <td><iframe width="400" height="200" src="https://www.youtube.com/embed/<?php echo e($key); ?>" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></td>
                            <?php endif; ?>
                            <td><?php echo e($slider->created_at->diffForHumans()); ?></td>
                            <td>
                                <a href=" <?php echo e(route('admin.sliders.destroy', $slider->id)); ?>" data-id="<?php echo e($slider->id); ?>" class="btn btn-danger btn-circle btn-sm item-delete">
                                    <i class="fas fa-trash"></i>
                                </a>
                                <a href="#" class="btn btn-info btn-circle btn-sm" data-toggle="modal" data-target="#exampleModalLong<?php echo e($slider->id); ?>">
                                    <i class="fas fa-eye"></i>
                                </a>
                                <a href="<?php echo e(route('admin.sliders.edit', $slider->id)); ?>" class="btn btn-success btn-circle btn-sm">
                                    <i class="fas fa-edit"></i>
                                </a>
                            </td>
                        </tr>
                        <!-- Modal -->
                        <div class="modal fade" id="exampleModalLong<?php echo e($slider->id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <h5 class="modal-title" id="exampleModalLongTitle"><?php echo e(awtTrans('Details')); ?></h5>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                            <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body">
                                        <div class="row">
                                            <div class="col-lg-12">
                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('رابط الاعلان')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <a href="<?php echo e($slider->link); ?>"><?php echo e($slider->link); ?></a>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('Title Arabic')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <?php echo e($slider->title_ar); ?>

                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('Title English')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <?php echo e($slider->title_en); ?>

                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('Description Arabic')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <?php echo e(strip_tags($slider->desc_ar)); ?>

                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('Description English')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <?php echo e(strip_tags($slider->desc_en)); ?>

                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-lg-5">
                                                        <b><?php echo e(awtTrans('Image')); ?> : </b>
                                                    </div>
                                                    <div class="col-lg-7">
                                                        <img height="44" src="<?php echo e($slider->photo); ?>" alt="">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo e(awtTrans('إغلاق')); ?></button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</form>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/sitejadara/public_html/ics/resources/views/admin/sliders/index.blade.php ENDPATH**/ ?>