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

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

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

<?php $__env->startSection('content'); ?>
<div class="nav-tabs-custom">
    <ul class="nav nav-tabs ui-sortable-handle">
        <li class="active">
            <a href="#tab-navigation" data-toggle="tab">
                <i class="fa fa-folder-open"></i> Navegação por pasta
            </a>
        </li>
        <li>
            <a href="#tab-list" data-toggle="tab">
                <i class="fa fa-list-ol"></i> Todos os documentos
            </a>
        </li>
    </ul>
    <div class="tab-content">
        <div class="chart tab-pane active" id="tab-navigation">
            <?php echo $__env->make('admin.documents.partials.navigation', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
        <div class="chart tab-pane" id="tab-list">
            <table id="table-documents" class="table table-bordered table-striped dataTable">
                <thead>
                    <tr>
                        <th style="width: 1%">#</th>
                        <th style="width: 1%"></th>
                        <th>Documento</th>
                        <th style="width: 1%">Tamanho</th>
                        <th style="width: 100px">Criado em</th>
                        <th style="width: 60px"></th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function () {
        $('#table-documents').dataTable({
            processing: true,
            ajax: {
                url: "<?php echo route('admin.documents.datatable'); ?>",
                type: "POST"
            },
            autoWidth: true,
            order: [[1, "desc"]],
            columnDefs: [
                {orderable: false, targets: -1},
            ]
        });

        $('#table-documents-nav').dataTable({
            processing: true,
            ajax: {
                url: "<?php echo route('admin.documents.datatable.nav', $folder->id); ?>",
                type: "POST"
            },
            autoWidth: true,
            order: [[1, "desc"]],
            columnDefs: [
                {orderable: false, targets: -1},
            ]
        });
    });
</script>
<?php $__env->stopSection(); ?>