{% load i18n %}
{% load inventree_extras %}

<div class='panel-heading'>
    <h4>{% trans "URLs" %}</h4>
</div>
{% define plugin.base_url as base %}
<p>{% blocktrans %}The Base-URL for this plugin is <a href="/{{ base }}" target="_blank"><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 class="btn btn-primary btn-small" href="/{{ base }}{{entry.1}}" target="_blank">{% trans 'Open in new tab' %}</a></td>
        </tr>
        {% endif %}{% endfor %}
    </tbody>
</table>
