Merge pull request #1833 from bookwyrm-social/links-admin-improvements

Links admin improvements
This commit is contained in:
Mouse Reeve 2022-01-17 08:36:48 -08:00 committed by GitHub
commit f769c42abe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -722,6 +722,7 @@ ol.ordered-list li::before {
.overflow-wrap-anywhere { .overflow-wrap-anywhere {
overflow-wrap: anywhere; overflow-wrap: anywhere;
min-width: 10em;
} }
/* Threads /* Threads

View file

@ -42,7 +42,7 @@
<div class="column is-narrow"> <div class="column is-narrow">
<button type="button" class="button" data-modal-open="{{ domain_modal }}"> <button type="button" class="button" data-modal-open="{{ domain_modal }}">
<span class="icon icon-pencil m-0-mobile" aria-hidden="treu"></span> <span class="icon icon-pencil m-0-mobile" aria-hidden="treu"></span>
<span>{% trans "Set display name" %}</span> <span class="is-sr-only-mobile">{% trans "Set display name" %}</span>
</button> </button>
</div> </div>
</div> </div>

View file

@ -20,9 +20,9 @@ class LinkDomain(View):
def get(self, request, status="pending"): def get(self, request, status="pending"):
"""view pending domains""" """view pending domains"""
data = { data = {
"domains": models.LinkDomain.objects.filter(status=status).prefetch_related( "domains": models.LinkDomain.objects.filter(status=status)
"links" .prefetch_related("links")
), .order_by("-created_date"),
"counts": { "counts": {
"pending": models.LinkDomain.objects.filter(status="pending").count(), "pending": models.LinkDomain.objects.filter(status="pending").count(),
"approved": models.LinkDomain.objects.filter(status="approved").count(), "approved": models.LinkDomain.objects.filter(status="approved").count(),