list.html 2.6 KB

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