<?php $__env->startSection('content'); ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Správa pokojů ve Vašem ubytování
            <a href="new_room">
                <button type="button" class="btn right_btn float_right">Vytvořit pokoj</button>
            </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">
                <table class="table">
                    <tr>
                        <th>Název pokoje</th>
                        <th>Počet lůžek</th>
                        <th>Cena</th>
                        <th>Typ</th>
                        <th>Upravit</th>
                        <th>Odstranit</th>
                    </tr>
                    <?php $__currentLoopData = $rooms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $room): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td>
                                <?php echo e($room->room_name); ?>

                            </td>
                            <td>
                                <?php echo e($room->beds); ?>

                            </td>
                            <td>
                                <?php echo e($room->price); ?>

                            </td>
                            <td>
                                <?php echo e($room->room_type); ?>

                            </td>
                            <td><?php echo e(Form::open(array('method'=>'post', 'route' => array('showEditRoom', $room->room_id)))); ?>

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

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

                            </td>

                            <td><?php echo e(Form::open(['route' => 'deleteRoom', 'class' => 'form-horizontal'])); ?>

                                <?php echo e(Form::hidden('room_id', $room->room_id)); ?>

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

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

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

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