{% extends "sakai/evaluation/base.html" %}{% load i18n %}

{% block content %}

<div class="section">
  <div class="header">
    <h2>{% trans "Current surveys" %}</h2>
    {% if submitted %}
    <div class="bubble pad-10">
      {% trans "Thank you for taking part in the survey; your responses have been safely submitted." %}
    </div>
    {% endif %}
  </div>

{% if evaluations %}
  <ul class="link-list">
    {% for evaluation in evaluations %}
    <li>
        {% if evaluation.id %}
          <a href="{% url sakai:evaluation-detail evaluation.id %}">
        {% endif %}
            {{ evaluation.title }}<br/>
            <small>
                <em>{{ evaluation.status }}</em><br/>
                {% blocktrans with evaluation.site as sitename and evaluation.start as start and evaluation.end as end %}{{ sitename }}, open from {{ start }} until {{ end }}{% endblocktrans %}
            </small>
        {% if evaluation.id %}
          </a>
        {% endif %}
    </li>
    {% endfor %}
  </ul>
{% else %}
  {% if suppress_evaluations %}
    <ul class="link-list">
      <li><a href="{% url sakai:evaluation-index %}">{% trans "Return to survey list" %}</a></li>
    </ul>
  {% else %}
    <div class="section-content">
      {% trans "There are currently no surveys available to complete." %}
    </div>
  {% endif %}
{% endif %}
</div>

{% endblock %}