cable.html 2.6 KB

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