diff --git a/app/templates/todo/topics.html b/app/templates/todo/topics.html
index b112254..7fa6644 100644
--- a/app/templates/todo/topics.html
+++ b/app/templates/todo/topics.html
@@ -54,7 +54,10 @@ Topics to be Added
@@ -65,11 +68,11 @@ Topics to be Added
«
- {% for n in range(1, page_max+1) %}
-
+ {% for i in range(1, page_max+1) %}
+
- {{ n }}
+ href="{{ url_for('todo_topics_page', page=i, query=query, show_discarded=show_discarded, n=n, sort=sort_by) }}">
+ {{ i }}
{% endfor %}
diff --git a/app/views/packages/todo.py b/app/views/packages/todo.py
index 803ae44..854e165 100644
--- a/app/views/packages/todo.py
+++ b/app/views/packages/todo.py
@@ -83,9 +83,11 @@ def todo_topics_page():
num = 100
query = query.paginate(page, num, True)
- next_url = url_for("todo_topics_page", page=query.next_num) \
+ next_url = url_for("todo_topics_page", page=query.next_num, query=search, \
+ show_discarded=show_discarded, n=num, sort=sort_by) \
if query.has_next else None
- prev_url = url_for("todo_topics_page", page=query.prev_num) \
+ prev_url = url_for("todo_topics_page", page=query.prev_num, query=search, \
+ show_discarded=show_discarded, n=num, sort=sort_by) \
if query.has_prev else None
return render_template("todo/topics.html", topics=query.items, total=total, \