convocatorias.jsp 3.58 KB
Newer Older
1 2 3
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
4
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
5 6
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

7
<layout:extends name="layouts/base.jsp">
8
    <layout:put block="cssDeclaracion" type="APPEND"></layout:put>
9
    <layout:put block="contents" type="REPLACE">
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
        <h2>Lista de convocatorias</h2>
        <div>
            <form>
                <label for="cargos">Cargos:</label>
                <select  name="cargoId" id="cargos">
                    <option value="">Todos los cargos</option>
                    <c:forEach items="${cargos}" var="cargo">
                        <option value="${cargo.id}" ${param.cargoId == cargo.id ? "selected" : ""} >${cargo.nombre}</option>
                    </c:forEach>
                </select>
                Estado:
                <input type="radio" id="cualquiera" name="isOpen" checked value="">
                <label for="abierto">Cualquiera</label><br>
                <input type="radio" id="abierto" name="isOpen" value="1">
                <label for="abierto">Abierto</label><br>
                <input type="radio" id="cerrado" name="isOpen" value="0">
                <label for="cerrado">Cerrado</label><br>
                <input type="submit" value="Buscar">
            </form>
        </div>
willgonzz committed
30

31
        <a href="/convocatoria">Agregar Nueva Convocatoria</a>
32
        <c:if test="${SUCCESS_MESSAGE != null}">
willgonzz committed
33
            <div id="status_message" style="color: brown;">${SUCCESS_MESSAGE}</div>
34
        </c:if>
35 36 37 38 39
        <div class="card text-dark bg-light mt-3">
        
            <div class="card-body">
              <div class="table-responsive">
                <table class="table">
40 41 42 43
                <thead>
                  <tr>
                    <th scope="col">#</th>
                    <th scope="col">Cargo</th>
44 45 46
                    <th scope="col">Estado</th>
                    <th scope="col">Fecha Abierta</th>
                    <th scope="col">Fecha Cerrada</th>
47 48 49 50 51 52 53 54
                  </tr>
                </thead>
                <tbody>
                  
                    <c:forEach items="${convocatorias}" var="convocatoria" varStatus="sta">
                        <tr>
                            <th scope="row">${sta.index+1}</th>
                            <td>${convocatoria.getCargo().getNombre()}</td>
55
                            <td>${convocatoria.getEstado().getDescripcion()}</td>
56 57
                            <td><fmt:formatDate value="${convocatoria.getFechaInicio()}" pattern="dd-MM-yyyy" /></td>
                            <td><fmt:formatDate value="${convocatoria.getFechaFin()}" pattern="dd-MM-yyyy" /></td>
58
                            <td><a href="/postulantes?convId=${convocatoria.id}">Ver postulantes</a></td>
59
                            <td><button onclick=window.location.href="/convocatoria/${convocatoria.id}">Cerrar convocatoria</button></td>
60 61 62 63 64 65
                        </tr>
                    </c:forEach>
                    
                  
                 
                </tbody>
66 67 68
                </table>
             </div>
            </div>
69
        </div>
70
         
71 72
    </layout:put>
    <layout:put block="scripts" type="APPEND">
73 74 75 76 77 78
        <script language="JavaScript">
                let mostrar=document.querySelector(convocatoria.getFechaFin())
                if(mostrar!=null){
                    
                }
            </script>
79 80
    </layout:put>
</layout:extends>