<?php $__env->startSection('title'); ?>
Galeria
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Galeria
</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box no-border">
            <div class="box-header">
                <h3 class="box-title">Lista de Álbuns</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.galeria.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Novo Álbum</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-gallery" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th></th>
                            <th>Título</th>
                            <th>Descrição</th>
                            <th>Fotos</th>
                            <th>Criado</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function () {
        $('#table-gallery').dataTable({
            processing: true,
            serverSide: true,
            "ajax": {
                url: "<?php echo route('admin.galeria.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [0, "desc"],
            columns: [
                {data: 'id', name: 'id'},
                {data: 'photo', name: 'photo', orderable: false, searchable: false, class:'text-center width-1'},
                {data: 'titulo', name: 'titulo'},
                {data: 'descricao', name: 'descricao'},
                {data: 'count_fotos', name: 'count_fotos'},
                {data: 'created_at', name: 'created_at'},
                {data: 'actions', name: 'actions', orderable: false, searchable: false},
            ]
        });
    });
</script>
<?php $__env->stopSection(); ?>