mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Enable HTMX for all ObjectChildrenViews
This commit is contained in:
		@@ -1,6 +1,5 @@
 | 
			
		||||
{% extends 'ipam/prefix/base.html' %}
 | 
			
		||||
{% load helpers %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
{% block extra_controls %}
 | 
			
		||||
  {% if perms.ipam.add_ipaddress and first_available_ip %}
 | 
			
		||||
@@ -11,11 +10,30 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <div class="row">
 | 
			
		||||
    <div class="col col-md-12">
 | 
			
		||||
      {% include 'inc/table_controls.html' with table_modal="IPAddressTable_config" %}
 | 
			
		||||
      {% include 'utilities/obj_table.html' with heading='IP Addresses' bulk_edit_url='ipam:ipaddress_bulk_edit' bulk_delete_url='ipam:ipaddress_bulk_delete' %}
 | 
			
		||||
  <form method="post">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    {% include 'inc/table_controls_htmx.html' with table_modal="IPAddressTable_config" %}
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="card-body" id="object_list">
 | 
			
		||||
        {% include 'htmx/table.html' %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
  {% table_config_form table table_name="IPAddressTable" %}
 | 
			
		||||
 | 
			
		||||
    <div class="noprint bulk-buttons">
 | 
			
		||||
      <div class="bulk-button-group">
 | 
			
		||||
        {% if perms.ipam.change_ipaddress %}
 | 
			
		||||
          <button type="submit" name="_edit" formaction="{% url 'ipam:ipaddress_bulk_edit' %}?return_url={% url 'ipam:prefix_ipaddresses' pk=object.pk %}" class="btn btn-warning btn-sm">
 | 
			
		||||
            <i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if perms.ipam.delete_ipaddress %}
 | 
			
		||||
          <button type="submit" name="_delete" formaction="{% url 'ipam:ipaddress_bulk_delete' %}?return_url={% url 'ipam:prefix_ipaddresses' pk=object.pk %}" class="btn btn-danger btn-sm">
 | 
			
		||||
            <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </form>
 | 
			
		||||
  {% table_config_form table %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,31 @@
 | 
			
		||||
{% extends 'ipam/prefix/base.html' %}
 | 
			
		||||
{% load helpers %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <div class="row">
 | 
			
		||||
    <div class="col col-md-12">
 | 
			
		||||
      {% include 'inc/table_controls.html' with table_modal="IPRangeTable_config" %}
 | 
			
		||||
      {% include 'utilities/obj_table.html' with heading='Child IP Ranges' bulk_edit_url='ipam:iprange_bulk_edit' bulk_delete_url='ipam:iprange_bulk_delete' parent=prefix %}
 | 
			
		||||
  <form method="post">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    {% include 'inc/table_controls_htmx.html' with table_modal="IPRangeTable_config" %}
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="card-body" id="object_list">
 | 
			
		||||
        {% include 'htmx/table.html' %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
  {% table_config_form table table_name="IPRangeTable" %}
 | 
			
		||||
 | 
			
		||||
    <div class="noprint bulk-buttons">
 | 
			
		||||
      <div class="bulk-button-group">
 | 
			
		||||
        {% if perms.ipam.change_iprange %}
 | 
			
		||||
          <button type="submit" name="_edit" formaction="{% url 'ipam:iprange_bulk_edit' %}?return_url={% url 'ipam:prefix_ipranges' pk=object.pk %}" class="btn btn-warning btn-sm">
 | 
			
		||||
            <i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if perms.ipam.delete_iprange %}
 | 
			
		||||
          <button type="submit" name="_delete" formaction="{% url 'ipam:iprange_bulk_delete' %}?return_url={% url 'ipam:prefix_ipranges' pk=object.pk %}" class="btn btn-danger btn-sm">
 | 
			
		||||
            <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </form>
 | 
			
		||||
  {% table_config_form table %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
{% extends 'ipam/prefix/base.html' %}
 | 
			
		||||
{% load helpers %}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
{% block extra_controls %}
 | 
			
		||||
  {% include 'ipam/inc/toggle_available.html' %}
 | 
			
		||||
@@ -13,11 +12,30 @@
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <div class="row">
 | 
			
		||||
    <div class="col col-md-12">
 | 
			
		||||
      {% include 'inc/table_controls.html' with table_modal="PrefixTable_config" %}
 | 
			
		||||
      {% include 'utilities/obj_table.html' with heading='Child Prefixes' bulk_edit_url='ipam:prefix_bulk_edit' bulk_delete_url='ipam:prefix_bulk_delete' parent=prefix %}
 | 
			
		||||
  <form method="post">
 | 
			
		||||
    {% csrf_token %}
 | 
			
		||||
    {% include 'inc/table_controls_htmx.html' with table_modal="PrefixTable_config" %}
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
      <div class="card-body" id="object_list">
 | 
			
		||||
        {% include 'htmx/table.html' %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
  {% table_config_form table table_name="PrefixTable" %}
 | 
			
		||||
 | 
			
		||||
    <div class="noprint bulk-buttons">
 | 
			
		||||
      <div class="bulk-button-group">
 | 
			
		||||
        {% if perms.ipam.change_prefix %}
 | 
			
		||||
          <button type="submit" name="_edit" formaction="{% url 'ipam:prefix_bulk_edit' %}?return_url={% url 'ipam:prefix_prefixes' pk=object.pk %}" class="btn btn-warning btn-sm">
 | 
			
		||||
            <i class="mdi mdi-pencil" aria-hidden="true"></i> Edit
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if perms.ipam.delete_prefix %}
 | 
			
		||||
          <button type="submit" name="_delete" formaction="{% url 'ipam:prefix_bulk_delete' %}?return_url={% url 'ipam:prefix_prefixes' pk=object.pk %}" class="btn btn-danger btn-sm">
 | 
			
		||||
            <i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete
 | 
			
		||||
          </button>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </form>
 | 
			
		||||
  {% table_config_form table %}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user