-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moves non-racked devices to tab #11803
- Loading branch information
1 parent
c89193d
commit 7158360
Showing
3 changed files
with
71 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{% extends 'dcim/rack/base.html' %} | ||
{% load helpers %} | ||
|
||
{% block extra_controls %} | ||
{% if perms.dcim.add_device %} | ||
<div class="bulk-button-group"> | ||
<a href="{% url 'dcim:device_add' %}?rack={{ object.pk }}&site={{ object.site.pk }}&return_url={% url 'dcim:rack_nonracked_devices' pk=object.pk %}" | ||
class="btn btn-primary btn-sm"> | ||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add non-racked device | ||
</a> | ||
</div> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% include 'inc/table_controls_htmx.html' with table_modal="DeviceTable_config" %} | ||
|
||
<form method="post"> | ||
{% csrf_token %} | ||
|
||
<div class="card"> | ||
<div class="card-body htmx-container table-responsive" id="object_list"> | ||
{% include 'htmx/table.html' %} | ||
</div> | ||
</div> | ||
|
||
<div class="noprint bulk-buttons"> | ||
<div class="bulk-button-group"> | ||
{% if 'bulk_edit' in actions %} | ||
<button type="submit" name="_edit" | ||
formaction="{% url 'dcim:device_bulk_edit' %}?return_url={% url 'dcim:rack_nonracked_devices' pk=object.pk %}" | ||
class="btn btn-warning btn-sm"> | ||
<i class="mdi mdi-pencil" aria-hidden="true"></i> Edit | ||
</button> | ||
{% endif %} | ||
{% if 'bulk_delete' in actions %} | ||
<button type="submit" | ||
formaction="{% url 'dcim:device_bulk_delete' %}?return_url={% url 'dcim:rack_nonracked_devices' 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> | ||
{% endblock content %} | ||
|
||
{% block modals %} | ||
{{ block.super }} | ||
{% table_config_form table %} | ||
{% endblock modals %} |