summaryrefslogtreecommitdiff
path: root/papillon/templates/editChoicesAdmin.html
blob: 6510dcc3438dc98dada839dcbbc8ff0ce31b9c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% extends "base.html" %}
{% load markup %}
{% load i18n %}

{% block fullscript %}
<script type="text/javascript" src="{%url admin_i18n%}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form_new_choice.media }}
{% endblock %}

{% block content %}
{% if not choices %}<p class='error'>
{% blocktrans %}As long as no options were added to the poll, it will not be available.{% endblocktrans %}
</p>{% else %}
<h2>{% trans "Complete/Finalise the poll" %}</h2>
<p><a href='{% url edit poll.admin_url%}'><button>{% trans "Next"%}</button></a></p>
{% endif %}
{% include 'editChoices.html' %}
{% if choices %}
<h2>{% trans "Available choices" %}</h2>
<table class='new_poll'>
  <tr>
   {%if not poll.dated_choices%}<th>{% trans "Up/down" %}</th>{%endif%}
   <th>{% trans "Label" %}</th>
   <th>{% trans "Limit" %}</th>
   <th>{% trans "Delete?"%}</th>
  </tr>
  {% for choice in choices %}
 <form action="." method="post">
  {{choice.form.poll}}{{choice.form.order}}<tr>
   {%if not poll.dated_choices%}<td><a href='?up_choice={{choice.id}}' class='arrow'>+</a>
   / <a href='?down_choice={{choice.id}}' class='arrow'>-</a></td>{%endif%}
   <td>{{choice.form.name}}</td>
   <td>{% trans "Limited to"%} {{choice.form.limit}} {% trans "vote(s)" %}</td>
   <td><input type='checkbox' name='delete_{{choice.id}}'/></td>
   <td><input type='hidden' name='edit' value='{{choice.id}}'/></td>
   <td><input type='submit' value='{% trans "Edit" %}' class='submit'/></td>
  </tr>
 </form>{% endfor %}
</table>
{% endif %}

{% endblock %}