list.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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:forums:nodes:new' %}" class="btn btn-success">
  6. <span class="fa fa-plus-circle"></span>
  7. {% trans "New forum" %}
  8. </a>
  9. </div>
  10. {% endblock %}
  11. {% block table-header %}
  12. <th>{% trans "Forum" %}</th>
  13. <th>Role</th>
  14. <th>Left</th>
  15. <th>Right</th>
  16. <th>Level</th>
  17. <th>&nbsp;</th>
  18. <th>&nbsp;</th>
  19. <th>&nbsp;</th>
  20. <th>&nbsp;</th>
  21. {% endblock table-header %}
  22. {% block table-row %}
  23. <td class="lead">
  24. {% for i in item.level_range %}
  25. &nbsp;&nbsp;&nbsp;&nbsp;
  26. {% endfor %}
  27. {% if item.role == 'category' %}
  28. <span class="fa fa-folder-open tooltip-top" title="{% trans "Category" %}"></span>
  29. {% elif item.role == 'forum' %}
  30. <span class="fa fa-comments-o tooltip-top" title="{% trans "Forum" %}"></span>
  31. {% elif item.role == 'redirect' %}
  32. <span class="fa fa-link tooltip-top" title="{% trans "Redirect" %}"></span>
  33. {% endif %}
  34. {{ item.name }}
  35. </td>
  36. <td>{{ item.role }}</td>
  37. <td>{{ item.lft }}</td>
  38. <td>{{ item.rght }}</td>
  39. <td>{{ item.level }}</td>
  40. <td class="row-action">
  41. {% if not item.last %}
  42. <form action="{% url 'misago:admin:forums:nodes:down' forum_id=item.id %}" method="post">
  43. <button class="btn btn-default tooltip-top" title="{% trans "Move down" %}">
  44. {% csrf_token %}
  45. <span class="fa fa-chevron-down"></span>
  46. </button>
  47. </form>
  48. {% else %}
  49. &nbsp;
  50. {% endif %}
  51. </td>
  52. <td class="row-action">
  53. {% if not item.first %}
  54. <form action="{% url 'misago:admin:forums:nodes:up' forum_id=item.id %}" method="post">
  55. <button class="btn btn-default tooltip-top" title="{% trans "Move up" %}">
  56. {% csrf_token %}
  57. <span class="fa fa-chevron-up"></span>
  58. </button>
  59. </form>
  60. {% else %}
  61. &nbsp;
  62. {% endif %}
  63. </td>
  64. <td class="row-action">
  65. <a href="{% url 'misago:admin:forums:nodes:edit' forum_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Edit" %}">
  66. <span class="fa fa-pencil"></span>
  67. </a>
  68. </td>
  69. <td class="row-action">
  70. <a href="{% url 'misago:admin:forums:nodes:delete' forum_id=item.id %}" class="btn btn-danger tooltip-top" title="{% trans "Delete" %}">
  71. <span class="fa fa-times"></span>
  72. </a>
  73. </td>
  74. {% endblock %}
  75. {% block emptylist %}
  76. <td colspan="2">
  77. <p>{% trans "No forums are currently defined." %}</p>
  78. </td>
  79. {% endblock emptylist %}