feriados.jsp 2.89 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<%@ 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" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<layout:extends name="layouts/base.jsp">
    <layout:put block="cssDeclaracion" type="APPEND"></layout:put>
    <layout:put block="contents" type="REPLACE">
        <h2>Lista de Feriados</h2>

        <div>
            <form>
              <div class="row justify-content-start gy-2">
                <div class="col-auto">
                  <input
                    class="form-control" 
                    placeholder="Feriado"
                    type="text"
                    name="feriado"
                    id="feriado"
                    value="${param.feriado}"
                  />

                </div>
                <div class="col-auto">

                  <input type="submit" class="btn btn-primary" value="Buscar" />
                </div>
                
              </div>
            </form>
            
        </div>
        <div class="card text-dark bg-light mt-3">
        
          <div class="card-body">
            <div class="table-responsive">
              <table class="table">
                  <thead>
                    <tr>
                      <th scope="col">#</th>
                      <th scope="col">Motivo del Feriado</th>
                      <th scope="col">Fecha</th>
                      <th scope="col"></th>
                    </tr>
                  </thead>
                  <tbody>
                    
                      <c:forEach items="${feriados}" var="feriado" varStatus="sta">
                          <tr>
                              <th scope="row">${sta.index+1}</th>
51
                              <td>${feriado.getMotivoFeriado()}</td>
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
                              <td>${feriado.getFecha()}</td>
                              <td><a href="/feriados/modificar/${feriado.id}"><i class="bi bi-pencil-fill"></i></a></td>
                          </tr>
                      </c:forEach>
                  </tbody>
              </table>
            </div>
          </div>
          <div class="card-footer">
              <div>
                <nav aria-label="Page navigation example">
                  <ul class="pagination">
                    <c:forEach begin="1" end="${pages}" var="nro">
                      <li class="page-item ${(param.nroPagina == null and nro == 1)  or param.nroPagina == nro-1 ? 'active' : ''}"><a class="page-link" href="javascript:buscarPagina(${nro})">${nro}</a></li>
                    </c:forEach>
                  </ul>
                </nav>
              </div>
            </div>
        </div>
        </div>
       
        
      </layout:put>
      <layout:put block="scripts" type="APPEND">
        
      </layout:put>
</layout:extends>