urls overview in plugin settings

This commit is contained in:
Matthias 2021-09-18 02:47:31 +02:00
parent 1296e631d9
commit 21dee0d459
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -26,6 +26,25 @@
<h4>{% trans "URLs" %}</h4> <h4>{% trans "URLs" %}</h4>
{% define plugin.base_url as base %} {% define plugin.base_url as base %}
<p>{% blocktrans %}The Base-URL for this plugin is <a href="/{{ base }}"><strong>{{ base }}</strong></a>.{% endblocktrans %}</p> <p>{% blocktrans %}The Base-URL for this plugin is <a href="/{{ base }}"><strong>{{ base }}</strong></a>.{% endblocktrans %}</p>
<table class='table table-striped table-condensed'>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "URL" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for key, entry in plugin.urlpatterns.reverse_dict.items %}{% if key %}
<tr>
<td>{{key}}</td>
<td>{{entry.1}}</td>
<td><a href="/{{ base }}{{entry.1}}">{% trans 'open' %}</a></td>
</tr>
{% endif %}{% endfor %}
</tbody>
</table>
{% endif %} {% endif %}
{% endblock %} {% endblock %}