{% extends "base.html" %} {% comment %}This view is used to sort a list of ``mtp.apps.surveys.Question`` instances of a pool.. It includes ``cms/includes/orderable-head.html`` for the sortable logic in javascript, with the table listing questions having the ``orderable`` class, and displaying the ``sort_order_display`` attribute of the questions. New order is saved via ajax after each change. Context ------- pool : instance of ``mtp.apps.surveys.models.Pool`` The pool for which we display the questions. question_list : queryset of ``mtp.apps.surveys.models.Question`` It contains all the questions to display. {% endcomment %} {% load i18n %} {% block body_class %}{{ block.super }} page-cms-surveys page-cms-surveys-questions{% endblock %} {% block subtitle %} {% blocktrans with pool_name=pool.name %}Questions for the pool of question "{{ pool_name }}"{% endblocktrans %} {% endblock %} {% block actions %} {% trans 'Back to the list of questions' %} {% trans 'Back to the pool' %} {% endblock %} {% block head %} {{ block.super }} {% include "cms/includes/orderable-head.html" %} {% endblock %} {% block main %} {% csrf_token %} {% for question in question_list %} {% endfor %}
{% trans 'Title'%} {% trans 'Order' %}
{{ question.title }} {{ question.sort_order_display|safe }}
{% endblock %}