{% extends 'base.html.twig' %}
{% block title %}Administration utilisateurs{% endblock %}
{% block body %}
<head>
  <!-- Custom -->
  <link href="/static/dashboard/dashboard.css" rel="stylesheet">
</head>

  {% include 'header.html.twig' %}
  {# {% include 'forms/video' %} #}
  <div class="card m-4">
    <table class="table table-striped table-bordered">
      <thead class="text-uppercase">
        <tr>
          <th scope="col" style="max-width: 80px">Image</th>
          <th scope="col" class="w-100">Username<a class="btn btn-primary mdi mdi-account-plus" href="/add_user"></a></th>
        </tr>
      </thead>
      <tbody>
        {% for user in users %}
        <tr>
          <td><img src="{{user.image}}" alt="" style="max-width: 80px"></td>
          {% if user.password == "" %}
            <td>
              <button class="btn btn-primary mdi mdi-content-copy copy-input" input="#copyKey{{user.id}}"></button>
              <input type="text" value="{{uri}}/register/{{ user.username }}" id="copyKey{{user.id}}">
            </td>
          {% else %}
            <td>{{user.username}}</td>
          {% endif %}
        </tr>
        {% endfor %}
      </tbody>
    </table>

  </div>
{% endblock %}
