Commit 605fffdd authored by Daniel W Bond's avatar Daniel W Bond
Browse files

abstracted out pagination

parent 31df69e4
......@@ -66,32 +66,6 @@
</div><!-- /.container -->
<!-- Pagination -->
<br>
<div>
{% if opportunities.object_list and opportunities.paginator.num_pages > 1 %}
<div>
<ul class = "pager">
{% if posts.has_previous %}
<li class = "previous">
<a href= "?page={{ opportunities.previous_page_number }}">&larr; Newer</a></li>
{% else %}
<li class = "previous disabled">
<a href= "?page= {{opportunities.previous_page_number }}">&larr; Newer</a></li>
{% endif %}
<li><span>Page {{ opportunities.number }} of {{ opportunities.paginator.num_page }}</span></li>
{% if opportunities.has_next %}
<li class = "next">
<a href= "?page={{ opportunities.next_page_number }}">Older &rarr;</a></li>
{% else %}
<li class = "next disabled">
<a href= "?page={{ opportunities.next_page_number }}">Older &rarr;</a></li>
{% endif %}
</ul>
</div>
{% endif %}
</div>
{% include 'pagination.html' %}
{% endblock %}
......@@ -23,6 +23,9 @@ urlpatterns = patterns('stepup.views',
# person
url(r'^person/(?P<slug>[^\.]+)', 'person', name = 'view_person'),
# all persons
url(r'^person/', 'all_person', name = 'view_all_person'),
# opportunity
url(r'^opportunity/(?P<slug>[^\.]+)', 'opportunity', name = 'view_opportunity'),
......@@ -32,6 +35,9 @@ urlpatterns = patterns('stepup.views',
# organization
url(r'^organization/(?P<slug>[^\.]+)', 'organization', name = 'view_organization'),
# all organizations
url(r'^organization/', 'all_organizations', name = 'view_all_organization'),
# comments
url(r'^comments/', include('django.contrib.comments.urls')),
......
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