-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move rack reservations panel to separate tab
- Loading branch information
1 parent
0f6995e
commit 2525eef
Showing
4 changed files
with
86 additions
and
75 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,23 @@ | ||
{% extends 'generic/object.html' %} | ||
|
||
{% block title %}Rack {{ object }}{% endblock %} | ||
|
||
{% block breadcrumbs %} | ||
{{ block.super }} | ||
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?site_id={{ object.site.pk }}">{{ object.site }}</a></li> | ||
{% if object.location %} | ||
{% for location in object.location.get_ancestors %} | ||
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ location.pk }}">{{ location }}</a></li> | ||
{% endfor %} | ||
<li class="breadcrumb-item"><a href="{% url 'dcim:rack_list' %}?location_id={{ object.location.pk }}">{{ object.location }}</a></li> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block extra_controls %} | ||
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not prev_rack %} disabled{% endif %}"> | ||
<i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous | ||
</a> | ||
<a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}{% endif %}" class="btn btn-sm btn-primary{% if not next_rack %} disabled{% endif %}"> | ||
<i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next | ||
</a> | ||
{% endblock %} |
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,43 @@ | ||
{% extends 'dcim/rack/base.html' %} | ||
{% load helpers %} | ||
|
||
{% block content %} | ||
{% include 'inc/table_controls_htmx.html' with table_modal="RackReservationTable_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:rackreservation_bulk_edit' %}?return_url={% url 'dcim:rack_reservations' 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:rackreservation_bulk_delete' %}?return_url={% url 'dcim:rack_reservations' pk=object.pk %}" class="btn btn-danger btn-sm"> | ||
<i class="mdi mdi-trash-can-outline" aria-hidden="true"></i> Delete | ||
</button> | ||
{% endif %} | ||
</div> | ||
{% if perms.dcim.add_rackreservation %} | ||
<div class="bulk-button-group"> | ||
<a href="{% url 'dcim:rackreservation_add' %}?rack={{ object.pk }}&return_url={% url 'dcim:rack_reservations' pk=object.pk %}" class="btn btn-primary btn-sm"> | ||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add reservation | ||
</a> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</form> | ||
{% endblock %} | ||
|
||
{% block modals %} | ||
{{ block.super }} | ||
{% table_config_form table %} | ||
{% endblock modals %} |