list.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. {% extends "misago/admin/generic/base.html" %}
  2. {% load i18n %}
  3. {% block title %}
  4. {{ active_link.name }} | {{ block.super }}
  5. {% endblock title%}
  6. {% block view %}
  7. {% if paginator or order_by %}
  8. <div class="table-actions">
  9. {% if paginator %}
  10. {% include "misago/admin/generic/paginator.html" %}
  11. {% endif%}
  12. {% if order_by %}
  13. <div class="btn-group pull-left">
  14. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  15. {% trans "Sorting:" %} <span class="fa fa-sort-numeric-{{ order.type }}"></span> <strong>{{ order.name }}</strong>
  16. </button>
  17. <ul class="dropdown-menu" role="menu">
  18. <li class="dropdown-title">
  19. {% trans "Change sorting to:" %}
  20. </li>
  21. {% for order in order_by %}
  22. <li>
  23. <form method="post">
  24. {% csrf_token %}
  25. <button type="submit" name="order_by" value="{{ order.order_by }}">
  26. <span class="fa fa-sort-numeric-{{ order.type }}"></span>
  27. {{ order.name }}
  28. </button>
  29. </form>
  30. </li>
  31. {% endfor %}
  32. </ul>
  33. </div>
  34. {% endif %}
  35. </div><!-- /.table-actions -->
  36. {% endif %}
  37. <div class="table-panel">
  38. <table class="table">
  39. <tr>
  40. {% block table-header %}
  41. {% endblock table-header %}
  42. </tr>
  43. {% for item in items %}
  44. <tr>
  45. {% block table-row %}
  46. <td class="lead">Lorem</td>
  47. <td>Ipsum</td>
  48. <td>
  49. <select class="form-control">
  50. <option>Pacem</option>
  51. <option>Para</option>
  52. <option>Bellum</option>
  53. </select>
  54. </td>
  55. <td class="row-action">
  56. <button type="button" class="btn btn-success tooltip-top" title="Activate">
  57. <span class="fa fa-check"></span>
  58. </button>
  59. </td>
  60. <td class="row-action">
  61. <div class="btn-group pull-right">
  62. <button type="button" class="btn btn-default dropdown-toggle tooltip-top" data-toggle="dropdown" title="Item options">
  63. <span class="fa fa-gear"></span>
  64. </button>
  65. <ul class="dropdown-menu" role="menu">
  66. <li>
  67. <a href="#">
  68. <span class="fa fa-sort-numeric-desc"></span>
  69. Newest
  70. </a>
  71. <a href="#">
  72. <span class="fa fa-sort-numeric-asc"></span>
  73. Oldest
  74. </a>
  75. <a href="#">
  76. <span class="fa fa-sort-numeric-desc"></span>
  77. Most posts
  78. </a>
  79. <a href="#">
  80. <span class="fa fa-sort-numeric-asc"></span>
  81. Least posts
  82. </a>
  83. </li>
  84. </ul>
  85. </div>
  86. </td>
  87. <td class="row-action">
  88. <button type="button" class="btn btn-danger tooltip-top" title="Activate">
  89. <span class="fa fa-times"></span>
  90. </button>
  91. </td>
  92. <td class="row-select">
  93. <label>
  94. <input type="checkbox">
  95. </label>
  96. </td>
  97. {% endblock table-row %}
  98. </tr>
  99. {% empty %}
  100. <tr class="message-row">
  101. {% block emptylist %}
  102. {% endblock emptylist %}
  103. </tr>
  104. {% endfor %}
  105. </table>
  106. </div><!-- /.table-panel -->
  107. {% if paginator %}
  108. <div class="table-actions">
  109. {% include "misago/admin/generic/paginator.html" %}
  110. </div><!-- /.table-actions -->
  111. {% endif %}
  112. {% endblock view %}