service_tariff.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {% extends 'SharixAdmin/index.html' %}
  2. {% load render_table from django_tables2 %}
  3. {% block contenthome %}
  4. <h1 >{{ title }}</h1>
  5. <div class="container text-center mt-2">
  6. {% render_table table %}
  7. {% comment %} {% if table.page %}
  8. <nav aria-label="...">
  9. <ul class="pagination">
  10. {% if table.page.has_previous %}
  11. <li class="page-item">
  12. <a class="page-link" href="?page={{ table.page.previous_page_number }}" tabindex="-1">Previous</a>
  13. </li>
  14. {% else %}
  15. <li class="page-item disabled">
  16. <span class="page-link">Previous</span>
  17. </li>
  18. {% endif %}
  19. {% for page in table.page_range %}
  20. {% if page == table.page.number %}
  21. <li class="page-item active">
  22. <span class="page-link">{{ page }} <span class="sr-only">(current)</span></span>
  23. </li>
  24. {% else %}
  25. <li class="page-item">
  26. <a class="page-link" href="?page={{page }}">{{ page }}</a>
  27. </li>
  28. {% endif %}
  29. {% endfor %}
  30. {% if table.page.has_next %}
  31. <li class="page-item">
  32. <a class="page-link" href="?page={{ table.page.next_page_number }}">Next</a>
  33. </li>
  34. {% else %}
  35. <li class="page-item disabled">
  36. <span class="page-link">Next</span>
  37. </li>
  38. {% endif %}
  39. </ul>
  40. </nav>
  41. {% endif %} {% endcomment %}
  42. </div>
  43. <div class="container text-end mt-2">
  44. <a class="btn btn-primary" href="/service_tariff/add">Добавить</a>
  45. </div>
  46. {% endblock contenthome %}