mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-09 21:32:17 -06:00
* adds image attachment list view #11932 * fixed typo * Update netbox/extras/tables/tables.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * Update netbox/extras/forms/filtersets.py Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com> * changes as per review * Disable ordering by size (not stored in database) --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
18 lines
658 B
HTML
18 lines
658 B
HTML
{% load helpers %}
|
|
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
Images
|
|
</h5>
|
|
<div class="card-body htmx-container table-responsive"
|
|
hx-get="{% url 'extras:imageattachment_list' %}?content_type_id={{ object|content_type_id }}&object_id={{ object.pk }}"
|
|
hx-trigger="load"></div>
|
|
{% if perms.extras.add_imageattachment %}
|
|
<div class="card-footer text-end noprint">
|
|
<a href="{% url 'extras:imageattachment_add' %}?content_type={{ object|content_type_id }}&object_id={{ object.pk }}" class="btn btn-primary btn-sm">
|
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Attach an image
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|