cable.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {% extends 'generic/object.html' %}
  2. {% load buttons %}
  3. {% load helpers %}
  4. {% load perms %}
  5. {% load plugins %}
  6. {% block content %}
  7. <div class="row">
  8. <div class="col col-md-6">
  9. <div class="card">
  10. <h5 class="card-header">
  11. Cable
  12. </h5>
  13. <div class="card-body">
  14. <table class="table table-hover attr-table">
  15. <tr>
  16. <th scope="row">Type</th>
  17. <td>{{ object.get_type_display|placeholder }}</td>
  18. </tr>
  19. <tr>
  20. <th scope="row">Status</th>
  21. <td>{% badge object.get_status_display bg_color=object.get_status_color %}</td>
  22. </tr>
  23. <tr>
  24. <th scope="row">Tenant</th>
  25. <td>
  26. {% if object.tenant.group %}
  27. {{ object.tenant.group|linkify }} /
  28. {% endif %}
  29. {{ object.tenant|linkify|placeholder }}
  30. </td>
  31. </tr>
  32. <tr>
  33. <th scope="row">Label</th>
  34. <td>{{ object.label|placeholder }}</td>
  35. </tr>
  36. <tr>
  37. <th scope="row">Color</th>
  38. <td>
  39. {% if object.color %}
  40. <span class="color-label" style="background-color: #{{ object.color }}">&nbsp;</span>
  41. {% else %}
  42. {{ ''|placeholder }}
  43. {% endif %}
  44. </td>
  45. </tr>
  46. <tr>
  47. <th scope="row">Length</th>
  48. <td>
  49. {% if object.length %}
  50. {{ object.length|floatformat }} {{ object.get_length_unit_display }}
  51. {% else %}
  52. {{ ''|placeholder }}
  53. {% endif %}
  54. </td>
  55. </tr>
  56. </table>
  57. </div>
  58. </div>
  59. {% include 'inc/panels/custom_fields.html' %}
  60. {% include 'inc/panels/tags.html' %}
  61. {% plugin_left_page object %}
  62. </div>
  63. <div class="col col-md-6">
  64. <div class="card">
  65. <h5 class="card-header">
  66. Termination A
  67. </h5>
  68. <div class="card-body">
  69. {% include 'dcim/inc/cable_termination.html' with termination=object.termination_a %}
  70. </div>
  71. </div>
  72. <div class="card">
  73. <h5 class="card-header">
  74. Termination B
  75. </h5>
  76. <div class="card-body">
  77. {% include 'dcim/inc/cable_termination.html' with termination=object.termination_b %}
  78. </div>
  79. </div>
  80. {% plugin_right_page object %}
  81. </div>
  82. </div>
  83. <div class="row">
  84. <div class="col col-md-12">
  85. {% plugin_full_width_page object %}
  86. </div>
  87. </div>
  88. {% endblock %}