KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
4.1KB

  1. {% extends "layout.twig" %}
  2. {% block title %}${ "Manage Users" | translate }{% endblock %}
  3. {% block content %}
  4. <h2>${ "Need more detail?" | translate }</h2>
  5. <form class="detail" action="index.php" method="get" accept-charset="utf-8">
  6. <fieldset>
  7. <input type="hidden" name="action" value="manage_users" />
  8. {% if visitor.group.can("add_user") %}
  9. <a href="{% admin "new_user" %}" class="button yay right">
  10. <img src="$theme_url/images/icons/add.png" alt="add" /> ${ "New User" | translate }
  11. </a>
  12. {% endif %}
  13. <div class="pad">
  14. <h3>
  15. ${ "Search&hellip;" | translate }
  16. <a href="{% admin "help&id=filtering_results" %}" class="help emblem"><img src="$theme_url/images/icons/help.png" alt="help" /></a>
  17. </h3>
  18. <input class="text" type="text" name="query" value="${ GET.query | escape }" id="query" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
  19. </div>
  20. </fieldset>
  21. </form>
  22. <br />
  23. <h2>${ "Users" | translate }</h2>
  24. <table border="0" cellspacing="0" cellpadding="0" class="wide">
  25. <thead>
  26. <tr class="head">
  27. <th>${ "Name" | translate }</th>
  28. <th>${ "Group" | translate }</th>
  29. <th>${ "Joined" | translate }</th>
  30. <th>${ "Website" | translate }</th>
  31. ${ trigger.call("manage_users_column_header") }
  32. <th colspan="2">${ "Controls" | translate }</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. {% for user in users.paginated %}
  37. <tr id="user_$user.id" class="user{% if loop.last %} last{% endif %}">
  38. <td class="main">
  39. {% if user.full_name != "" %}
  40. <a href="mailto:$user.email">$user.full_name</a> <span class="sub">($user.login)</span>
  41. {% else %}
  42. <a href="mailto:$user.email">$user.login</a>
  43. {% endif %}
  44. </td>
  45. <td>${ user.group.name | escape }</td>
  46. <td>${ user.joined_at | strftime }</td>
  47. <td>{% if user.website != "" %}<a href="$user.website">$user.website</a>{% endif %}</td>
  48. ${ trigger.call("manage_users_column", user) }
  49. {% if user.editable and user.deletable %}
  50. <td class="controls">${ user.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }</td>
  51. <td class="controls">${ user.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }</td>
  52. {% else %}
  53. ${ user.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate), '<td class="controls" colspan="2">', '</td>') }
  54. ${ user.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate), '<td class="controls" colspan="2">', '</td>') }
  55. {% endif %}
  56. </tr>
  57. {% else %}
  58. <tr class="last">
  59. <td colspan="5" class="center"><span class="sub">${ "(none)" | translate }</span></td>
  60. </tr>
  61. {% endfor %}
  62. </tbody>
  63. </table>
  64. {% if users.paginated and users.pages > 1 %}
  65. <br />
  66. <div class="pagination">
  67. $users.next_link
  68. $users.prev_link
  69. <span class="pages">${ "Page %d of %d" | translate | format(users.page, users.pages) }</span>
  70. </div>
  71. {% endif %}
  72. {% endblock %}