Skip to content

Commit

Permalink
Fix dissapearing search button in additional tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Kani999 committed Aug 13, 2024
1 parent 5049ff0 commit 706bb44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion netbox_attachments/template_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def buttons(self):
return Button


def create_tab_view(model, base_template_name="generic/object.html"):
def create_tab_view(model, base_template_name="generic/object_children.html"):
"""Creates attachment tab. Append it to the passed model
Args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{% extends base_template_name %}
{% load render_table from django_tables2 %}
{% load static %}
{% load helpers %}
{% if perms.netbox_attachments.view_netboxattachment %}
{% block content %}
{% load helpers %}
{% block table_controls %}
{% include "inc/table_controls_htmx.html" with table_modal="NetBoxAttachmentTable_config" %}
{% endblock table_controls %}
<div class="card">
<div class="card-body" id="object_list">
{% include "inc/table_controls_htmx.html" with table_modal="NetBoxAttachmentTable_config" %}
{% include "htmx/table.html" %}
{% htmx_table 'plugins:netbox_attachments:netboxattachment_list' object_type_id=object|content_type_id object_id=object.pk %}
</div>
</div>
<div class="noprint bulk-buttons">
<div class="bulk-button-group"></div>
<div class="bulk-button-group">
{% if perms.netbox_attachments.add_netboxattachment %}
<a href="{% url 'plugins:netbox_attachments:netboxattachment_add' %}?object_type={{ object|content_type_id }}&object_id={{ object.pk }}&return_url={{ request.path }}"
class="btn btn-primary btn-sm">
class="btn btn-primary">
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
Add Attachment
</a>
Expand All @@ -24,7 +26,3 @@
</div>
{% endblock content %}
{% endif %}
{% block modals %}
{{ block.super }}
{% table_config_form table %}
{% endblock modals %}

0 comments on commit 706bb44

Please sign in to comment.