{% if rule %}
<ol class="breadcrumb">
  <li><a href="{% url 'service-list' %}">Home</a></li>
{% if rule.content_type.model == 'site' %}
    <li><a href="{% url 'rules-list' %}" title="Site">Common Rules</a></li>
{% endif %}
{% if rule.content_type.model == 'service' %}
  <li><a href="{% url 'shard-detail' rule.content_object.shard.id %}" title="Shard">{{ rule.content_object.shard.name }}</a></li>
  <li><a href="{% url 'service-detail' rule.content_object.id %}" title="Service">{{ rule.content_object.name }}</a></li>
{% endif %}
{% if rule.content_type.model == 'project' %}
  <li><a href="{% url 'shard-detail' rule.content_object.service.shard.id %}" title="Shard">{{ rule.content_object.service.shard.name }}</a></li>
  <li><a href="{% url 'service-detail' rule.content_object.service.id %}" title="Service">{{ rule.content_object.service.name }}</a></li>
  <li><a href="{% url 'project-detail' rule.content_object.id %}" title="Project">{{ rule.content_object.name }}</a></li>
{% endif %}
  <li class="active">{{ active }}</li>
</ol>
{% endif %}

{% if service %}
<ol class="breadcrumb">
  <li><a href="{% url 'home' %}">Home</a></li>
  <li><a href="{% url 'shard-detail' service.shard.id %}" title="Shard">{{ service.shard.name }}</a></li>
{% if label %}
  <li><a href="{% url 'service-detail' service.id %}" title="Service">{{ service.name }}</a></li>
  <li class="active">{{ label }}</li>
{% else %}
  <li class="active"><a href="{% url 'service-detail' service.id %}" title="Service">{{ service.name }}</a></li>
{% endif %}
</ol>
{% endif %}

{% if project %}
<ol class="breadcrumb">
  <li><a href="{% url 'home' %}">Home</a></li>
  <li><a href="{% url 'shard-detail' project.service.shard.id %}" title="Shard">{{ project.service.shard.name }}</a></li>
  <li><a href="{% url 'service-detail' project.service.id %}" title="Service">{{ project.service.name }}</a></li>
{% if label %}
  <li><a href="{% url 'project-detail' project.id %}" title="Project">{{ project.name }}</a></li>
  <li class="active">{{ label }}</li>
{% else %}
  <li class="active"><a href="{% url 'project-detail' project.id %}" title="project">{{ project.name }}</a></li>
{% endif %}
</ol>
{% endif %}

{% if shard %}
<ol class="breadcrumb">
  <li><a href="{% url 'home' %}">Home</a></li>
  <li class="active"><a href="{% url 'shard-detail' shard.id %}" title="shard">{{ shard.name }}</a></li>
</ol>
{% endif %}
