Browse files

Remember letter while navigating

  • Loading branch information...
1 parent c7920fe commit 77f0cf38887b064bf9df57d7522b446b80857df9 @nijel committed Apr 26, 2012
Showing with 5 additions and 4 deletions.
  1. +4 −4 weblate/html/dictionary.html
  2. +1 −0 weblate/trans/views.py
View
8 weblate/html/dictionary.html
@@ -16,11 +16,11 @@
<span id="navi-toolbar" class="ui-widget-header ui-corner-all">
<span class="navi">
-<a class="button-first{% if words.number == 1 %} button-disabled{% endif %}" href="?page=1">{% trans "First" %}</a>
-<a class="button-prev{% if not words.has_previous %} button-disabled{% endif %}" href="?page={{ words.previous_page_number }}">{% trans "Previous" %}</a>
+<a class="button-first{% if words.number == 1 %} button-disabled{% endif %}" href="?page=1&amp;letter={{ letter }}">{% trans "First" %}</a>
+<a class="button-prev{% if not words.has_previous %} button-disabled{% endif %}" href="?page={{ words.previous_page_number }}&amp;letter={{ letter }}">{% trans "Previous" %}</a>
<a class="button-pos">{% blocktrans with words.number as position and words.paginator.num_pages as total %}{{ position }} / {{ total }}{% endblocktrans %}</a>
-<a class="button-next{% if not words.has_next %} button-disabled{% endif %}" href="?page={{ words.next_page_number }}">{% trans "Next" %}</a>
-<a class="button-end{% if words.paginator.num_pages == words.number %} button-disabled{% endif %}" href="?page={{ words.paginator.num_pages }}">{% trans "Last" %}</a>
+<a class="button-next{% if not words.has_next %} button-disabled{% endif %}" href="?page={{ words.next_page_number }}&amp;letter={{ letter }}">{% trans "Next" %}</a>
+<a class="button-end{% if words.paginator.num_pages == words.number %} button-disabled{% endif %}" href="?page={{ words.paginator.num_pages }}&amp;letter={{ letter }}">{% trans "Last" %}</a>
</span>
<form class="letter autosubmit">{{ letterform.as_p }}</form>
</span>
View
1 weblate/trans/views.py
@@ -261,6 +261,7 @@ def show_dictionary(request, project, lang):
'form': form,
'uploadform': uploadform,
'letterform': letterform,
+ 'letter': letterform.cleaned_data['letter'],
}))
def show_project(request, project):

0 comments on commit 77f0cf3

Please sign in to comment.