{% load i18n  %}

<div class="detail">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd data-display="{{ application_credential.name }}">{{ application_credential.name }}</dd>
    <dt>{% trans "ID" %}</dt>
    <dd>{{ application_credential.id }}</dd>
    <dt>{% trans "Project ID" %}</dt>
    <dd>{{ application_credential.project_id }}</dd>
    <dt>{% trans "Description" %}</dt>
    <dd>{{ application_credential.description | default:_("-") }}</dd>
    <dt>{% trans "Roles" %}</dt>
    <dd>
      <table class="table table-striped table-hover">
        <thead>
          <tr>
            <th><strong>{% trans "Name" %}</strong></th>
            <th><strong>{% trans "ID" %}</strong></th>
            <th><strong>{% trans "Domain" %}</strong></th>
          </tr>
        </thead>
        <tbody>
        {% for role in application_credential.roles %}
          <tr>
            <td>{{ role.name }}</td>
            <td>{{ role.id }}</td>
            <td>{{ role.domain_id | default:_("-") }}</td>
        {% endfor %}
        </tbody>
      </table>
    </dd>
    <dt>{% trans "Expires" %}</dt>
    <dd>{{ application_credential.expires_at | default:_("-") }}</dd>
    <dt>{% trans "Unrestricted" %}</dt>
    <dd>{{ application_credential.unrestricted | yesno }}</dd>
  </dl>
</div>

