{% 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 %}
| {% trans 'Name'%} | {# Only superusers can see pools from many users #} {% if user.is_superuser %}{% trans 'Author'%} | {% endif %}{% trans 'Edit'%} | {% trans 'Questions'%} | {% trans 'Delete'%} |
|---|---|---|---|---|
| {{ pool.name }} | {# Only superusers can see pools from many users #} {% if user.is_superuser %}{{ pool.author }} | {% endif %}{{ pool.count_questions }} |