{% extends "base.html" %} {% comment %}This view is used to display a list of ``mtp.apps.surveys.Pool`` instances. Pools authors are only displayed if the user is a superuser. Context ------- user : instance of ``mtp.apps.accounts.MTPUser`` The user is expected to be a superuser or a trainer. pool_list : queryset of ``mtp.apps.surveys.models.Pool`` It contains all the pools to display. {% endcomment %} {% load i18n %} {% block body_class %}{{ block.super }} page-cms-surveys page-cms-surveys-pools{% endblock %} {% block subtitle %} {% if user.is_superuser %} {% trans 'Global pools of questions' %} {% else %} {% trans 'Your pools of questions' %} {% endif %} {% endblock %} {% block actions %} {% if pool_list|length > 1 %} {% trans "Sort pools" %} {% endif %} {% trans "Add a pool of questions" %} {% endblock %} {% block main %} {# Only superusers can see pools from many users #} {% if user.is_superuser %} {% endif %} {% for pool in pool_list %} {# Only superusers can see pools from many users #} {% if user.is_superuser %} {% endif %} {% endfor %}
{% trans 'Name'%}{% trans 'Author'%}{% trans 'Edit'%} {% trans 'Questions'%} {% trans 'Delete'%}
{{ pool.name }}{{ pool.author }} {{ pool.count_questions }}
{% endblock %}