<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Recenze na ubytování: <?php echo e($accommodation->accommodation_name); ?>

            <a class="float_right " href="<?php echo e(url('create_review/' . $accommodation->accommodation_id)); ?>">
                <div class="btn right_btn">Vytvořit recenzi</div>
            </a>
        </div>
        <div class="panel-body">
            <?php echo $__env->make('flash::message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <div class="table-responsive">
                <?php if(!$reviews->isEmpty()): ?>
                    <table class="table">
                        <?php $__currentLoopData = $reviews; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $review): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="panel panel-primary">
                                <div class="panel panel-heading">
                                    <?php echo e($review->customer_fname); ?> <?php echo e($review->customer_lname); ?> (<?php echo e($review->date); ?>)
                                    <div class="float_right">
                                        <?php if(Auth::user()->accommodation_id == $accommodation->accommodation_id): ?>
                                            <?php echo e(Form::open(array('method'=>'delete', 'class' => 'float_right', 'route' => array('deleteReview', $review->review_id)))); ?>


                                            <?php echo e(Form::submit('Odstranit', array('class'=>'btn btn-primary'))); ?>

                                            <?php echo e(Form::close()); ?>

                                        <?php endif; ?>
                                    </div>
                                </div>
                                <div class="panel panel-body">
                                    <?php echo e($review->review_text); ?>

                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </table>
                <?php else: ?>
                    <div class="panel-info">
                        V tuto chvíli nejsou k ubytování vytvořeny žádné recenze
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

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