Skip to content

Commit

Permalink
fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
oscie57 authored and noahpistilli committed Jun 17, 2024
1 parent 858d686 commit bbabb71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions templates/vote_category_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@

{% block add_footer %}
{% if categories.has_prev %}
<a href="{{ url_for('list_categories', page=categories.prev_num) }}">&lt; Previous</a>
<a href="{{ url_for('votes_list_categories', page=categories.prev_num) }}">&lt; Previous</a>
{% else %}
&lt; Previous
{% endif %}
|
{% if categories.has_next %}
<a href="{{ url_for('list_categories', page=categories.next_num) }}">Next &gt;</a>
<a href="{{ url_for('votes_list_categories', page=categories.next_num) }}">Next &gt;</a>
{% else %}
Next &gt;
{% endif %}
Expand Down
8 changes: 4 additions & 4 deletions templates/vote_movie_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
{% block add_footer %}
<!-- Previous/Next -->
{% if movies.has_prev %}
<a href="{{ url_for('list_movies', category=category_id, page=movies.prev_num) }}">&lt; Previous</a>
<a href="{{ url_for('votes_list_movies', category=category_id, page=movies.prev_num) }}">&lt; Previous</a>
{% else %}
&lt; Previous
{% endif %}
|
{% if movies.has_next %}
<a href="{{ url_for('list_movies', category=category_id, page=movies.next_num) }}">Next &gt;</a>
<a href="{{ url_for('votes_list_movies', category=category_id, page=movies.next_num) }}">Next &gt;</a>
{% else %}
Next &gt;
{% endif %}
Expand All @@ -55,14 +55,14 @@
<!-- First/Last -->
<!-- Ensure we are not on the first page. -->
{% if movies.page != 1 %}
<a href="{{ url_for('list_movies', category=category_id, page=1) }}">&lt;&lt; First</a>
<a href="{{ url_for('votes_list_movies', category=category_id, page=1) }}">&lt;&lt; First</a>
{% else %}
&lt;&lt; First
{% endif %}
|
<!-- Ensure we are not on the last page. -->
{% if movies.page != movies.pages %}
<a href="{{ url_for('list_movies', category=category_id, page=movies.pages) }}">Last &gt;&gt;</a>
<a href="{{ url_for('votes_list_movies', category=category_id, page=movies.pages) }}">Last &gt;&gt;</a>
{% else %}
Last &gt;&gt;
{% endif %}
Expand Down

0 comments on commit bbabb71

Please sign in to comment.