{% import "/sistema/vistas/input/input.html.php" as forms %}
<table class="table table-bordered table-striped tableOption" id="tabla{{ controlador }}">
    <thead>
        <tr>
            <th>{{ forms.check('usuarios', usuario.usuarioID, 'checkUsuarios', 'chk-seleccionarTodosUsuarios' )  }}</th>
            <th>Nombre Usuario</th>
            <th>Tipo de Usuario</th>
            <th>Ultimo Ingreso</th>
            <th>Estado</th>
            <th>Administrador</th>
        </tr>
    </thead>
    <tbody>
        {% for usuario in usuarios %}
            <tr>
                <td>
                    {{ forms.check('usuarios', usuario.usuarioID, 'checkUsuarios' )  }}    
                </td>
                <td>{{ usuario.usuarioNOMBRE }}</td>
                <td>
                    {% if  usuario.colaboradorID == null and usuario.aplicacionID == null %}
                        EL USUARIO PRESENTA ERROR EN LA CREACIÓN
                    {% elseif usuario.aplicacionID == null %}
                        COLABORADOR
                    {% else %}
                        APLICACIÓN
                    {% endif %}
                </td>
                <td>{{ usuario.usuarioULTINGRESO }}</td>
                <td>{{ usuario.usuarioESTADO }}</td>
                <td>{{ usuario.usuarioADMINISTRADOR }}</td>
            </tr>
        {% endfor %}
    </tbody>
    <tfoot>
    </tfoot>
</table>

<script>
    $(document).ready(function () {
        checkBoxSICAM('.checkUsuarios');
        activarSeleccionarTodos("chk-seleccionarTodosUsuarios", "checkUsuarios");
    });
    $('.tableOption').DataTable();
</script>
