Merge pull request #1913 from bookwyrm-social/import-ui-fixes

Fixes links on import page
This commit is contained in:
Mouse Reeve 2022-02-03 14:01:28 -08:00 committed by GitHub
commit f545184c5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@
<span class="icon icon-spinner is-pulled-left" aria-hidden="true"></span> <span class="icon icon-spinner is-pulled-left" aria-hidden="true"></span>
<span>{% trans "In progress" %}</span> <span>{% trans "In progress" %}</span>
<span class="is-pulled-right"> <span class="is-pulled-right">
<a href="#" class="button is-small">{% trans "Refresh" %}</a> <a href="{% url 'import-status' job.id %}" class="button is-small">{% trans "Refresh" %}</a>
</span> </span>
</div> </div>
<div class="is-flex"> <div class="is-flex">
@ -230,7 +230,7 @@
{% if not legacy %} {% if not legacy %}
<div> <div>
{% include 'snippets/pagination.html' with page=items %} {% include 'snippets/pagination.html' with page=items path=page_path %}
</div> </div>
{% endif %} {% endif %}
{% endspaceless %}{% endblock %} {% endspaceless %}{% endblock %}

View file

@ -5,6 +5,7 @@ from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
from django.urls import reverse
from django.views import View from django.views import View
from bookwyrm import models from bookwyrm import models
@ -35,6 +36,7 @@ class ImportTroubleshoot(View):
page.number, on_each_side=2, on_ends=1 page.number, on_each_side=2, on_ends=1
), ),
"complete": True, "complete": True,
"page_path": reverse("import-troubleshoot", args=[job.id]),
} }
return TemplateResponse(request, "import/troubleshoot.html", data) return TemplateResponse(request, "import/troubleshoot.html", data)