mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-20 18:48:45 -06:00
* Support menu items that are callables * Fix quote on add button * Clarify docstring to differentiate link and url * Back out support for callables but keep alternate prerendered url param * Make url a property on MenuItem/PluginMenuItem etc, overridable via a setter * Use reverse_lazy instead of reverse * Use reverse_lazy instead of reverse
This commit is contained in:
@@ -41,11 +41,11 @@
|
||||
</div>
|
||||
{% for item, buttons in items %}
|
||||
<div class="dropdown-item d-flex justify-content-between ps-3 py-0">
|
||||
<a href="{% url item.link %}" class="d-inline-flex flex-fill py-1">{{ item.link_text }}</a>
|
||||
<a href="{{ item.url }}" class="d-inline-flex flex-fill py-1">{{ item.link_text }}</a>
|
||||
{% if buttons %}
|
||||
<div class="btn-group ms-1">
|
||||
{% for button in buttons %}
|
||||
<a href="{% url button.link %}" class="btn btn-sm btn-{{ button.color|default:"outline" }} lh-2 px-2" title="{{ button.title }}">
|
||||
<a href="{{ button.url }}" class="btn btn-sm btn-{{ button.color|default:"outline" }} lh-2 px-2" title="{{ button.title }}">
|
||||
<i class="{{ button.icon_class }}"></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user