<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('flash::message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <?php $__currentLoopData = $accommodations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $accommodation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="row">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <?php echo e($accommodation->accommodation_name); ?>

                    <?php if($accommodation->rating != 0): ?>
                        <span class="rating">
                            <a href="<?php echo e(url('reviews_list/' . $accommodation->accommodation_id)); ?>">
                                (<?php echo e($accommodation->rating); ?>)
                                <span class="glyphicon glyphicon-star" aria-hidden="true">
                                </span>
                            </a>
                        </span>
                    <?php endif; ?>

                    <div class="float_right">
                        <a href="<?php echo e(url('detail/' . $accommodation->accommodation_id)); ?>">
                            <div class="btn right_btn">Zobrazit detail</div>
                        </a>
                    </div>
                </div>
                <div class="panel-body">
                    <div class="panel-body"><?php echo e($accommodation->accommodation_description); ?></div>
                    <div class="float_left col-md-8">
                        <table class="table col-md-7 float_left">
                        <?php if($rooms != null): ?>
                                <tr>
                                    <td class="col-md-3"><b>Počet pokojů: </b></td>
                                    <td class="col-md-4 "><?php echo e($rooms[$accommodation->accommodation_id]); ?></td>
                                </tr>
                            <?php endif; ?>
                            <?php if($beds != null): ?>
                                <tr>
                                    <td class="col-md-3"> <b>Počet lůžek: </b></td>
                                    <td class="col-md-4"><?php echo e($beds[$accommodation->accommodation_id]); ?></td>
                                </tr>
                            <?php endif; ?>
                            <?php if($equipment != null): ?>
                                <tr>
                                    <td class="col-md-3"><b>Vybavení:</b> </td>
                                    <td class="col-md-4 float_right"><?php $__currentLoopData = $equipment[$accommodation->accommodation_id]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $equip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <b> > </b> <?php echo e($equip->equipment_name); ?>

                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </td>
                                </tr>
                            <?php endif; ?>
                        </table>
                    </div>
                    <div class="float_right col-md-4">
                        <?php if($image[$accommodation->accommodation_id] != null): ?>
                            <img alt="playground" class="float_right image_width" src="data:image/jpeg;base64,<?php echo e(base64_encode($image[$accommodation->accommodation_id]->image)); ?>">
                        <?php else: ?>
                            <img alt="playground" class="float_right col-md-8" src="<?php echo e(asset('images/img_placeholder.png')); ?>">
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__env->stopSection(); ?>

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