diff --git a/netbox/templates/dcim/connections_list.html b/netbox/templates/dcim/connections_list.html index cfe17d62f..3202f9a94 100644 --- a/netbox/templates/dcim/connections_list.html +++ b/netbox/templates/dcim/connections_list.html @@ -1,24 +1,56 @@ {% extends 'base/layout.html' %} {% load buttons %} +{% load helpers %} {% load render_table from django_tables2 %} {% block title %}{{ title }}{% endblock %} {% block extra_controls %}{% export_button content_type %}{% endblock %} -{% block content %} -
-
- {% include 'inc/table_controls.html' %} +{% block tabs %} + +{% endblock tabs %} -
- {% render_table table 'inc/table.html' %} -
+{% block content-wrapper %} +
- {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %} + {# Conncetions list #} +
+ {% include 'inc/table_controls.html' %} + +
+
+
+ {% render_table table 'inc/table.html' %} +
- {% if filter_form %} - {% include 'inc/filter_list.html' %} - {% endif %} +
+ + {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
-{% endblock %} + + {# Filter form #} + {% if filter_form %} +
+ {% include 'inc/filter_list.html' %} +
+ {% endif %} + +
+{% endblock content-wrapper %} diff --git a/netbox/templates/dcim/rack_elevation_list.html b/netbox/templates/dcim/rack_elevation_list.html index c9f0080da..0e3a04268 100644 --- a/netbox/templates/dcim/rack_elevation_list.html +++ b/netbox/templates/dcim/rack_elevation_list.html @@ -22,41 +22,70 @@
{% endblock %} -{% block content %} -
-
- {% if page %} -
- {% for rack in page %} -
-
-
- {{ rack.name }} - {% if rack.role %} -
{{ rack.role }} - {% endif %} - {% if rack.facility_id %} -
{{ rack.facility_id }} - {% endif %} -
- {% include 'dcim/inc/rack_elevation.html' with object=rack face=rack_face %} -
-
- {{ rack.name }} - {% if rack.facility_id %} - ({{ rack.facility_id }}) - {% endif %} -
-
-
- {% endfor %} -
-
- {% include 'inc/paginator.html' %} - {% else %} -

No Racks Found

- {% endif %} -
- {% include 'inc/filter_list.html' %} +{% block tabs %} + +{% endblock tabs %} + +{% block content-wrapper %} +
+ + {# Rack elevations #} +
+ {% if page %} +
+ {% for rack in page %} +
+
+
+ {{ rack.name }} + {% if rack.role %} +
{{ rack.role }} + {% endif %} + {% if rack.facility_id %} +
{{ rack.facility_id }} + {% endif %} +
+ {% include 'dcim/inc/rack_elevation.html' with object=rack face=rack_face %} +
+
+ {{ rack.name }} + {% if rack.facility_id %} + ({{ rack.facility_id }}) + {% endif %} +
+
+
+ {% endfor %} +
+
+ {% include 'inc/paginator.html' %} + {% else %} +

No Racks Found

+ {% endif %}
-{% endblock %} + + {# Filter form #} + {% if filter_form %} +
+ {% include 'inc/filter_list.html' %} +
+ {% endif %} + +
+{% endblock content-wrapper %} diff --git a/netbox/templates/generic/object_list.html b/netbox/templates/generic/object_list.html index 2baabb623..4cf3fc9c4 100644 --- a/netbox/templates/generic/object_list.html +++ b/netbox/templates/generic/object_list.html @@ -23,78 +23,112 @@
{% endblock controls %} -{% block content %} -{% if table.paginator.num_pages > 1 %} -{% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %} -
-
- {% csrf_token %} -
-
- {% if bulk_edit_url and permissions.change %} - - {% endif %} - {% if bulk_delete_url and permissions.delete %} - - {% endif %} -
-
- - +{% block tabs %} + +{% endblock tabs %} + +{% block content-wrapper %} +
+ + {# Object list #} +
+ {% if table.paginator.num_pages > 1 %} + + {# "Select all" form #} + {% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %} +
+ + {% csrf_token %} +
+
+ {% if bulk_edit_url and permissions.change %} + + {% endif %} + {% if bulk_delete_url and permissions.delete %} + + {% endif %} +
+
+ + +
+
+ +
+ {% endwith %} + {% endif %} + + {# Object table controls #} + {% include 'inc/table_controls.html' with table_modal="ObjectTable_config" %} + + {# Object table #} +
+
+ {% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %} + {% if permissions.change or permissions.delete %} +
+ {% csrf_token %} + +
+ {% render_table table 'inc/table.html' %} +
+
+
+ {% block bulk_buttons %}{% endblock %} + {% if bulk_edit_url and permissions.change %} + + {% endif %} + {% if bulk_delete_url and permissions.delete %} + + {% endif %} +
+
+
+ {% else %} +
+ {% render_table table 'inc/table.html' %} +
+ {% endif %} + {% endwith %}
- -
-{% endwith %} -{% endif %} + {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %} +
-{# Object table #} -
-
- {# Object list filter, table config #} - {% include 'inc/table_controls.html' with table_modal="ObjectTable_config" %} - - {% with bulk_edit_url=content_type.model_class|validated_viewname:"bulk_edit" bulk_delete_url=content_type.model_class|validated_viewname:"bulk_delete" %} - {% if permissions.change or permissions.delete %} -
- {% csrf_token %} - -
- {% render_table table 'inc/table.html' %} -
-
-
- {% block bulk_buttons %}{% endblock %} - {% if bulk_edit_url and permissions.change %} - - {% endif %} - {% if bulk_delete_url and permissions.delete %} - - {% endif %} -
-
-
- {% else %} -
- {% render_table table 'inc/table.html' %} -
- {% endif %} - {% endwith %} - {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %} + {# Filter form #} + {% if filter_form %} +
+ {% include 'inc/filter_list.html' %} +
+ {% endif %}
- {% if filter_form %} - {% include 'inc/filter_list.html' %} - {% endif %} -
-{% table_config_form table table_name="ObjectTable" %} -{% endblock content %} + + {# Table config form #} + {% table_config_form table table_name="ObjectTable" %} +{% endblock content-wrapper %} diff --git a/netbox/templates/inc/filter_list.html b/netbox/templates/inc/filter_list.html index 8837a75e2..0e65acff5 100644 --- a/netbox/templates/inc/filter_list.html +++ b/netbox/templates/inc/filter_list.html @@ -1,65 +1,60 @@ {% load form_helpers %} {% load helpers %} -
-
-
-
- Field Filters -
-
- {% for field in filter_form.hidden_fields %} - {{ field }} - {% endfor %} - {% if filter_form.field_groups %} - {% for group in filter_form.field_groups %} -
- {% for name in group %} - {% with field=filter_form|get_item:name %} - {% if field|widget_type == 'checkboxinput' %} -
- - {{ field }} -
- {% else %} -
- - {{ field }} -
- {% endif %} - {% endwith %} - {% endfor %} -
- {% if forloop.counter != filter_form.field_groups|length %} -
- {% endif %} - {% endfor %} - {% else %} - {% for field in filter_form.visible_fields %} -
- {% if field|widget_type == 'checkboxinput' %} -
- - {{ field }} -
- {% else %} -
- - {{ field }} -
- {% endif %} -
- {% endfor %} - {% endif %} -
- -
-
-
+
+
+
+ {% for field in filter_form.hidden_fields %} + {{ field }} + {% endfor %} + {% if filter_form.field_groups %} + {% for group in filter_form.field_groups %} +
+ {% for name in group %} + {% with field=filter_form|get_item:name %} + {% if field|widget_type == 'checkboxinput' %} +
+ + {{ field }} +
+ {% else %} +
+ + {{ field }} +
+ {% endif %} + {% endwith %} + {% endfor %} +
+ {% if forloop.counter != filter_form.field_groups|length %} +
+ {% endif %} + {% endfor %} + {% else %} + {% for field in filter_form.visible_fields %} +
+ {% if field|widget_type == 'checkboxinput' %} +
+ + {{ field }} +
+ {% else %} +
+ + {{ field }} +
+ {% endif %} +
+ {% endfor %} + {% endif %} +
+ +
+