remove unneeded tag

This commit is contained in:
Matthias 2021-07-06 21:25:42 +02:00
parent 98c52c06ac
commit 2db42eff50
2 changed files with 3 additions and 10 deletions

View File

@ -11,7 +11,7 @@ from django.utils.translation import ugettext_lazy as _
from django.conf import settings as djangosettings
from django import template
from django.urls import reverse, resolve as resolve_fnc
from django.urls import reverse
from django.utils.safestring import mark_safe
from django.templatetags.static import StaticNode
from InvenTree import version, settings
@ -267,12 +267,6 @@ def object_link(url_name, pk, ref):
return mark_safe('<b><a href="{}">{}</a></b>'.format(ref_url, ref))
@register.simple_tag()
def resolve(url):
"""provides access to resolve function in templates"""
return resolve_fnc(url)
class I18nStaticNode(StaticNode):
"""
custom StaticNode

View File

@ -248,15 +248,14 @@
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Serial Number" %}</td>
<td>
{% resolve request.path as url_path %}
{% if previous %}
<a class="btn btn-default" aria-label="{% trans 'previous page' %}" href="{% url url_path.url_name previous.id %}">
<a class="btn btn-default" aria-label="{% trans 'previous page' %}" href="{% url request.resolver_match.url_name previous.id %}">
<small>{{ previous.serial }}</small>
</a>
{% endif %}
<span class="btn" href=""><strong>{{ item.serial }}</strong></span>
{% if next %}
<a class="btn btn-default text-sm" aria-label="{% trans 'next page' %}" href="{% url url_path.url_name next.id %}">
<a class="btn btn-default text-sm" aria-label="{% trans 'next page' %}" href="{% url request.resolver_match.url_name next.id %}">
<small>{{ next.serial }}</small>
</a>
{% endif %}