<div class="panel panel-default panel-navigation has-breadcrumb">
    <div class="panel-body">
        <?php if($curFolder->id): ?>
        <a href="<?php echo route('admin.documents.index', $curFolder->parent_id); ?>" class="back-button pull-left">
            <span class="fa fa-angle-left"></span>
        </a>
        <?php endif; ?>
        <div class="pull-left">
            <h4><span class="fa fa-folder text-yellow"></span> <?php echo $curFolder->title; ?></h4>
            <ol class="breadcrumb hidden-xs">
                <?php foreach($folderBreadcrumb as $breadcrumb): ?>
                    <?php if($breadcrumb['id'] == $curFolder->id): ?>
                    <li class="active"><?php echo $breadcrumb['title']; ?></li>
                    <?php else: ?>
                    <li><a href="<?php echo route('admin.documents.index', $breadcrumb['id']); ?>"><?php echo $breadcrumb['title']; ?></a></li>
                    <?php endif; ?>
                <?php endforeach; ?>
            </ol>
        </div>
        <div class="pull-right">
            <?php if(Auth::user()->can("documents_create")): ?>
                <a href="<?php echo route('admin.documents.edit', array($curFolder->id, '')); ?>" class="btn btn-sm btn-success margin-top-5 margin-right-5 pull-right" data-toggle="modal" data-target="#modal-remote"><i class="fa fa-file"></i> Novo Documento</a>
            <?php endif; ?>

            <?php if(Auth::user()->can("documents_folder_create")): ?>
                <a href="#" class="btn btn-sm btn-success margin-top-5 margin-right-5 pull-right" data-toggle="modal" data-target="#modal-create-folder"><i class="fa fa-folder"></i> Nova Pasta</a>
                <?php echo $__env->make('admin.modals.documents.createFolder', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <?php endif; ?>
        </div>
    </div>
</div>
<div class="box-body table-responsive">
    <table id="table-documents-nav" 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>
                <?php if(Auth::user()->can("documents_edit") 
                    or Auth::user()->can("documents_remove")
                    or Auth::user()->can("documents_folder_edit")
                    or Auth::user()->can("documents_folder_remove")): ?>
                <th style="width: 60px"></th>
                <?php endif; ?>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>