Skip to content
Browse files

chfix links in search pagination

  • Loading branch information...
1 parent 8d7392b commit 5c5669a37550558afbeb093d2ebb55655e5996f4 @visiblegovernment committed Jul 20, 2011
Showing with 5 additions and 3 deletions.
  1. +3 −1 mainapp/views/main.py
  2. +2 −2 templates/reports/_pagination.html
View
4 mainapp/views/main.py
@@ -77,7 +77,9 @@ def search_address(request):
"enable_map": True,
"ward" : ward,
"reports" : reports,
- "page":page },
+ "page":page,
+ "url_parms": "&lat=%s&lon=%s" %( request.GET['lat'], request.GET['lon'])
+ },
context_instance=RequestContext(request))
View
4 templates/reports/_pagination.html
@@ -2,13 +2,13 @@
<div class="pagination">
<span class="step-links">
{% if page.has_previous %}
- <a href="?page={{ page.previous_page_number }}">{% trans "Previous" %}</a> |
+ <a href="?page={{ page.previous_page_number }}{{url_parms}}">{% trans "Previous" %}</a> |
{% endif %}
{% if page.has_other_pages %}
<span class="current">{{page.start_index}}-{{page.end_index}} {% trans "of" %} {{page.paginator.count}} {% trans "Reports." %} </span>
{% endif %}
{% if page.has_next %}
- | <a href="?page={{ page.next_page_number }}">{% trans "Next" %}</a>
+ | <a href="?page={{ page.next_page_number }}{{url_parms}}">{% trans "Next" %}</a>
{% endif %}
</span>
</div>

0 comments on commit 5c5669a

Please sign in to comment.
Something went wrong with that request. Please try again.