device_component.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. {% extends 'base.html' %}
  2. {% load helpers %}
  3. {% load perms %}
  4. {% load plugins %}
  5. {% block header %}
  6. <div class="row noprint">
  7. <div class="col-md-12">
  8. <ol class="breadcrumb">
  9. <li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
  10. <li><a href="{{ object.device.get_absolute_url }}">{{ object.device }}</a></li>
  11. <li><a href="{% url object|viewname:"list" %}?device_id={{ object.device.pk }}">{{ object|meta:"verbose_name_plural"|bettertitle }}</a></li>
  12. <li>{{ object }}</li>
  13. </ol>
  14. </div>
  15. </div>
  16. <div class="pull-right noprint">
  17. {% plugin_buttons object %}
  18. {% if request.user|can_change:object %}
  19. <a href="{% url object|viewname:"edit" pk=object.pk %}" class="btn btn-warning">
  20. <span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
  21. </a>
  22. {% endif %}
  23. {% if request.user|can_delete:object %}
  24. <a href="{% url object|viewname:"delete" pk=object.pk %}" class="btn btn-danger">
  25. <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
  26. </a>
  27. {% endif %}
  28. </div>
  29. <h1>{% block title %}{{ object.device }} / {{ object }}{% endblock %}</h1>
  30. <ul class="nav nav-tabs">
  31. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  32. <a href="{{ object.get_absolute_url }}">{{ object|meta:"verbose_name"|bettertitle }}</a>
  33. </li>
  34. {% if perms.extras.view_objectchange %}
  35. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  36. <a href="{% url object|viewname:"changelog" pk=object.pk %}">Change Log</a>
  37. </li>
  38. {% endif %}
  39. </ul>
  40. {% endblock %}