{% extends "base.html" %}
{% comment %}
Copyright (C) by BDE ENS Paris-Saclay
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags %}

{% block content %}
<div class="card bg-white mb-3">
  <h3 class="card-header text-center">
    {{ title }} {{ challenge.name }}
  </h3>
  <div class="card-body">
    <ul>
      {% for field, value in fields %}
      <li> {{ field }} : {{ value }}</li>
      {% endfor %}
      <li> {% trans "Obtained by " %} {{obtained}}
        {% if obtained > 1 %}
          {% trans "families" %}
        {% else %}
          {% trans "family" %}
        {% endif %}
      </li>
    </ul>
      <a class="btn btn-sm btn-primary" href="{% url "family:challenge_list" %}">
        {% trans "Return to the challenge list" %}
      </a>
      {% if update %}
      <a class="btn btn-sm btn-secondary" href="{% url "family:challenge_update" pk=challenge.pk %}">
        {% trans "Update" %}
      </a>
      {% endif %}
  </div>
</div>
{% endblock %}
