{% load i18n %}

<div class="detail">
  <dl class="dl-horizontal">
    <dt>{% trans "Name" %}</dt>
    <dd data-display="{{ user.name|default:user.id }}" class="word-wrap">{{ user.name }}</dd>
    <dt>{% trans "ID" %}</dt>
    <dd>{{ user.id }}</dd>
    {% if domain_name %}
      <dt>{% trans "Domain Name" %}</dt>
      <dd class="word-wrap">{{ domain_name }}</dd>
    {% endif %}
    <dt>{% trans "Domain ID" %}</dt>
    <dd>{{ user.domain_id }}</dd>
    <dt>{% trans "Description" %}</dt>
    <dd>{{ user.description|default:_("-") }}</dd>
    <dt>{% trans "Email" %}</dt>
    <dd>{{ user.email|default:_("-") }}</dd>
    <dt>{% trans "Enabled" %}</dt>
    <dd>{{ user.enabled|yesno|capfirst }}</dd>
    <dt>{% trans "Password Expires At" %}</dt>
    <dd>{{ user.password_expires_at }}</dd>
    <dt>{% trans "Lock password" %}</dt>
    <dd>{{ lock_password|yesno:"yes,no"|capfirst }}</dd>
    <dt>{% trans "Primary Project" %}</dt>
    {% if user.project_id %}
      <dd class="word-wrap">
        <a href="{% url 'horizon:identity:projects:detail' project_id=user.project_id %}">
        {{ project_name|default:user.project_id }}</a>
      </dd>
    {% else %}
      <dd>{% trans "-" %}</dd>
    {% endif %}
    {% if extras %}
      {% for key, value in extras.items %}
        <dt>{{ key }}</dt>
        <dd>{{ value }}</dd>
      {% endfor %}
    {% endif %}
  </dl>
</div>

