{% extends "misago/profile/base.html" %}
{% load i18n %}


{% block title %}{% trans "Details" %} | {{ block.super }}{% endblock %}


{% block og-title %}{% trans "Details" %} | {{ block.super }}{% endblock %}


{% block section %}
<div class="profile-details">
  <div>
    <nav class="toolbar">
      <div class="row">
        <div class="col-sm-8 col-md-10">
          <h3 class="md-margin-top-no">
            {% trans "Details" %}
          </h3>
        </div>
        {% if profile_details.edit %}
          <div class="col-sm-4 col-md-2">
            <button type="button" class="btn btn-default btn-outline btn-block" disabled>
              {% trans "Edit" %}
            </button>
          </div>
        {% endif %}
      </div>
    </nav>
  </div>

  {% if profile_details.groups %}
    <div>
      {% for group in profile_details.groups %}
        <div class="panel panel-default panel-profile-details-group">
          <div class="panel-heading">
            <h3 class="panel-title">{{ group.name }}</h3>
          </div>
          <div class="panel-body">
            <div class="form-horizontal">
              {% for field in group.fields %}
                <div class="form-group">
                  <strong class="control-label col-md-3">
                    {{ field.name }}:
                  </strong>
                  <div class="form-control-static col-md-9">
                    {% if field.html %}
                      {{ field.html|safe }}
                    {% elif field.url %}
                      <p>
                        <a href="{{ field.url }}" target="_blank" rel="nofollow">
                          {% if field.text %}
                            {{ field.text }}
                          {% else %}
                            {{ field.url }}
                          {% endif %}
                        </a>
                      </p>
                    {% elif field.text %}
                      <p>{{ field.text }}</p>
                    {% endif %}
                  </div>
                </div>
              {% endfor %}
            </div>
          </div>
        </div>
      {% endfor %}
    </div>
  {% else %}
    <div class="panel panel-default">
      <div class="panel-body text-center lead">
        {% if is_authenticated_user %}
          {% trans "You are not sharing any details with others." %}
        {% else %}
          {% blocktrans trimmed with username=profile %}
            {{ username }} is not sharing any details with others.
          {% endblocktrans %}
        {% endif %}
      </div>
    </div>
  {% endif %}
</div>
{% endblock section %}