Skip to content

Commit

Permalink
Fix job details view
Browse files Browse the repository at this point in the history
  • Loading branch information
alehaa authored and jeremystretch committed Aug 14, 2024
1 parent 8b91fb8 commit c6c0ab2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions netbox/templates/core/job.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

{% block breadcrumbs %}
{{ block.super }}
<li class="breadcrumb-item">
<a href="{% url 'core:job_list' %}?object_type={{ object.object_type_id }}">{{ object.object|meta:"verbose_name_plural"|bettertitle }}</a>
</li>
{% with parent_jobs_viewname=object.object|viewname:"jobs" %}
{% if object.object %}
<li class="breadcrumb-item">
<a href="{% url parent_jobs_viewname pk=object.object.pk %}">{{ object.object }}</a>
<a href="{% url 'core:job_list' %}?object_type={{ object.object_type_id }}">{{ object.object|meta:"verbose_name_plural"|bettertitle }}</a>
</li>
{% endwith %}
{% with parent_jobs_viewname=object.object|viewname:"jobs" %}
<li class="breadcrumb-item">
<a href="{% url parent_jobs_viewname pk=object.object.pk %}">{{ object.object }}</a>
</li>
{% endwith %}
{% else %}
<li class="breadcrumb-item">
<a href="{% url 'core:job_list' %}?name={{ object.name|urlencode }}">{{ object.name }}</a>
</li>
{% endif %}
{% endblock breadcrumbs %}

{% block control-buttons %}
Expand Down

0 comments on commit c6c0ab2

Please sign in to comment.