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

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

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Administração
</li>
<li class="active">
    Utilizadores
</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 Utilizadores</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.users.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-user-plus"></i> Novo Utilizador</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-users" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Nome</th>
                            <th>Email</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-users').dataTable({
            processing: true,
            serverSide: true,
            "ajax": {
                url: "<?php echo route('admin.users.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [[1, "asc"]],
            "columnDefs": [
                { "orderable": false, "targets": -1 }
              ]
        });

        $('#sidebar-administracao').addClass('active');
    });

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