list.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {% extends "misago/admin/generic/list.html" %}
  2. {% load i18n %}
  3. {% block page-actions %}
  4. <div class="page-actions">
  5. <a href="{% url 'misago:admin:permissions:forums:new' %}" class="btn btn-success">
  6. <span class="fa fa-plus-circle"></span>
  7. {% trans "New role" %}
  8. </a>
  9. </div>
  10. {% endblock %}
  11. {% block table-header %}
  12. <th>{% trans "Forum role" %}</th>
  13. <th style="width: 1%;">&nbsp;</th>
  14. <th style="width: 1%;">&nbsp;</th>
  15. {% endblock table-header %}
  16. {% block table-row %}
  17. <td class="item-name">
  18. {{ item }}
  19. </td>
  20. <td class="row-action">
  21. <a href="{% url 'misago:admin:permissions:forums:edit' role_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Edit" %}">
  22. <span class="fa fa-pencil"></span>
  23. </a>
  24. </td>
  25. <td class="row-action">
  26. <form action="{% url 'misago:admin:permissions:forums:delete' role_id=item.id %}" method="post" class="delete-prompt">
  27. <button class="btn btn-danger tooltip-top" title="{% trans "Delete" %}">
  28. {% csrf_token %}
  29. <span class="fa fa-times"></span>
  30. </button>
  31. </form>
  32. </td>
  33. {% endblock %}
  34. {% block emptylist %}
  35. <td colspan="3">
  36. <p>{% trans "No forum roles are currently defined." %}</p>
  37. </td>
  38. {% endblock emptylist %}
  39. {% block javascripts %}
  40. <script type="text/javascript">
  41. $(function() {
  42. $('.delete-prompt').submit(function() {
  43. var decision = confirm("{% trans "Are you sure you want to delete this role?" %}");
  44. return decision;
  45. });
  46. });
  47. </script>
  48. {% endblock %}