list.html.twig 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% extends 'admin/base.html.twig' %}
  2. {% block content %}
  3. <div class="content">
  4. <div class="container-fluid">
  5. <div class="row">
  6. <div class="col-md-12">
  7. <div class="card">
  8. <div class="card-header">
  9. <div class="float-left">
  10. <h4 class="card-title">Список пользователей</h4>
  11. </div>
  12. <div class="float-right">
  13. <a class="btn btn-primary btn-fill btn-icon" href="{{ path('admin.user_add') }}" role="button" title="Добавить">
  14. <i class="fa fa-plus"></i>
  15. </a>
  16. </div>
  17. </div>
  18. <div class="card-body">
  19. {% for label, messages in app.flashes(['success', 'warning', 'danger', 'info', 'primary']) %}
  20. {% for message in messages %}
  21. <div class="alert alert-{{ label }}">
  22. <span>{{ message }}</span>
  23. </div>
  24. {% endfor %}
  25. {% endfor %}
  26. <table class="table table-hover table-bordered">
  27. <thead>
  28. <th>ID</th>
  29. <th>Адрес эл. почты</th>
  30. <th>Активный</th>
  31. <th></th>
  32. </thead>
  33. <tbody>
  34. {% for user in users %}
  35. <tr>
  36. <td>{{ user.id }}</td>
  37. <td>{{ user.email }}</td>
  38. {% if user.isActive %}
  39. <td class="text-success">Да</td>
  40. {% else %}
  41. <td class="text-danger">Нет</td>
  42. {% endif %}
  43. <td style="width: 55px; padding-right: 0;">
  44. <a class="btn btn-primary btn-fill btn-icon" href="{{ path('admin.user_edit', {id: user.id}) }}" role="button" title="Редактировать">
  45. <i class="fa fa-pencil"></i>
  46. </a>
  47. </td>
  48. </tr>
  49. {% endfor %}
  50. </tbody>
  51. </table>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. {% endblock %}