Use ordinal numbers in assignment and motion polls, fixes #456. Include humanize app to portable
This commit is contained in:
parent
5d122d1d27
commit
a0c023cf45
@ -57,7 +57,6 @@ SITE_PACKAGES = {
|
||||
r"^django/contrib/flatpages/",
|
||||
r"^django/contrib/formtools/",
|
||||
r"^django/contrib/gis/",
|
||||
r"^django/contrib/humanize/",
|
||||
r"^django/contrib/localflavor/",
|
||||
r"^django/contrib/markup/",
|
||||
r"^django/contrib/redirects/",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}" – {{ ballotnumber }}. {% trans "ballot" %}{% endblock %}
|
||||
|
||||
@ -8,7 +9,7 @@
|
||||
<h1>
|
||||
{{ assignment }}
|
||||
<small>
|
||||
{{ ballotnumber }}. {% trans "ballot" %}
|
||||
{{ ballotnumber|ordinal|safe }} {% trans "ballot" %}
|
||||
</small>
|
||||
<small class="pull-right">
|
||||
<a href="{% url 'assignment_view' assignment.id %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to election" %}</a>
|
||||
|
@ -3,6 +3,7 @@
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% load tags %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}"{% endblock %}
|
||||
|
||||
@ -147,7 +148,7 @@
|
||||
<th></th>
|
||||
{% with ballotnumber=polls.count %}
|
||||
<th colspan="{{ ballotnumber|add:'1' }}" style="text-align: center;">
|
||||
{% trans "ballot" %}
|
||||
{% trans "Ballot" %}
|
||||
</th>
|
||||
{% endwith %}
|
||||
</tr>
|
||||
@ -155,7 +156,7 @@
|
||||
<th>{% trans "Candidates" %}</th>
|
||||
{% for poll in polls %}
|
||||
<th style="white-space:nowrap;" class="span1">
|
||||
{{ poll.get_ballot }}. {% trans 'ballot' %}
|
||||
{{ poll.get_ballot|ordinal|safe }} {% trans 'ballot' %}
|
||||
{% if perms.assignment.can_manage_assignment %}
|
||||
<br>
|
||||
<a class="publish_link btn btn-mini btn-danger {% if poll.published %}btn-primary{% endif %}"
|
||||
|
@ -108,6 +108,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.humanize',
|
||||
'mptt',
|
||||
'openslides.utils',
|
||||
'openslides.poll',
|
||||
|
@ -43,4 +43,11 @@ td.diff_header {
|
||||
.diff_sub {
|
||||
background-color:#ffaaaa;
|
||||
}
|
||||
|
||||
/* motion vote results list */
|
||||
#motion-vote-results {
|
||||
list-style: none;
|
||||
}
|
||||
#motion-vote-results li {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
@ -3,9 +3,15 @@
|
||||
{% load tags %}
|
||||
{% load i18n %}
|
||||
{% load staticfiles %}
|
||||
{% load humanize %}
|
||||
|
||||
{% block title %}{{ block.super }} – {% trans "Motion" %} {{ motion.identifier|default:'' }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
{{ block.super }}
|
||||
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/motion.css' %}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
{{ title }} {{ motion.category|default:'' }}
|
||||
@ -188,10 +194,10 @@
|
||||
<!-- Vote results -->
|
||||
<h5>{% trans "Vote results" %}:</h5>
|
||||
{% with motion.polls.all as polls %}
|
||||
<ol>
|
||||
<ul id="motion-vote-results">
|
||||
{% for poll in polls %}
|
||||
{% if perms.motion.can_manage_motion or poll.has_votes %}
|
||||
<li>{% trans "Vote" %}
|
||||
<li><b>{{ poll.poll_number|ordinal|safe }} {% trans "vote" %}</b>
|
||||
{% if perms.motion.can_manage_motion %}
|
||||
<a class="btn btn-mini" href="{% url 'motion_poll_edit' motion.id poll.id %}" title="{% trans 'Edit Vote' %}"><i class="icon-pencil"></i></a>
|
||||
<a class="btn btn-mini" href="{% url 'motion_poll_delete' motion.id poll.id %}" title="{% trans 'Delete Vote' %}"><i class="icon-remove"></i></a>
|
||||
@ -217,7 +223,7 @@
|
||||
{% empty %}
|
||||
<span style="margin-left:-25px;">–</span>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</ul>
|
||||
{% if allowed_actions.create_poll %}
|
||||
<a href="{% url 'motion_poll_create' motion.id %}" class="btn btn-mini">
|
||||
<i class="icon-assignment"></i> {% trans 'New vote' %}
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}. {% trans "Vote" %}
|
||||
{{ block.super }} - {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@ -11,7 +11,7 @@
|
||||
{{ motion }}
|
||||
<br>
|
||||
<small>
|
||||
{% trans "Motion" %} {{ motion.identifier }}, {{ poll }}. {% trans "Vote" %}
|
||||
{% trans "Motion" %} {{ motion.identifier }}, {{ poll }}
|
||||
</small>
|
||||
<small class="pull-right">
|
||||
<div class="btn-toolbar">
|
||||
|
Loading…
Reference in New Issue
Block a user