<?php $__env->startSection('content'); ?>
    <?php echo Html::style('css/library.css'); ?>

    <div class="container">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="panel panel-default transparent">
                    <div class="panel-heading">Libros</div>

                    <?php if(Session::has('message')): ?>

                        <p class="alert alert-success"><?php echo e(Session::get('message')); ?></p>

                    <?php endif; ?>

                    <div class="panel-body">

                        <?php echo Form::model(Request::only(['title', 'theme', 'text', 'filter']), ['route' => 'library.index', 'method' => 'GET', 'class' => 'navbar-form navbar-left pull-right', 'role' => 'search' ]); ?>

                        <div class="form-group">
                            <p>
                                <?php echo Form::text('title', null, ['class' => 'form-control', 'placeholder' => 'Titulo del libro']); ?>

                                <?php echo Form::select('theme', config('options.themesBooks'), null, ['class' => 'form-control']); ?>

                            </p>
                            <p>
                                <?php echo Form::text('text', null, ['class' => 'form-control', 'placeholder' => '']); ?>

                                <?php echo Form::select('filter', config('options.filtersBooks'), null, ['class' => 'form-control']); ?>

                            </p>
                        </div>
                        <button type="submit" class="btn btn-default">Buscar</button>
                        <?php echo Form::close(); ?>

                        <div class="row" style="padding-left: 2%;">
                            <p>Hay <?php echo e($libros->total()); ?> libros.</p>
                        </div>
                        <?php echo $__env->make('libros.partials.library', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php echo $libros->appends(Request::only(['title', 'theme', 'text', 'filter']))->render(); ?>

                    </div>
                </div>
            </div>
        </div>
    </div>


<?php $__env->stopSection(); ?>

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