{% load i18n %}

<h3>{% trans "Component Details" %}</h3>
<div class="status_detail">
  <h4>{% trans "Info" %}</h4>
  <dl>
      {% for key, value in service.items %}
        {% if key == 'Instance' %}
        <dt>{% trans "Instance name" %}</dt>
            <dd>
                <a href=" {% url 'horizon:project:instances:detail' value.id %}">
                    {{ value.name }}
                </a>
            </dd><br>
        {% elif key == 'Instances' %}
            {% for instance in value %}
                <dt>{% blocktrans trimmed %}Instance{{forloop.counter}} name{% endblocktrans %}</dt>
                <dd>
                    <a href=" {% url 'horizon:project:instances:detail' instance.id %}">
                        {{ instance.name }}
                    </a>
                </dd><br>
            {% endfor %}
        {% elif key == 'Stack'%}
        <dt>{% trans "Heat Orchestration stack name" %}</dt>
            <dd>
                <a href=" {% url 'horizon:project:stacks:detail' value.id %}">
                    {{ value.name }}
                </a>
            </dd><br>
        {% elif key == 'Stacks'%}
            {% for stack in value %}
            <dt>{% blocktrans trimmed %}Heat Orchestration stack{{forloop.counter}} name{% endblocktrans %}</dt>
                <dd>
                    <a href=" {% url 'horizon:project:stacks:detail' stack.id %}">
                        {{ stack.name }}
                    </a>
                </dd><br>
            {% endfor %}
        {% else %}
            <dt>{{ key }}</dt>
            <dd>{{ value }}</dd>
            <br>
        {% endif %}
      {% endfor %}
  </dl>
</div>
