Fixes pagination and user links on import admin

This commit is contained in:
Mouse Reeve 2022-11-03 10:54:59 -07:00
parent 91b935bc0a
commit 0ba4dbbc6f
2 changed files with 11 additions and 2 deletions

View file

@ -43,6 +43,11 @@
<th>
{% trans "Date Created" %}
</th>
{% if status != "active" %}
<th>
{% trans "Date Updated" %}
</th>
{% endif %}
<th>
{% trans "Items" %}
</th>
@ -57,9 +62,12 @@
<tr>
<td>{{ import.id }}</td>
<td class="overflow-wrap-anywhere">
<a href="{% url 'settings-user' user.id %}">{{ import.user|username }}</a>
<a href="{% url 'settings-user' import.user.id %}">{{ import.user|username }}</a>
</td>
<td>{{ import.created_date }}</td>
{% if status != "active" %}
<td>{{ import.updated_date }}</td>
{% endif %}
<td>{{ import.item_count }}</td>
<td>{{ import.pending_item_count }}</td>
{% if status == "active" %}
@ -81,6 +89,6 @@
</table>
</div>
{% include 'snippets/pagination.html' with page=users path=request.path %}
{% include 'snippets/pagination.html' with page=imports path=request.path %}
{% endblock %}

View file

@ -14,6 +14,7 @@ from bookwyrm.tests.validate_html import validate_html
class CeleryStatusViews(TestCase):
"""every response to a get request, html or json"""
# pylint: disable=invalid-name
def setUp(self):
"""we need basic test data and mocks"""
self.factory = RequestFactory()