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

{% block body %}
<!-- Page -->
  <div class="page animsition">
    <div class="page-header">
      <h1 class="page-title">{{ 'users list' | trans}}</h1>
      <ol class="breadcrumb">
        <li><a href="{{ path('Dgcl_project_homepage') }}">{{ 'Home' | trans }}</a></li>
        <li class="active">{{ 'users list' | trans}}</li>
      </ol>
     </div>
    <div class="page-content">
      <div class="panel">
        
        <div class="panel-body">
          <div class="row">
            <div class="col-sm-12">
              <div class="margin-bottom-15">
                <a class="btn btn-outline btn-primary" type="button" href="{{ path('Dgcl_add_new_user') }}">
                    <i class="icon wb-plus" aria-hidden="true"></i> {{ 'add_new_user' | trans}}</a>
              </div>
            </div>
          </div>
          
                
     <div class="panel-body">
            <table class="table table-bordered table-hover table-striped" id="datatable_1">
                
                   <thead>
                       <tr>
                           <th>{{'username' | trans }}</th>
                           <th>{{'email'    | trans }}</th>
                           <th>{{'status_user'   | trans }}</th>
                           <th class="sorting_disabled " width="100"></th>
                       </tr>
                   </thead>
                   <tbody>
                   {% for entity in entities %}                           
                       <tr>
                           <td>{{ entity.username }}</td>
                           <td>{{ entity.email }}</td>
                           <td>{{ entity.enabled }}</td>
                           <td class="center"> 
  				

                                {% if is_granted('ROLE_ADMIN')  %}
                                <a href="{{ path('Dgcl_user_edit', { 'id': entity.id }) }}" class="btn btn-sm btn-icon btn-pure btn-default on-default edit-row"
                                data-toggle="tooltip" data-original-title="{{ 'Edit' | trans }}"><i class="icon wb-edit" aria-hidden="true"></i></a>
                                {% endif %}

                              {% if is_granted('ROLE_ADMIN')  %}
                                <a href="{{ path('Dgcl_user_delete', { 'id': entity.id }) }}" 
                                   class="confirmation-suppression btn btn-sm btn-icon btn-pure btn-default on-default remove-row"
                                   confirmation-message="{{'confirm delete' | trans({'%this%':'this', '%objet%':'u'})}} "
                                data-toggle="tooltip" data-original-title="{{ 'Remove' | trans }}"><i class="icon wb-trash" aria-hidden="true"></i></a>
                              {% endif %}
                                
                           </td>
                       </tr>
                   {% endfor %}
                   </tbody>
               </table>
            
          </div>                
                
                
                
        </div>
      </div>
      <!-- End Panel Table Add Row -->

      

    </div>
  </div>
  <!-- End Page -->
{% endblock %}