mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Add site column to redirects listing (and show redirects from all sites, not just current one)
This commit is contained in:
parent
b0878b1534
commit
1033897146
@ -1,7 +1,8 @@
|
||||
{% load i18n %}
|
||||
<table class="listing">
|
||||
<col width="50%"/>
|
||||
<col width="40%"/>
|
||||
<col width="35%"/>
|
||||
<col width="30%"/>
|
||||
<col width="25%"/>
|
||||
<col />
|
||||
<thead>
|
||||
<tr>
|
||||
@ -14,6 +15,7 @@
|
||||
{% trans "From" %}
|
||||
{% endif %}
|
||||
</th>
|
||||
<th>{% trans "Site" %}</th>
|
||||
<th>{% trans "To" %}</th>
|
||||
<th class="type">{% trans "Type" %}</th>
|
||||
</tr>
|
||||
@ -24,6 +26,9 @@
|
||||
<td class="title">
|
||||
<h2><a href="{% url 'wagtailredirects:edit' redirect.id %}" title="{% trans 'Edit this redirect' %}">{{ redirect.title }}</a></h2>
|
||||
</td>
|
||||
<td>
|
||||
{% if redirect.site %}{{ redirect.site }}{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if redirect.redirect_page %}
|
||||
<a href="{% url 'wagtailadmin_pages:edit' redirect.redirect_page.id %}" class="nolink">{{ redirect.redirect_page.title }}</a>
|
||||
|
@ -18,7 +18,7 @@ def index(request):
|
||||
query_string = request.GET.get('q', "")
|
||||
ordering = request.GET.get('ordering', 'old_path')
|
||||
|
||||
redirects = models.Redirect.get_for_site(site=request.site).prefetch_related('redirect_page')
|
||||
redirects = models.Redirect.objects.prefetch_related('redirect_page', 'site')
|
||||
|
||||
# Search
|
||||
if query_string:
|
||||
|
Loading…
Reference in New Issue
Block a user