diff options
| -rw-r--r-- | postgresqleu/confreg/views.py | 8 | ||||
| -rw-r--r-- | template/confreg/sessionvotes.html | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/postgresqleu/confreg/views.py b/postgresqleu/confreg/views.py index 976751f0..16e5dc32 100644 --- a/postgresqleu/confreg/views.py +++ b/postgresqleu/confreg/views.py @@ -2661,6 +2661,13 @@ def talkvote(request, confname): if not isadmin: conference.nobreadcrumb = True + options_text = { + 0: 'No vote', + 1: '1 - Lowest', + 9: '9 - Highest', + } + options = [(x, options_text.get(x, str(x))) for x in range(0, 10)] + return render(request, 'confreg/sessionvotes.html', { 'users': getusernames(all), 'sessionvotes': transform(all), @@ -2675,6 +2682,7 @@ def talkvote(request, confname): 'valid_status_transitions': valid_status_transitions, 'urlfilter': urltrackfilter + urlstatusfilter, 'helplink': 'callforpapers', + 'options': options, }) diff --git a/template/confreg/sessionvotes.html b/template/confreg/sessionvotes.html index 3e634f84..a811313d 100644 --- a/template/confreg/sessionvotes.html +++ b/template/confreg/sessionvotes.html @@ -303,8 +303,8 @@ width: 100%; {%if forloop.first and isvoter %} <td{%if u|default_if_none:0 == 0%} style="background-color:red"{%endif%}> <select id="sv_{{s.id}}" onChange="castVote({{s.id}})"> - {%for opt in "0123456789"|make_list%} - <option value="{{opt}}"{%if opt|add:0 == u|add:0%} SELECTED{%endif%}>{%if opt == "0"%}No vote{%else%}{{opt}}{%endif%}</option> + {%for val, opt in options%} + <option value="{{val}}"{%if val == u%} SELECTED{%endif%}>{{opt}}</option> {%endfor%} </select> </td> |
