Fakultas Ilmu Komputer UI

Commit 53ef1c54 authored by Azhar Rais's avatar Azhar Rais
Browse files

[REFACTOR] Move redundant pagination for Home and Detail to forum_pagination.html

parent 1e49ee1b
Pipeline #59984 passed with stages
in 12 minutes and 32 seconds
......@@ -132,37 +132,7 @@
</div>
</div>
</div>
<nav aria-label="Discussion Detail Pagination">
<ul class="pagination justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" tabindex="-1">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Previous</a>
</li>
{% endif %}
{% for page in pages %}
{% if page == "..." %}
<li class="page-item disabled"><a class="page-link" href="">{{ page }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" tabindex="-1">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Next</a>
</li>
{% endif %}
</ul>
</nav>
{% include 'forum/forum_pagination.html' %}
</div>
{% endblock content %}
{% block extra_scripts %}
......
......@@ -31,36 +31,6 @@
{% empty %}
<h4 id="no-discussion">There is no discussion at the moment</h4>
{% endfor %}
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" tabindex="-1">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Previous</a>
</li>
{% endif %}
{% for page in pages %}
{% if page == "..." %}
<li class="page-item disabled"><a class="page-link" href="">{{ page }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" tabindex="-1">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Next</a>
</li>
{% endif %}
</ul>
</nav>
{% include 'forum/forum_pagination.html' %}
</div>
{% endblock content %}
\ No newline at end of file
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
{% if page_obj.has_previous %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.previous_page_number }}" tabindex="-1">Previous</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Previous</a>
</li>
{% endif %}
{% for page in pages %}
{% if page == "..." %}
<li class="page-item disabled"><a class="page-link" href="">{{ page }}</a></li>
{% else %}
<li class="page-item"><a class="page-link" href="?page={{ page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li class="page-item">
<a class="page-link" href="?page={{ page_obj.next_page_number }}" tabindex="-1">Next</a>
</li>
{% else %}
<li class="page-item disabled">
<a class="page-link" href="" tabindex="-1">Next</a>
</li>
{% endif %}
</ul>
</nav>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment