device_component.html 1.7 KB

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