mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			159 lines
		
	
	
		
			6.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			159 lines
		
	
	
		
			6.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends 'base.html' %}
 | |
| {% load buttons %}
 | |
| {% load custom_links %}
 | |
| {% load helpers %}
 | |
| {% load static %}
 | |
| {% load plugins %}
 | |
| 
 | |
| {% block header %}
 | |
|     <div class="row noprint">
 | |
|         <div class="col-sm-8 col-md-9">
 | |
|             <ol class="breadcrumb">
 | |
|                 <li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li>
 | |
|                 <li><a href="{{ object.rack.get_absolute_url }}">{{ object.rack }}</a></li>
 | |
|                 <li>Units {{ object.unit_list }}</li>
 | |
|             </ol>
 | |
|         </div>
 | |
|         <div class="col-sm-4 col-md-3">
 | |
|             <form action="{% url 'dcim:rackreservation_list' %}" method="get">
 | |
|                 <div class="input-group">
 | |
|                     <input type="text" name="q" class="form-control" placeholder="Search racks" />
 | |
|                     <span class="input-group-btn">
 | |
|                         <button type="submit" class="btn btn-primary">
 | |
|                             <span class="mdi mdi-magnify" aria-hidden="true"></span>
 | |
|                         </button>
 | |
|                     </span>
 | |
|                 </div>
 | |
|             </form>
 | |
|         </div>
 | |
|     </div>
 | |
|     <div class="pull-right noprint">
 | |
|         {% plugin_buttons object %}
 | |
|         {% if perms.dcim.change_rackreservation %}
 | |
|             {% edit_button object %}
 | |
|         {% endif %}
 | |
|         {% if perms.dcim.delete_rackreservation %}
 | |
|             {% delete_button object %}
 | |
|         {% endif %}
 | |
|     </div>
 | |
|     <h1>{% block title %}{{ object }}{% endblock %}</h1>
 | |
|     {% include 'inc/created_updated.html' %}
 | |
|     <div class="pull-right noprint">
 | |
|         {% custom_links object %}
 | |
|     </div>
 | |
|     <ul class="nav nav-tabs">
 | |
|         <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
 | |
|             <a href="{{ object.get_absolute_url }}">Rack</a>
 | |
|         </li>
 | |
|         {% if perms.extras.view_objectchange %}
 | |
|             <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
 | |
|                 <a href="{% url 'dcim:rackreservation_changelog' pk=object.pk %}">Change Log</a>
 | |
|             </li>
 | |
|         {% endif %}
 | |
|     </ul>
 | |
| {% endblock %}
 | |
| 
 | |
| {% block content %}
 | |
| <div class="row">
 | |
| 	<div class="col-md-6">
 | |
|         <div class="panel panel-default">
 | |
|             <div class="panel-heading">
 | |
|                 <strong>Rack</strong>
 | |
|             </div>
 | |
|             <table class="table table-hover panel-body attr-table">
 | |
|                 {% with rack=object.rack %}
 | |
|                     <tr>
 | |
|                         <td>Site</td>
 | |
|                         <td>
 | |
|                             {% if rack.site.region %}
 | |
|                                 <a href="{{ rack.site.region.get_absolute_url }}">{{ rack.site.region }}</a> /
 | |
|                             {% endif %}
 | |
|                             <a href="{% url 'dcim:site' slug=rack.site.slug %}">{{ rack.site }}</a>
 | |
|                         </td>
 | |
|                     </tr>
 | |
|                     <tr>
 | |
|                         <td>Group</td>
 | |
|                         <td>
 | |
|                             {% if rack.group %}
 | |
|                                 <a href="{% url 'dcim:rack_list' %}?site={{ rack.site.slug }}&group={{ rack.group.slug }}">{{ rack.group }}</a>
 | |
|                             {% else %}
 | |
|                                 <span class="text-muted">None</span>
 | |
|                             {% endif %}
 | |
|                         </td>
 | |
|                     </tr>
 | |
|                     <tr>
 | |
|                         <td>Rack</td>
 | |
|                         <td>
 | |
|                             <a href="{{ rack.get_absolute_url }}">{{ rack }}</a>
 | |
|                         </td>
 | |
|                     </tr>
 | |
|                 {% endwith %}
 | |
|             </table>
 | |
|         </div>
 | |
|         <div class="panel panel-default">
 | |
|             <div class="panel-heading">
 | |
|                 <strong>Reservation Details</strong>
 | |
|             </div>
 | |
|             <table class="table table-hover panel-body attr-table">
 | |
|                 <tr>
 | |
|                     <td>Units</td>
 | |
|                     <td>{{ object.unit_list }}</td>
 | |
|                 </tr>
 | |
|                 <tr>
 | |
|                     <td>Tenant</td>
 | |
|                     <td>
 | |
|                         {% if object.tenant %}
 | |
|                             {% if object.tenant.group %}
 | |
|                                 <a href="{{ object.tenant.group.get_absolute_url }}">{{ object.tenant.group }}</a> /
 | |
|                             {% endif %}
 | |
|                             <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
 | |
|                         {% else %}
 | |
|                             <span class="text-muted">None</span>
 | |
|                         {% endif %}
 | |
|                     </td>
 | |
|                 </tr>
 | |
|                 <tr>
 | |
|                     <td>User</td>
 | |
|                     <td>{{ object.user }}</td>
 | |
|                 </tr>
 | |
|                 <tr>
 | |
|                     <td>Description</td>
 | |
|                     <td>{{ object.description }}</td>
 | |
|                 </tr>
 | |
|             </table>
 | |
|         </div>
 | |
|         {% include 'inc/custom_fields_panel.html' %}
 | |
|         {% include 'extras/inc/tags_panel.html' with tags=object.tags.all url='dcim:rackreservation_list' %}
 | |
|         {% plugin_left_page object %}
 | |
| 	</div>
 | |
|     <div class="col-md-6">
 | |
|         {% with rack=object.rack %}
 | |
|             <div class="row" style="margin-bottom: 20px">
 | |
|                 <div class="col-md-6 col-sm-6 col-xs-12">
 | |
|                     <div class="rack_header">
 | |
|                         <h4>Front</h4>
 | |
|                     </div>
 | |
|                     {% include 'dcim/inc/rack_elevation.html' with face='front' %}
 | |
|                 </div>
 | |
|                 <div class="col-md-6 col-sm-6 col-xs-12">
 | |
|                     <div class="rack_header">
 | |
|                         <h4>Rear</h4>
 | |
|                     </div>
 | |
|                     {% include 'dcim/inc/rack_elevation.html' with face='rear' %}
 | |
|                 </div>
 | |
|             </div>
 | |
|         {% endwith %}
 | |
|         {% plugin_right_page object %}
 | |
|     </div>
 | |
| </div>
 | |
| <div class="row">
 | |
|     <div class="col-md-12">
 | |
|         {% plugin_full_width_page object %}
 | |
|     </div>
 | |
| </div>
 | |
| {% endblock %}
 | |
| 
 | |
| {% block javascript %}
 | |
| <script src="{% static 'js/rack_elevations.js' %}?v{{ settings.VERSION }}"></script>
 | |
| {% endblock %}
 |