<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<tiles:insertDefinition name="defaultTemplate">

	<tiles:putAttribute name="body">
		<div class="jumbotron">
			<h1>Users list</h1>
			<p>These are the users currently in the system.</p>
		</div>

		<table class="table">
			<thead>
				<tr>
					<th>Login</th>
					<th>Description</th>
					<th>Actions</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${users}" var="user">
					<tr>
						<td>${user.login}</td>
						<td>${user.description}</td>
						<td><a class="btn btn-sm btn-primary"
							href="<s:url value="/users/${user.id}" />" title="Detailed info">
								see detail</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</tiles:putAttribute>
</tiles:insertDefinition>