list.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {% extends "misago/admin/generic/list.html" %}
  2. {% load i18n misago_avatars misago_forms %}
  3. {% block page-actions %}
  4. <div class="page-actions">
  5. <a href="{% url 'misago:admin:users:accounts:new' %}" class="btn btn-success">
  6. <span class="fa fa-plus-circle"></span>
  7. {% trans "New user" %}
  8. </a>
  9. </div>
  10. {% endblock %}
  11. {% block table-header %}
  12. <th style="width: 1%;">&nbsp;</th>
  13. <th>{% trans "User" %}</th>
  14. <th style="width: 1%;">&nbsp;</th>
  15. <th style="width: 1%;">&nbsp;</th>
  16. <th style="width: 200px;">{% trans "E-mail" %}</th>
  17. <th style="width: 150px;">{% trans "Rank" %}</th>
  18. <th style="width: 200px;">{% trans "Joined" %}</th>
  19. <th style="width: 128px;">{% trans "Posts" %}</th>
  20. {% for action in extra_actions %}
  21. <th style="width: 1%;">&nbsp;</th>
  22. {% endfor %}
  23. <th style="width: 1%;">&nbsp;</th>
  24. {% endblock table-header %}
  25. {% block table-row %}
  26. <td>
  27. <a href="{{ item.get_absolute_url }}">
  28. <img src="{{ item|avatar:24 }}" alt="{% trans "Avatar" %}" width="24" height="24">
  29. </a>
  30. </td>
  31. <td class="item-name {% if item.requires_activation %}text-muted{% endif %}">
  32. {% if item.is_active %}
  33. <a href="{{ item.get_absolute_url }}">{{ item }}</a>
  34. {% else %}
  35. <a href="{{ item.get_absolute_url }}" title="{% trans "Is disabled by administrator" %}">
  36. <del>{{ item }}</del>
  37. </a>
  38. {% endif %}
  39. </td>
  40. <td class="lead text-muted">
  41. {% if item.requires_activation_by_admin %}
  42. <span class="fa fa-eye tooltip-top" title="{% trans "Requires activation by administrator" %}"></span>
  43. {% elif item.requires_activation_by_user %}
  44. <span class="fa fa-ticket tooltip-top" title="{% trans "Has to activate account" %}"></span>
  45. {% else %}
  46. &nbsp;
  47. {% endif %}
  48. </td>
  49. <td class="lead text-muted">
  50. {% if item.is_superuser %}
  51. <span class="fa fa-star tooltip-top" title="{% trans "Super administrator" %}"></span>
  52. {% elif item.is_staff %}
  53. <span class="fa fa-star-half-o tooltip-top" title="{% trans "Administrator" %}"></span>
  54. {% else %}
  55. &nbsp;
  56. {% endif %}
  57. </td>
  58. <td>
  59. <a href="mailto:{{ item.email }}">{{ item.email }}</a>
  60. </td>
  61. <td>
  62. {{ item.rank }}
  63. </td>
  64. <td>
  65. <abbr class="moment" data-iso="{{ item.joined_on.isoformat }}" data-format="LL"></abbr>
  66. </td>
  67. <td>
  68. {{ item.posts }}
  69. </td>
  70. {% for action in extra_actions %}
  71. <td class="row-action">
  72. <a href="{% url action.link pk=item.pk %}" class="btn btn-{% if action.style %}{{ action.style }}{% else %}default{% endif %} tooltip-top" title="{{ action.name }}">
  73. <span class="{{ action.icon }}"></span>
  74. </a>
  75. </td>
  76. {% endfor %}
  77. <td class="row-action">
  78. <a href="{% url 'misago:admin:users:accounts:edit' pk=item.pk %}" class="btn btn-primary tooltip-top" title="{% trans "Edit user" %}">
  79. <span class="fa fa-pencil"></span>
  80. </a>
  81. </td>
  82. {% endblock table-row %}
  83. {% block emptylist %}
  84. <td colspan="{{ 11|add:extra_actions_len }}">
  85. <p>{% trans "No users matching search criteria have been found." %}</p>
  86. </td>
  87. {% endblock emptylist %}
  88. {% block modal-title %}
  89. {% trans "Search users" %}
  90. {% endblock modal-title %}
  91. {% block modal-body %}
  92. <div class="row">
  93. <div class="col-md-6">
  94. {% form_row search_form.username %}
  95. </div>
  96. <div class="col-md-6">
  97. {% form_row search_form.email %}
  98. </div>
  99. </div>
  100. <div class="row">
  101. <div class="col-md-6">
  102. {% form_row search_form.rank %}
  103. </div>
  104. <div class="col-md-6">
  105. {% form_row search_form.role %}
  106. </div>
  107. </div>
  108. <div class="row">
  109. <div class="col-md-12">
  110. {% form_row search_form.profilefields %}
  111. </div>
  112. </div>
  113. <div class="row">
  114. <div class="col-md-4">
  115. {% form_row search_form.inactive %}
  116. </div>
  117. <div class="col-md-4">
  118. {% form_row search_form.disabled %}
  119. </div>
  120. <div class="col-md-4">
  121. {% form_row search_form.is_staff %}
  122. </div>
  123. </div>
  124. {% endblock modal-body %}