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.

manage_groups.twig 2.8KB

9 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends "layout.twig" %}
  2. {% block title %}${ "Manage Groups" | 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_groups" />
  8. {% if visitor.group.can("add_group") %}
  9. <a href="{% admin "new_group" %}" class="button yay right">
  10. <img src="$theme_url/images/icons/add.png" alt="add" /> ${ "New Group" | translate }
  11. </a>
  12. {% endif %}
  13. <div class="pad">
  14. <h3>${ "Search all groups for user&hellip;" | translate }</h3>
  15. <input class="text" type="text" name="search" value="${ GET.search | escape }" id="search" /> <button type="submit" class="inline">${ "Search &rarr;" | translate }</button>
  16. </div>
  17. </fieldset>
  18. </form>
  19. <br />
  20. <h2>${ "Groups" | translate }</h2>
  21. {% for group in groups.paginated %}
  22. <div class="box">
  23. <h1>
  24. <span class="right">
  25. ${ group.edit_link('<img src="'~ theme_url ~'/images/icons/edit.png" alt="edit" /> '~("edit" | translate)) }
  26. ${ group.delete_link('<img src="'~ theme_url ~'/images/icons/delete.png" alt="delete" /> '~("delete" | translate)) }
  27. </span>
  28. {% if group.id == site.guest_group %}
  29. ${ "&#8220;%s&#8221; is the group for guests." | translate | format(group.name) }
  30. {% elseif group.id == site.default_group %}
  31. ${ "&#8220;%s&#8221; is the default group and has %d <a href=\"%s\">member</a>." | translate_plural("&#8220;%s&#8221; is the default group and has %d <a href=\"%s\">members</a>.", group.size) | format(group.name, group.size, route.url("/admin/?action=manage_users&query=group%3A"~group.name)) }
  32. {% else %}
  33. ${ "&#8220;%s&#8221; has %d <a href=\"%s\">member</a>." | translate_plural("&#8220;%s&#8221; has %d <a href=\"%s\">members</a>.", group.size) | format(group.name, group.size, route.url("/admin/?action=manage_users&query=group%3A"~group.name)) }
  34. {% endif %}
  35. </h1>
  36. </div>
  37. {% endfor %}
  38. {% if groups.paginated and groups.pages > 1 %}
  39. <div class="pagination">
  40. $groups.next_link
  41. $groups.prev_link
  42. <span class="pages">${ "Page %d of %d" | translate | format(groups.page, groups.pages) }</span>
  43. </div>
  44. {% endif %}
  45. {% endblock %}