<!DOCTYPE html>
<html lang="es">
<head>
    <title>Administrar Usuarios | %%_prontus_id%%</title>
    %%MACRO(common/head.html)%%
</head>
<body class="bodysite full-height-width nextgray monlight pt10" data-prontus-id="%%_prontus_id%%">
    <!-- navbar -->
    %%MACRO(common/navbar.html)%%
    <!-- /navbar -->
    <!-- container-fluid -->
    <div class="full-height pad-top50 pad-rig15 pad-bot0 container-fluid padding-5 over-hidden-x">
            <div class="full-height row">
            <!-- sidebar -->
            %%MACRO(common/sidebar.html)%%
            <!-- /sidebar -->
            <!-- contenido -->
            <div class="pt9 full-height inshadowleft pad-top-bot25 pad-lef-rig25 nextgray col-xs-24 col-sm-20 col-md-20 col-lg-21 admin-port">
                <div class="row rowfix">
                    <div class="pad-lef-rig0 col-xs-24">
                        <h3 class="pull-left">Administrar Usuarios</h3>
                        <h5 class="pull-right" id="lastmod"></h5>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-24">
                        <div class="alert alert-danger hide-element" id="concurrency"></div>
                    </div>
                </div>

                <!-- INICIO CONTENIDO PRINCIPAL -->
                <div class="row rowfix">
                    <div class="pad-lef-rig0 col-xs-24">
                        <div class="content">
                            <div class="pad-top-bot10  pad-rig10 row rowfix">
                                <div class="col-xs-24 col-lg-7 padding-5">
                                    <button class="hovwhite radius15 noborder txtnextwhite pad-top-bot7 pad-lef-rig20 int-nextgray4 nextgray4 btn btn-sm pull-left margin-bottom-5 margin-right-5" href="#" id="fichaNuevoUsuario" data-userid="">
                                        <span class="glyphicon glyphicon-plus"> </span>
                                        <span>Agregar nuevo</span>
                                    </button>
                                    <!--ADMIN-->
                                    <button class="hovwhite radius15 noborder txtnextwhite pad-top-bot7 pad-lef-rig20 int-nextgray4 nextgray4 btn btn-sm pull-left margin-bottom-5 margin-right-5" id="fichaUsuarioAdmin" href="#" data-userid="1">
                                        <span class="glyphicon glyphicon-user"> </span>
                                        <span>Cuenta de Administraci&oacute;n</span>
                                    </button>
                                    <!--/ADMIN-->
                                </div>
                                <div class="col-xs-24 col-lg-17 padding-5">
                                    <div class="row">
                                        <div class="col-xs-24 col-md-12 col-lg-5 padding-5">
                                            <input type="text" id="filtro_usuario" class="form-control h35px noradius input-search" placeholder="Usuario">
                                        </div>
                                        <div class="col-xs-24 col-md-12 col-lg-5 padding-5">
                                            <input type="text" id="filtro_nombre" class="form-control h35px noradius input-search" placeholder="Nombre">
                                        </div>
                                        <div class="col-xs-24 col-md-12 col-lg-5 padding-5">
                                            <input type="text" id="filtro_correo" class="form-control h35px noradius input-search" placeholder="Correo">
                                        </div>
                                        <div class="col-xs-24 col-md-12 col-lg-4 padding-5">
                                            <select id="filtro_perfil" class="form-control input-sm noradius h35px input-search">
                                                <option value="0">Perfil</option></option>
                                                <option value="1">Administrador</option>
                                                <option value="2">Editor</option>
                                                <option value="3">Redactor</option>
                                            </select>
                                        </div>
                                        <div class="col-xs-24 col-md-12 col-lg-5 padding-5">
                                            <input type="text" id="filtro_expiracion" class="form-control noradius h35px w75 input-search pull-left" placeholder="Expiración">
                                            <select id="comparador_expiracion" class="form-control noradius h35px w25 input-search">
                                                <option value=""></option></option>
                                                <option value="=">=</option></option>
                                                <option value="<"><</option>
                                                <option value=">">></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="pad-top-bot10 pad-lef-rig0 txtnextgray3 noradius noborder nextgray3 mar-bot0 list-group list-header">
                                <div class="row rowfix txtnextwhite">
                                    <div class="col-xs-1">ID</div>
                                    <div class="col-xs-4">Nombre de usuario</div>
                                    <div class="col-xs-4">Nombre Completo</div>
                                    <div class="col-xs-4">Correo Electr&oacute;nico</div>
                                    <div class="col-xs-3">Expiraci&oacute;n</div>
                                    <div class="col-xs-3">Perfil</div>
                                    <div class="col-xs-3">Acciones</div>
                                    <div class="col-xs-2">Activo</div>
                                </div>
                            </div>
                            <div class="autoscrollver over-hidden-x" id="user-list"></div>
                        </div>
                    </div>
                </div>
                <!-- FIN CONTENIDO PRINCIPAL -->
            </div>
            <!-- /contenido .admin-port -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /container-fluid -->

    <!-- Modal -->
    <div class="modal fade" id="modalUsuario" tabindex="-1" role="dialog" aria-labelledby="modalUsuarioLabel" data-keyboard="false" data-backdrop="static">
        <div class="modal-dialog" role="document">
            <div class="nextgray pad-top-bot0 pad-lef-rig20 noradius bordergray2 modal-content" id="modalUsuarioContenido">
            </div>
        </div>
    </div>
    <!-- templates -->
<script id="tpl_list" type="text/template">
    <div class="row rowfix pad-top-bot5" id="item-user-{{_id}}" data-usr="{{_usr}}" data-nom="{{_nom}}" data-email="{{_email}}" data-fec_exp="{{_fec_exp}}" data-fec_exp_format="{{_fec_exp_format}}" data-perfil="{{_perfil}}" data-perfil_id="{{_perfil_id}}">
        <div class="col-xs-1">{{_id}}</div>
        <div class="col-xs-4 word-break-all">{{_usr}}</div>
        <div class="col-xs-4 word-break-all">{{_nom}}</div>
        <div class="col-xs-4 over-hidden-x">
            <a href="mailto:{{_email}}">{{_email}}</a>
        </div>
        <div class="col-xs-3 word-break-all">{{_fec_exp_format}}</div>
        <div class="col-xs-3 word-break-all">{{_perfil}}</div>
        <div class="col-xs-3">
            <button data-userid="{{_id}}" title="Editar Usuario" class="nextyellow postop0 iblock mar-lef-rig2 w25px h25px noborder cen hovwhite circleradius noborder pad-top3 pad-bot4 btn btn-xs cargarFicha {{_activo}}"> <span class="int-txtnextwhite txtnextwhite glyphicon glyphicon-pencil"> </span>
            </button>
            <button data-userid="{{_id}}" title="Borrar Usuario" class="nextred postop0 iblock mar-lef-rig2 w25px h25px noborder cen hovwhite circleradius noborder pad-top3 pad-bot4 btn btn-xs borrarUsuario {{_activo}}"><span class="int-txtnextwhite txtnextwhite glyphicon glyphicon-remove"> </span>
            </button>
            <button data-userid="{{_id}}" title="Recuperar Usuario" class="nextblue postop0 iblock mar-lef-rig2 w25px h25px noborder cen hovwhite circleradius noborder pad-top3 pad-bot4 btn btn-xs recuperarUsuario {{_borrado}}"><span class="int-txtnextwhite txtnextwhite fas fa-check"> </span>
            </button>
        </div>
        <div class="col-xs-2">{{_estado}}</div>
    </div>
</script>
<script>
$(document).ready(function() {
    UsrAdmin.init(Admin.prontus_id);
});
</script>
    %%MACRO(common/footer_prontus.html)%%
</body>
</html>
