mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 20:12:42 -06:00
Introduce panel actions
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
<div class="card">
|
||||
<h2 class="card-header">{{ title }}</h2>
|
||||
<h2 class="card-header">
|
||||
{{ title }}
|
||||
{% if actions %}
|
||||
<div class="card-actions">
|
||||
{% for action in actions %}
|
||||
<a href="{{ action.url }}" class="btn btn-ghost-{{ action.button_class|default:"primary" }} btn-sm">
|
||||
{% if action.button_icon %}
|
||||
<i class="mdi mdi-{{ action.button_icon }}" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
{{ action.label }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</h2>
|
||||
{% block panel_content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
{% block panel_content %}
|
||||
<div class="card-body">
|
||||
{% if comments %}
|
||||
{{ comments|markdown }}
|
||||
{% if object.comments %}
|
||||
{{ object.comments|markdown }}
|
||||
{% else %}
|
||||
<span class="text-muted">{% trans "None" %}</span>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user