{% extends 'base.html.twig' %}

{% block body %}
    
<div class="row">
<h1>Users list</h1>
  <div class="cols_12-6">
    <table>
        <thead>
            <tr>
                <th>Id</th>
                <th>Username</th>
                <th>Password</th>
                <th>Email</th>
                <th>Is_active</th>
                <th>Name</th>
                <th>Company</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
        {% for user in users %}
            <tr>
                <td><a href="{{ path('user_show', { 'id': user.id }) }}">{{ user.id }}</a></td>
                <td>{{ user.username }}</td>
                <td>{{ user.password }}</td>
                <td>{{ user.email }}</td>
                <td>{% if user.isactive %}Yes{% else %}No{% endif %}</td>
                <td>{{ user.name }}</td>
                <td>{{ user.company }}</td>
                <td>
                    <ul>
                        <li>
                            <a href="{{ path('user_show', { 'id': user.id }) }}">show</a>
                        </li>
                        <li>
                            <a href="{{ path('user_edit', { 'id': user.id }) }}">edit</a>
                        </li>
                    </ul>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>

    <ul>
        <li>
            <a href="{{ path('user_new') }}">Create a new user</a>
        </li>
    </ul>
    </div>
    </div>
{% endblock %}
