forked from marg-o/brigate
94 lines
2.8 KiB
Plaintext
94 lines
2.8 KiB
Plaintext
<%@page import="util.Data"%>
|
|
<%@page import="service.ContattoService"%>
|
|
<%@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 contatti</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 contatti</h4>
|
|
<%
|
|
ArrayList<Contatto> elencoContatti = ContattoService.elenco();
|
|
|
|
if (elencoContatti.isEmpty()) {
|
|
%>
|
|
<h4>Non ci sono contatti</h4>
|
|
<%
|
|
} else {
|
|
%>
|
|
<table class="table table-dark" style="background-color: #3a3a3a">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Nominativo
|
|
<th>Indirizzo</th>
|
|
<th>Zona</th>
|
|
<th>Telefono</th>
|
|
<th>Email</th>
|
|
<th>Componenti</th>
|
|
<th>Composizione nucleo</th>
|
|
<th>Note sacchetto</th>
|
|
<th>Ultima consegna</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%
|
|
for (int i = 0; i < elencoContatti.size(); i++) {
|
|
Contatto contatto = elencoContatti.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.getIndirizzo()%></td>
|
|
<td><%=contatto.getArea()%></td>
|
|
<td><%=contatto.getTelefono()%></td>
|
|
<td><%=contatto.getEmail() != null ? contatto.getEmail() : "-"%></td>
|
|
<td><%=contatto.getNumero_persone()%></td>
|
|
<td><%=contatto.getComposizione_nucleo()%></td>
|
|
<td><%=contatto.getNote_sacchetto()%></td>
|
|
<td>
|
|
<%
|
|
if (contatto.getUltima_consegna() == null) {
|
|
out.print("-");
|
|
} else {
|
|
out.print(Data.formatta(contatto.getUltima_consegna()));
|
|
}
|
|
%>
|
|
</td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
</tbody>
|
|
</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> |