From a0c023cf4544ca25149996ab434c4e1457d54d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Tue, 11 Jun 2013 11:37:05 +0200 Subject: [PATCH] Use ordinal numbers in assignment and motion polls, fixes #456. Include humanize app to portable --- extras/win32-portable/prepare_portable.py | 1 - .../assignment/templates/assignment/poll_view.html | 3 ++- openslides/assignment/templates/assignment/view.html | 5 +++-- openslides/global_settings.py | 1 + openslides/motion/static/styles/motion.css | 9 ++++++++- .../motion/templates/motion/motion_detail.html | 12 +++++++++--- openslides/motion/templates/motion/poll_form.html | 4 ++-- 7 files changed, 25 insertions(+), 10 deletions(-) diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 730c98026..770fef517 100644 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -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/", diff --git a/openslides/assignment/templates/assignment/poll_view.html b/openslides/assignment/templates/assignment/poll_view.html index d8f9ce873..99077cbb5 100644 --- a/openslides/assignment/templates/assignment/poll_view.html +++ b/openslides/assignment/templates/assignment/poll_view.html @@ -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 @@

{{ assignment }} - {{ ballotnumber }}. {% trans "ballot" %} + {{ ballotnumber|ordinal|safe }} {% trans "ballot" %} {% trans "Back to election" %} diff --git a/openslides/assignment/templates/assignment/view.html b/openslides/assignment/templates/assignment/view.html index 223249e91..26b917246 100644 --- a/openslides/assignment/templates/assignment/view.html +++ b/openslides/assignment/templates/assignment/view.html @@ -3,6 +3,7 @@ {% load i18n %} {% load staticfiles %} {% load tags %} +{% load humanize %} {% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}"{% endblock %} @@ -147,7 +148,7 @@ {% with ballotnumber=polls.count %} - {% trans "ballot" %} + {% trans "Ballot" %} {% endwith %} @@ -155,7 +156,7 @@ {% trans "Candidates" %} {% for poll in polls %} - {{ poll.get_ballot }}. {% trans 'ballot' %} + {{ poll.get_ballot|ordinal|safe }} {% trans 'ballot' %} {% if perms.assignment.can_manage_assignment %}
+{% endblock %} + {% block content %}

{{ title }} {{ motion.category|default:'' }} @@ -188,10 +194,10 @@

{% trans "Vote results" %}:
{% with motion.polls.all as polls %} -
    +
+ {% if allowed_actions.create_poll %} {% trans 'New vote' %} diff --git a/openslides/motion/templates/motion/poll_form.html b/openslides/motion/templates/motion/poll_form.html index d7ed0a446..bf5f701dc 100644 --- a/openslides/motion/templates/motion/poll_form.html +++ b/openslides/motion/templates/motion/poll_form.html @@ -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 }}
- {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}. {% trans "Vote" %} + {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}