rackreservation.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. <div class="pull-right noprint">
  41. {% custom_links rackreservation %}
  42. </div>
  43. <ul class="nav nav-tabs">
  44. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  45. <a href="{{ rackreservation.get_absolute_url }}">Rack</a>
  46. </li>
  47. {% if perms.extras.view_objectchange %}
  48. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  49. <a href="{% url 'dcim:rackreservation_changelog' pk=rackreservation.pk %}">Change Log</a>
  50. </li>
  51. {% endif %}
  52. </ul>
  53. {% endblock %}
  54. {% block content %}
  55. <div class="row">
  56. <div class="col-md-6">
  57. <div class="panel panel-default">
  58. <div class="panel-heading">
  59. <strong>Rack</strong>
  60. </div>
  61. <table class="table table-hover panel-body attr-table">
  62. {% with rack=rackreservation.rack %}
  63. <tr>
  64. <td>Site</td>
  65. <td>
  66. {% if rack.site.region %}
  67. <a href="{{ rack.site.region.get_absolute_url }}">{{ rack.site.region }}</a>
  68. <i class="fa fa-angle-right"></i>
  69. {% endif %}
  70. <a href="{% url 'dcim:site' slug=rack.site.slug %}">{{ rack.site }}</a>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>Group</td>
  75. <td>
  76. {% if rack.group %}
  77. <a href="{% url 'dcim:rack_list' %}?site={{ rack.site.slug }}&group={{ rack.group.slug }}">{{ rack.group }}</a>
  78. {% else %}
  79. <span class="text-muted">None</span>
  80. {% endif %}
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>Rack</td>
  85. <td>
  86. <a href="{{ rack.get_absolute_url }}">{{ rack }}</a>
  87. </td>
  88. </tr>
  89. {% endwith %}
  90. </table>
  91. </div>
  92. <div class="panel panel-default">
  93. <div class="panel-heading">
  94. <strong>Reservation Details</strong>
  95. </div>
  96. <table class="table table-hover panel-body attr-table">
  97. <tr>
  98. <td>Units</td>
  99. <td>{{ rackreservation.unit_list }}</td>
  100. </tr>
  101. <tr>
  102. <td>Tenant</td>
  103. <td>
  104. {% if rackreservation.tenant %}
  105. {% if rackreservation.tenant.group %}
  106. <a href="{{ rackreservation.tenant.group.get_absolute_url }}">{{ rackreservation.tenant.group }}</a>
  107. <i class="fa fa-angle-right"></i>
  108. {% endif %}
  109. <a href="{{ rackreservation.tenant.get_absolute_url }}">{{ rackreservation.tenant }}</a>
  110. {% else %}
  111. <span class="text-muted">None</span>
  112. {% endif %}
  113. </td>
  114. </tr>
  115. <tr>
  116. <td>User</td>
  117. <td>{{ rackreservation.user }}</td>
  118. </tr>
  119. <tr>
  120. <td>Description</td>
  121. <td>{{ rackreservation.description }}</td>
  122. </tr>
  123. </table>
  124. </div>
  125. {% plugin_left_page rackreservation %}
  126. </div>
  127. <div class="col-md-6">
  128. {% with rack=rackreservation.rack %}
  129. <div class="row" style="margin-bottom: 20px">
  130. <div class="col-md-6 col-sm-6 col-xs-12">
  131. <div class="rack_header">
  132. <h4>Front</h4>
  133. </div>
  134. {% include 'dcim/inc/rack_elevation.html' with face='front' %}
  135. </div>
  136. <div class="col-md-6 col-sm-6 col-xs-12">
  137. <div class="rack_header">
  138. <h4>Rear</h4>
  139. </div>
  140. {% include 'dcim/inc/rack_elevation.html' with face='rear' %}
  141. </div>
  142. </div>
  143. {% endwith %}
  144. {% plugin_right_page rackreservation %}
  145. </div>
  146. </div>
  147. <div class="row">
  148. <div class="col-md-12">
  149. {% plugin_full_width_page rackreservation %}
  150. </div>
  151. </div>
  152. {% endblock %}
  153. {% block javascript %}
  154. <script src="{% static 'js/rack_elevations.js' %}?v{{ settings.VERSION }}"></script>
  155. {% endblock %}