rackreservation.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {% extends '_base.html' %}
  2. {% load buttons %}
  3. {% load custom_links %}
  4. {% load helpers %}
  5. {% load static %}
  6. {% load plugins %}
  7. {% block header %}
  8. <div class="row noprint">
  9. <div class="col-sm-8 col-md-9">
  10. <ol class="breadcrumb">
  11. <li><a href="{% url 'dcim:rackreservation_list' %}">Rack Reservations</a></li>
  12. <li><a href="{{ rackreservation.rack.get_absolute_url }}">{{ rackreservation.rack }}</a></li>
  13. <li>Units {{ rackreservation.unit_list }}</li>
  14. </ol>
  15. </div>
  16. <div class="col-sm-4 col-md-3">
  17. <form action="{% url 'dcim:rackreservation_list' %}" method="get">
  18. <div class="input-group">
  19. <input type="text" name="q" class="form-control" placeholder="Search racks" />
  20. <span class="input-group-btn">
  21. <button type="submit" class="btn btn-primary">
  22. <span class="fa fa-search" aria-hidden="true"></span>
  23. </button>
  24. </span>
  25. </div>
  26. </form>
  27. </div>
  28. </div>
  29. <div class="pull-right noprint">
  30. {% plugin_buttons rackreservation %}
  31. {% if perms.dcim.change_rackreservation %}
  32. {% edit_button rackreservation %}
  33. {% endif %}
  34. {% if perms.dcim.delete_rackreservation %}
  35. {% delete_button rackreservation %}
  36. {% endif %}
  37. </div>
  38. <h1>{% block title %}{{ rackreservation }}{% endblock %}</h1>
  39. {% include 'inc/created_updated.html' with obj=rackreservation %}
  40. <ul class="nav nav-tabs">
  41. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  42. <a href="{{ rackreservation.get_absolute_url }}">Rack</a>
  43. </li>
  44. {% if perms.extras.view_objectchange %}
  45. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  46. <a href="{% url 'dcim:rackreservation_changelog' pk=rackreservation.pk %}">Change Log</a>
  47. </li>
  48. {% endif %}
  49. </ul>
  50. {% endblock %}
  51. {% block content %}
  52. <div class="row">
  53. <div class="col-md-6">
  54. <div class="panel panel-default">
  55. <div class="panel-heading">
  56. <strong>Rack</strong>
  57. </div>
  58. <table class="table table-hover panel-body attr-table">
  59. {% with rack=rackreservation.rack %}
  60. <tr>
  61. <td>Site</td>
  62. <td>
  63. {% if rack.site.region %}
  64. <a href="{{ rack.site.region.get_absolute_url }}">{{ rack.site.region }}</a>
  65. <i class="fa fa-angle-right"></i>
  66. {% endif %}
  67. <a href="{% url 'dcim:site' slug=rack.site.slug %}">{{ rack.site }}</a>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>Group</td>
  72. <td>
  73. {% if rack.group %}
  74. <a href="{% url 'dcim:rack_list' %}?site={{ rack.site.slug }}&group={{ rack.group.slug }}">{{ rack.group }}</a>
  75. {% else %}
  76. <span class="text-muted">None</span>
  77. {% endif %}
  78. </td>
  79. </tr>
  80. <tr>
  81. <td>Rack</td>
  82. <td>
  83. <a href="{{ rack.get_absolute_url }}">{{ rack }}</a>
  84. </td>
  85. </tr>
  86. {% endwith %}
  87. </table>
  88. </div>
  89. <div class="panel panel-default">
  90. <div class="panel-heading">
  91. <strong>Reservation Details</strong>
  92. </div>
  93. <table class="table table-hover panel-body attr-table">
  94. <tr>
  95. <td>Units</td>
  96. <td>{{ rackreservation.unit_list }}</td>
  97. </tr>
  98. <tr>
  99. <td>Tenant</td>
  100. <td>
  101. {% if rackreservation.tenant %}
  102. {% if rackreservation.tenant.group %}
  103. <a href="{{ rackreservation.tenant.group.get_absolute_url }}">{{ rackreservation.tenant.group }}</a>
  104. <i class="fa fa-angle-right"></i>
  105. {% endif %}
  106. <a href="{{ rackreservation.tenant.get_absolute_url }}">{{ rackreservation.tenant }}</a>
  107. {% else %}
  108. <span class="text-muted">None</span>
  109. {% endif %}
  110. </td>
  111. </tr>
  112. <tr>
  113. <td>User</td>
  114. <td>{{ rackreservation.user }}</td>
  115. </tr>
  116. <tr>
  117. <td>Description</td>
  118. <td>{{ rackreservation.description }}</td>
  119. </tr>
  120. </table>
  121. </div>
  122. {% plugin_left_page rackreservation %}
  123. </div>
  124. <div class="col-md-6">
  125. {% with rack=rackreservation.rack %}
  126. <div class="row" style="margin-bottom: 20px">
  127. <div class="col-md-6 col-sm-6 col-xs-12">
  128. <div class="rack_header">
  129. <h4>Front</h4>
  130. </div>
  131. {% include 'dcim/inc/rack_elevation.html' with face='front' %}
  132. </div>
  133. <div class="col-md-6 col-sm-6 col-xs-12">
  134. <div class="rack_header">
  135. <h4>Rear</h4>
  136. </div>
  137. {% include 'dcim/inc/rack_elevation.html' with face='rear' %}
  138. </div>
  139. </div>
  140. {% endwith %}
  141. {% plugin_right_page rackreservation %}
  142. </div>
  143. </div>
  144. <div class="row">
  145. <div class="col-md-12">
  146. {% plugin_full_width_page rackreservation %}
  147. </div>
  148. </div>
  149. {% endblock %}
  150. {% block javascript %}
  151. <script src="{% static 'js/rack_elevations.js' %}?v{{ settings.VERSION }}"></script>
  152. {% endblock %}