#{extends 'main.html' /}
#{set title:'Home' /}

<h1>Welcome to logisima-play-neo4j test application</h1>

#{menu/}

<h2>Result of the search</h2>
<table>
    <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>email</th>
        <th>action</th>
    </tr>

    #{list items:users, as:'user'}
    <tr>
        <td><a href="@{Application.user(user.key)}" title="View profile">${user.firstname}</a></td>
        <td><a href="@{Application.user(user.key)}" title="View profile">${user.lastname}</a></td>
        <td><a href="@{Application.user(user.key)}" title="View profile">${user.email}</a></td>
        <td>
            <a href="@{Application.editUser(user.key)}" title="Edit">
                <img src="@{'/public//images/pencil.png'}" alt="Edit"/>
            </a>
            <a href="@{Application.deleteUser(user.key)}" title="Delete">
                <img src="@{'/public/images/cross.png'}" alt="Delete"/>
            </a>
        </td>
    </tr>
    #{/list}
</table>
