Skip to content

Commit

Permalink
Merge pull request #2633 from rtfd/fix-pagination
Browse files Browse the repository at this point in the history
Fix pagination of Builds on build list page.
  • Loading branch information
ericholscher committed Feb 8, 2017
2 parents 7355927 + ab47e96 commit 5732b1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions readthedocs/builds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_context_data(self, **kwargs):
context['filter'] = filter
context['active_builds'] = active_builds
context['versions'] = Version.objects.public(user=self.request.user, project=self.project)
context['build_qs'] = filter.qs

try:
redis = Redis.from_url(settings.BROKER_URL)
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/templates/builds/build_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h3>

<div id="build_list">

{% autopaginate filter.qs 15 %}
{% autopaginate build_qs 15 %}

<!-- BEGIN builds list -->
<div class="module">
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/templates/core/build_list_detailed.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}
{% load static %}

{% for build in filter.qs %}
{% for build in build_qs %}
<li class="module-item col-span">
<div id="build-{{ build.id }}">
<a href="{{ build.get_absolute_url }}"><span id="build-state">{% if build.state != 'finished' %}{{ build.get_state_display }} {% else %} {% if build.success %}{% trans "Passed" %}{% else %}{% trans "Failed" %}{% endif %}{% endif %}</span>
Expand Down

0 comments on commit 5732b1f

Please sign in to comment.