circuittype.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% load render_table from django_tables2 %}
  5. {% load i18n %}
  6. {% block extra_controls %}
  7. {% if perms.circuits.add_circuit %}
  8. <a href="{% url 'circuits:circuit_add' %}?type={{ object.pk }}" class="btn btn-primary">
  9. <span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Circuit" %}
  10. </a>
  11. {% endif %}
  12. {% endblock extra_controls %}
  13. {% block content %}
  14. <div class="row mb-3">
  15. <div class="col col-12 col-md-6">
  16. <div class="card">
  17. <h2 class="card-header">{% trans "Circuit Type" %}</h2>
  18. <table class="table table-hover attr-table">
  19. <tr>
  20. <th scope="row">{% trans "Name" %}</th>
  21. <td>{{ object.name }}</td>
  22. </tr>
  23. <tr>
  24. <th scope="row">{% trans "Description" %}</th>
  25. <td>{{ object.description|placeholder }}</td>
  26. </tr>
  27. <tr>
  28. <th scope="row">{% trans "Color" %}</th>
  29. <td>
  30. {% if object.color %}
  31. <span class="badge color-label" style="background-color: #{{ object.color }}">&nbsp;</span>
  32. {% else %}
  33. {{ ''|placeholder }}
  34. {% endif %}
  35. </td>
  36. </tr>
  37. </table>
  38. </div>
  39. {% include 'inc/panels/tags.html' %}
  40. {% plugin_left_page object %}
  41. </div>
  42. <div class="col col-12 col-md-6">
  43. {% include 'inc/panels/related_objects.html' %}
  44. {% include 'inc/panels/custom_fields.html' %}
  45. {% plugin_right_page object %}
  46. </div>
  47. </div>
  48. <div class="row mb-3">
  49. <div class="col col-md-12">
  50. {% plugin_full_width_page object %}
  51. </div>
  52. </div>
  53. {% endblock %}