Use Digg style pagination for Corp and Alliance detail views

This commit is contained in:
2012-01-04 20:56:20 +00:00
parent 6086e2fd5f
commit 4b503b79f0
5 changed files with 367 additions and 5 deletions

View File

@@ -35,6 +35,22 @@
</tbody>
</table>
{% if is_paginated %}
<div class="pagination">
<ul>
<li class="prev{% if not page_obj.has_previous %} disabled{% endif %}"><a href="{% if page_obj.has_previous %}?page={{ page_obj.previous_page_number }}{% endif %}">Previous</a></li>
{% for i in page_obj.page_range %}
{% if not i %}
<li><a href="#">...</a></li>
{% else %}
<li{% if i == page_obj.number %} class="active"{% endif %}><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
<li class="next{% if not page_obj.has_next %} disabled{% endif %}"><a href="{% if page_obj.has_next %}?page={{page_obj.next_page_number }}{% endif %}">Next</a>
</ul>
</div>
{% endif %}
<script src="{{ STATIC_URL }}js/jquery.tablesorter.min.js"></script>
<script >

View File

@@ -40,6 +40,23 @@
</tbody>
</table>
{% if is_paginated %}
<div class="pagination">
<ul>
<li class="prev{% if not page_obj.has_previous %} disabled{% endif %}"><a href="{% if page_obj.has_previous %}?page={{ page_obj.previous_page_number }}{% endif %}">Previous</a></li>
{% for i in page_obj.page_range %}
{% if not i %}
<li><a href="#">...</a></li>
{% else %}
<li{% if i == page_obj.number %} class="active"{% endif %}><a href="?page={{ i }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
<li class="next{% if not page_obj.has_next %} disabled{% endif %}"><a href="{% if page_obj.has_next %}?page={{page_obj.next_page_number }}{% endif %}">Next</a>
</ul>
</div>
{% endif %}
<p><a href="{% url eveapi-corporation-members-csv corporation.id %}" class="btn" title="Exports the membership list of this corporation to a CSV file.">Export as CSV</a></p>
{% endif %}