forked from mirrors/bookwyrm
Fixes settings tab highlighting
This commit is contained in:
parent
c0b5e6ad78
commit
dcf8a8dab9
3 changed files with 7 additions and 2 deletions
|
@ -63,7 +63,7 @@
|
|||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "IP Address Blocklist" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
{% url 'settings-link-domain' status='pending' as url %}
|
||||
{% url 'settings-link-domain' as url %}
|
||||
<a href="{{ url }}"{% if url in request.path %} class="is-active" aria-selected="true"{% endif %}>{% trans "Link Domains" %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -158,6 +158,11 @@ urlpatterns = [
|
|||
views.EmailBlocklist.as_view(),
|
||||
name="settings-email-blocks-delete",
|
||||
),
|
||||
re_path(
|
||||
r"^setting/link-domains/?$",
|
||||
views.LinkDomain.as_view(),
|
||||
name="settings-link-domain",
|
||||
),
|
||||
re_path(
|
||||
r"^setting/link-domains/(?P<status>(pending|approved|blocked))/?$",
|
||||
views.LinkDomain.as_view(),
|
||||
|
|
|
@ -17,7 +17,7 @@ from bookwyrm import forms, models
|
|||
class LinkDomain(View):
|
||||
"""Moderate links"""
|
||||
|
||||
def get(self, request, status):
|
||||
def get(self, request, status="pending"):
|
||||
"""view pending domains"""
|
||||
data = {
|
||||
"domains": models.LinkDomain.objects.filter(status=status).prefetch_related(
|
||||
|
|
Loading…
Reference in a new issue