<div ng-app="evaluacionesApp" ng-controller="evaluacionesController as vm" ng-init="vm.init(false)">
    <p>
        <strong>Evaluaciones de Desempeño </strong>
        es el análisis sistemático y objetivo que se 
        realiza a través de la aplicación de Términos de 
        Referencia a Programas Presupuestarios, Actividades 
        Institucionales Específicas, 
        Programas y Proyectos de Inversión, y gasto federalizado 
        programable.
    </p>

    <h3>Búsqueda por Programa Anual de Evaluación</h3>
    <div class="row">
    <div class="col" ng-if="vm.esAdmin">
        <label for="ejercicio">PAE</label>
        <input id="ejercicio" type="number" 
        class="form-control"
            min="2000" max="2050" 
            ng-model="vm.filtros.ejercicio_fiscal">
    </div>
    <div class="col" ng-if="!vm.esAdmin" >
        <label for="ejercicio">PAE</label>
        <select class="form-control" 
        ng-change="vm.getTiposEvaluaciones()"
        ng-model="vm.filtros.ejercicio_fiscal"
            ng-options="item.ejercicio_fiscal as item.ejercicio_fiscal for item in vm.ejercicios"></select>
    </div>
    <div class="col">
        <label for="tipo_evaluacion">Tipo de evaluación</label>
        <select id="tipo_evaluacion" 
        class="form-control"
            ng-options="item.id as item.nombre for item in vm.tipos_evaluacion"
            ng-model="vm.filtros.tipo_evaluacion"></select>
    </div>
    <div class="col">
        <label>&nbsp;</label>
            <a class="button button-primary btn btn-primary" 
            ng-click="vm.get_evaluaciones()">
                Buscar
            </a>
    </div>
</div>
    <table class="tabla-pbr tabla-pe table wp-list-table widefat">
    <thead>
        <tr>
            <th>Clave de programa</th>
            <th>Programa</th>
            <th>Ente público</th>  
            <th>Nombre de la evaluación</th>
            <th>Informe de evaluación</th>
            <th>Anexo Difusión de la Evaluación</th>
            <th>Posicionamiento Institucional</th>
            <th>PAMGE</th>
            <th ng-if="vm.esAdmin"></th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="e in vm.evaluaciones">
            <td>
                {{ e.clave_programa }}
            </td>
            <td>
                {{ e.programa }}
            </td>
            <td>
                {{ e.ente_publico }}
            </td>
            <td>
                {{ e.nombre_evaluacion }}
            </td>
            <td>
                <div ng-if="e.link_informe_evaluacion.length > 0">
                        <a href="{{ e.link_informe_evaluacion }}" 
                            target="_blank">
                            
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                            class="img-link-descarga"
                                ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('pdf')"
                            alt="">
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                                class="img-link-descarga"
                                ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('xlsx') || e.link_informe_evaluacion.toLowerCase().endsWith('csv') || e.link_informe_evaluacion.toLowerCase().endsWith('xls')"
                            alt="">
                            <br>
                            <span>
                                Informe
                            </span>
                        </a>
                    </div>

                    <div ng-if="e.link_ficha_evaluacion.length > 0">
                        <a href="{{ e.link_ficha_evaluacion }}" 
                            target="_blank">
                            
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                            class="img-link-descarga"
                                ng-if="e.link_ficha_evaluacion.toLowerCase().endsWith('pdf')"
                            alt="">
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                                class="img-link-descarga"
                                ng-if="e.link_ficha_evaluacion.toLowerCase().endsWith('xlsx') || e.link_ficha_evaluacion.toLowerCase().endsWith('csv') || e.link_ficha_evaluacion.toLowerCase().endsWith('xls')"
                            alt="">
                            <br>
                            <span>
                                Ficha
                            </span>
                        </a>
                    </div>
<!--                     
                <a href="{{ e.link_informe_evaluacion }}" 
                    target="_blank"
                    ng-if="e.link_informe_evaluacion.length > 0">

                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                    class="img-link-descarga"
                        ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('pdf')"
                    alt="">
                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                        class="img-link-descarga"
                        ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('xlsx') || e.link_informe_evaluacion.toLowerCase().endsWith('csv') || e.link_informe_evaluacion.toLowerCase().endsWith('xls')"
                    alt="">
                </a> -->
            </td>
            <td>
                <a href="{{ e.link_anexo_difusion }}" 
                    target="_blank"
                    ng-if="e.link_anexo_difusion.length > 0">

                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                    class="img-link-descarga"
                        ng-if="e.link_anexo_difusion.toLowerCase().endsWith('pdf')"
                    alt="">
                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                        class="img-link-descarga"
                        ng-if="e.link_anexo_difusion.toLowerCase().endsWith('xlsx') || e.link_anexo_difusion.toLowerCase().endsWith('csv') || e.link_anexo_difusion.toLowerCase().endsWith('xls')"
                    alt="">
                </a>
            </td>
            <td>
                <a href="{{ e.link_posicionamiento_institucional }}" 
                    target="_blank"
                    ng-if="e.link_posicionamiento_institucional.length > 0">

                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                    class="img-link-descarga"
                        ng-if="e.link_posicionamiento_institucional.toLowerCase().endsWith('pdf')"
                    alt="">
                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                        class="img-link-descarga"
                        ng-if="e.link_posicionamiento_institucional.toLowerCase().endsWith('xlsx') || e.link_posicionamiento_institucional.toLowerCase().endsWith('csv') || e.link_posicionamiento_institucional.toLowerCase().endsWith('xls')"
                    alt="">
                </a>
            </td>
            <td>
                <a href="{{ e.link_pamge }}" 
                    target="_blank"
                    ng-if="e.link_pamge.length > 0">

                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/pdf.png" 
                    class="img-link-descarga"
                        ng-if="e.link_pamge.toLowerCase().endsWith('pdf')"
                    alt="">
                    <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/plantillas/../../img/excel.png" 
                        class="img-link-descarga"
                        ng-if="e.link_pamge.toLowerCase().endsWith('xlsx') || e.link_pamge.toLowerCase().endsWith('csv') || e.link_pamge.toLowerCase().endsWith('xls')"
                    alt="">
                </a>
            </td>
            <td ng-if="vm.esAdmin">
                <a href="javascript:" class="button button-primary" ng-click="vm.modificar(e)" >
                    Modificar
                </a>
                <a href="javascript:" class="button button-primary" ng-click="vm.eliminar(e)" >
                    Eliminar
                </a>
            </td>
        </tr>
        <tr ng-if="vm.evaluaciones.length == 0">
            <td colspan="8" >
                No se encontraron resultados
            </td>
        </tr>
        <tr ng-if="vm.evaluaciones == null || vm.cargandoEvaluaciones">
            <td colspan="8" style="text-align: center">
                <div class="lds-default" ><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
                <div>
                Cargando información...
                </div>
            </td>
        </tr>
    </tbody>
</table>
    <h3>Búsqueda por Ente Público</h3>

    <div class="row" >
        <div class="col">
            <label for="tipo_ente">Tipo de Ente Público</label>
            <select id="tipo_ente" 
            class="form-control"
                ng-change="vm.tipo_change(event)"
                ng-options="item.id as item.descripcion for item in vm.tipos_entes"
                ng-model="vm.filtros.tipo_ente"></select>
        </div>

        <div class="col">
            <label for="ente">Ente Público</label>
            <oware-combobox
            items="vm.entes"
                    display="ente_publico"
                    value="ente_publico"
                    placeholder="Escribe para buscar..."
                    ng-model="vm.filtros.ente_publico">
            </oware-combobox>
            <!-- <select id="ente" 
            class="form-control"
                ng-options="item.ente_publico as item.ente_publico for item in vm.entes"
                ng-model="vm.filtros.ente_publico"></select> -->
        </div>

        <div class="col">
            <label>&nbsp;</label>
                <a class="button button-primary btn btn-primary" 
                ng-click="vm.get_evaluaciones_ente()">
                    Buscar
                </a>
        </div>
    </div>

    <table class="tabla-pbr tabla-pe table wp-list-table widefat">
        <thead>
            <tr>
                <th>Ejercicio</th>
                <th>Clave de programa</th>
                <th>Programa</th>
                <th>Nombre de la evaluación</th>
                <th>Informe de evaluación</th>
                <th>Anexo Difusión de la Evaluación</th>
                <th>Posicionamiento Institucional</th>
                <th>PAMGE</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="e in vm.evaluacionesEP">
                <td>
                    {{ e.ejercicio_fiscal }}
                </td>
                <td>
                    {{ e.clave_programa }}
                </td>
                <td>
                    {{ e.programa }}
                </td>
                
                <td>
                    {{ e.nombre_evaluacion }}
                </td>
                <td>
                    <div ng-if="e.link_informe_evaluacion.length > 0">
                        <a href="{{ e.link_informe_evaluacion }}" 
                            target="_blank">
                            
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/pdf.png" 
                            class="img-link-descarga"
                                ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('pdf')"
                            alt="">
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/excel.png" 
                                class="img-link-descarga"
                                ng-if="e.link_informe_evaluacion.toLowerCase().endsWith('xlsx') || e.link_informe_evaluacion.toLowerCase().endsWith('csv') || e.link_informe_evaluacion.toLowerCase().endsWith('xls')"
                            alt="">
                            <br>
                            <span>
                                Informe
                            </span>
                        </a>
                    </div>

                    <div ng-if="e.link_ficha_evaluacion.length > 0">
                        <a href="{{ e.link_ficha_evaluacion }}" 
                            target="_blank">
                            
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/pdf.png" 
                            class="img-link-descarga"
                                ng-if="e.link_ficha_evaluacion.toLowerCase().endsWith('pdf')"
                            alt="">
                            <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/excel.png" 
                                class="img-link-descarga"
                                ng-if="e.link_ficha_evaluacion.toLowerCase().endsWith('xlsx') || e.link_ficha_evaluacion.toLowerCase().endsWith('csv') || e.link_ficha_evaluacion.toLowerCase().endsWith('xls')"
                            alt="">
                            <br>
                            <span>
                                Ficha
                            </span>
                        </a>
                    </div>
                </td>
                <td>
                    <a href="{{ e.link_anexo_difusion }}" 
                        target="_blank" 
                        ng-if="e.link_anexo_difusion.length > 0">

                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/pdf.png" 
                        class="img-link-descarga"
                            ng-if="e.link_anexo_difusion.toLowerCase().endsWith('pdf')"
                        alt="">
                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/excel.png" 
                            class="img-link-descarga"
                            ng-if="e.link_anexo_difusion.toLowerCase().endsWith('xlsx') || e.link_anexo_difusion.toLowerCase().endsWith('csv') || e.link_anexo_difusion.toLowerCase().endsWith('xls')"
                        alt="">
                    </a>
                </td>
                <td>
                    <a href="{{ e.link_posicionamiento_institucional }}" 
                        target="_blank"
                        ng-if="e.link_posicionamiento_institucional.length > 0">

                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/pdf.png" 
                        class="img-link-descarga"
                            ng-if="e.link_posicionamiento_institucional.toLowerCase().endsWith('pdf')"
                        alt="">
                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/excel.png" 
                            class="img-link-descarga"
                            ng-if="e.link_posicionamiento_institucional.toLowerCase().endsWith('xlsx') || e.link_posicionamiento_institucional.toLowerCase().endsWith('csv') || e.link_posicionamiento_institucional.toLowerCase().endsWith('xls')"
                        alt="">
                    </a>
                </td>
                <td>
                    <a href="{{ e.link_pamge }}" 
                        target="_blank"
                        ng-if="e.link_pamge.length > 0">

                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/pdf.png" 
                        class="img-link-descarga"
                            ng-if="e.link_pamge.toLowerCase().endsWith('pdf')"
                        alt="">
                        <img src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../img/excel.png" 
                            class="img-link-descarga"
                            ng-if="e.link_pamge.toLowerCase().endsWith('xlsx') || e.link_pamge.toLowerCase().endsWith('csv') || e.link_pamge.toLowerCase().endsWith('xls')"
                        alt="">
                    </a>
                </td>
            </tr>
            <tr ng-if="!vm.esAdmin && vm.evaluacionesEP.length == 0">
                <td colspan="8" >
                    No se encontraron resultados
                </td>
            </tr>
            <tr ng-if="vm.evaluacionesEP == null || vm.cargandoEvaluacionesEP">
                <td colspan="8" style="text-align: center">
                    <div class="lds-default" ><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
                    <div>
                    Cargando información...
                    </div>
                </td>
            </tr>
        </tbody>
    </table>

</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
<script src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../js/combobox.js"></script>
<script src="https://evalua-pbr.nl.gob.mx/wp-content/plugins/evaluaciones/inc/../js/admin-evaluaciones.js"></script>
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/wordpress/wp-content/plugins/evaluaciones/inc/plantillas/tabla.php:53) in <b>/var/www/html/wordpress/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1902</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/wordpress/wp-content/plugins/evaluaciones/inc/plantillas/tabla.php:53) in <b>/var/www/html/wordpress/wp-includes/rest-api/class-wp-rest-server.php</b> on line <b>1902</b><br />
{"id":825,"date":"2023-05-12T10:51:00","date_gmt":"2023-05-12T16:51:00","guid":{"rendered":"https:\/\/evalua.dataware-solutions.com\/?page_id=825"},"modified":"2023-06-08T19:18:09","modified_gmt":"2023-06-08T19:18:09","slug":"evaluacion-de-desempeno","status":"publish","type":"page","link":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/evaluacion-de-desempeno\/","title":{"rendered":"Evaluaci\u00f3n de Desempe\u00f1o"},"content":{"rendered":"\n","protected":false},"excerpt":{"rendered":"<p> [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/evaluacion-de-desempeno\/\">Leer m\u00e1s&#8230;<span class=\"screen-reader-text\"> from Evaluaci\u00f3n de Desempe\u00f1o<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-825","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/pages\/825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/comments?post=825"}],"version-history":[{"count":1,"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/pages\/825\/revisions"}],"predecessor-version":[{"id":1055,"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/pages\/825\/revisions\/1055"}],"wp:attachment":[{"href":"https:\/\/evalua-pbr.nl.gob.mx\/index.php\/wp-json\/wp\/v2\/media?parent=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}