forked from marg-o/brigate
103 lines
3.3 KiB
Plaintext
103 lines
3.3 KiB
Plaintext
|
<%@page import="service.OrdiniService"%>
|
||
|
<%@page import="bean.Contatto"%>
|
||
|
<%@page import="java.util.ArrayList"%>
|
||
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||
|
pageEncoding="UTF-8"%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>Elenco ordini</title>
|
||
|
<link rel="stylesheet"
|
||
|
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||
|
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
||
|
crossorigin="anonymous">
|
||
|
<link rel="stylesheet" href="css/stile.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<jsp:include page="nav.jsp"></jsp:include>
|
||
|
<div style="margin: 25px">
|
||
|
<h4>Elenco ordini</h4>
|
||
|
<%
|
||
|
ArrayList<Contatto> elencoOrdini = OrdiniService.leggiTutti();
|
||
|
|
||
|
if (request.getAttribute("limit") != null) {
|
||
|
int limite = (Integer) request.getAttribute("limit");
|
||
|
elencoOrdini = OrdiniService.leggiTutti(limite);
|
||
|
}
|
||
|
|
||
|
if (elencoOrdini.isEmpty()) {
|
||
|
%>
|
||
|
<h2>Non ci sono ordini</h2>
|
||
|
<%
|
||
|
} else {
|
||
|
%>
|
||
|
|
||
|
<form action="ordini-ctrl" method="post">
|
||
|
Seleziona i primi <select name="limite"
|
||
|
class="form-control form-control-sm" style="width: 70px">
|
||
|
<option value="20">20</option>
|
||
|
<option value="20">50</option>
|
||
|
<option value="20">70</option>
|
||
|
<option value="20">100</option>
|
||
|
</select><input type="hidden" name="azione" value="selectTop"> <input
|
||
|
type="submit" value="OK" class="btn btn-light btn-sm" style="vertical-align: top">
|
||
|
</form>
|
||
|
<br>
|
||
|
<table id="ordini" class="table table-dark"
|
||
|
style="background-color: #3a3a3a">
|
||
|
<tr>
|
||
|
<th>#</th>
|
||
|
<th>Nominativo</th>
|
||
|
<th>Zona</th>
|
||
|
<th>Indirizzo</th>
|
||
|
<th>Telefono</th>
|
||
|
<th>Componenti</th>
|
||
|
<th>Composizione nucleo</th>
|
||
|
<th>Note</th>
|
||
|
<th>Consegnato</th>
|
||
|
</tr>
|
||
|
<%
|
||
|
for (int i = 0; i < elencoOrdini.size(); i++) {
|
||
|
Contatto contatto = elencoOrdini.get(i);
|
||
|
%>
|
||
|
<tr>
|
||
|
<td><a href="home-contatto.jsp?id=<%=contatto.getTelefono()%>"
|
||
|
style="color: white; font-weight: bold"><%=i + 1%></a></td>
|
||
|
<td><%=contatto.getNome()%> <%=contatto.getCognome()%></td>
|
||
|
<td><%=contatto.getArea()%></td>
|
||
|
<td><%=contatto.getIndirizzo()%></td>
|
||
|
<td><%=contatto.getTelefono()%></td>
|
||
|
<td><%=contatto.getNumero_persone()%></td>
|
||
|
<td><%=contatto.getComposizione_nucleo()%></td>
|
||
|
<td><%=contatto.getNote_sacchetto()%></td>
|
||
|
<th>
|
||
|
<form action="ordini-ctrl" method="post" style="text-align: center">
|
||
|
<input type="hidden" name="azione" value="elimina"> <input
|
||
|
type="hidden" name="id" value="<%=contatto.getTelefono()%>">
|
||
|
<input type="submit" value="×" class="btn btn-danger btn-sm rounded-pill">
|
||
|
</form>
|
||
|
</th>
|
||
|
</tr>
|
||
|
|
||
|
<%
|
||
|
}
|
||
|
%>
|
||
|
</table>
|
||
|
<%
|
||
|
}
|
||
|
%>
|
||
|
</div>
|
||
|
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
|
||
|
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
|
||
|
crossorigin="anonymous"></script>
|
||
|
<script
|
||
|
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
||
|
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
||
|
crossorigin="anonymous"></script>
|
||
|
<script
|
||
|
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
||
|
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
|
||
|
crossorigin="anonymous"></script>
|
||
|
</body>
|
||
|
</html>
|