Merge pull request #728 from normanjaeckel/OrdinalNumbers_Issue456
Use ordinal numbers in assignment and motion polls, fixes #456.
This commit is contained in:
commit
4c35e13158
@ -57,7 +57,6 @@ SITE_PACKAGES = {
|
|||||||
r"^django/contrib/flatpages/",
|
r"^django/contrib/flatpages/",
|
||||||
r"^django/contrib/formtools/",
|
r"^django/contrib/formtools/",
|
||||||
r"^django/contrib/gis/",
|
r"^django/contrib/gis/",
|
||||||
r"^django/contrib/humanize/",
|
|
||||||
r"^django/contrib/localflavor/",
|
r"^django/contrib/localflavor/",
|
||||||
r"^django/contrib/markup/",
|
r"^django/contrib/markup/",
|
||||||
r"^django/contrib/redirects/",
|
r"^django/contrib/redirects/",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load humanize %}
|
||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}" – {{ ballotnumber }}. {% trans "ballot" %}{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}" – {{ ballotnumber }}. {% trans "ballot" %}{% endblock %}
|
||||||
|
|
||||||
@ -8,7 +9,7 @@
|
|||||||
<h1>
|
<h1>
|
||||||
{{ assignment }}
|
{{ assignment }}
|
||||||
<small>
|
<small>
|
||||||
{{ ballotnumber }}. {% trans "ballot" %}
|
{{ ballotnumber|ordinal|safe }} {% trans "ballot" %}
|
||||||
</small>
|
</small>
|
||||||
<small class="pull-right">
|
<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>
|
<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 i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load tags %}
|
{% load tags %}
|
||||||
|
{% load humanize %}
|
||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}"{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Election" %} "{{ assignment }}"{% endblock %}
|
||||||
|
|
||||||
@ -147,7 +148,7 @@
|
|||||||
<th></th>
|
<th></th>
|
||||||
{% with ballotnumber=polls.count %}
|
{% with ballotnumber=polls.count %}
|
||||||
<th colspan="{{ ballotnumber|add:'1' }}" style="text-align: center;">
|
<th colspan="{{ ballotnumber|add:'1' }}" style="text-align: center;">
|
||||||
{% trans "ballot" %}
|
{% trans "Ballot" %}
|
||||||
</th>
|
</th>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</tr>
|
</tr>
|
||||||
@ -155,7 +156,7 @@
|
|||||||
<th>{% trans "Candidates" %}</th>
|
<th>{% trans "Candidates" %}</th>
|
||||||
{% for poll in polls %}
|
{% for poll in polls %}
|
||||||
<th style="white-space:nowrap;" class="span1">
|
<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 %}
|
{% if perms.assignment.can_manage_assignment %}
|
||||||
<br>
|
<br>
|
||||||
<a class="publish_link btn btn-mini btn-danger {% if poll.published %}btn-primary{% endif %}"
|
<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.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'django.contrib.humanize',
|
||||||
'mptt',
|
'mptt',
|
||||||
'openslides.utils',
|
'openslides.utils',
|
||||||
'openslides.poll',
|
'openslides.poll',
|
||||||
|
@ -43,4 +43,11 @@ td.diff_header {
|
|||||||
.diff_sub {
|
.diff_sub {
|
||||||
background-color:#ffaaaa;
|
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 tags %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
|
{% load humanize %}
|
||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Motion" %} {{ motion.identifier|default:'' }}{% endblock %}
|
{% 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 %}
|
{% block content %}
|
||||||
<h1>
|
<h1>
|
||||||
{{ title }} {{ motion.category|default:'' }}
|
{{ title }} {{ motion.category|default:'' }}
|
||||||
@ -188,10 +194,10 @@
|
|||||||
<!-- Vote results -->
|
<!-- Vote results -->
|
||||||
<h5>{% trans "Vote results" %}:</h5>
|
<h5>{% trans "Vote results" %}:</h5>
|
||||||
{% with motion.polls.all as polls %}
|
{% with motion.polls.all as polls %}
|
||||||
<ol>
|
<ul id="motion-vote-results">
|
||||||
{% for poll in polls %}
|
{% for poll in polls %}
|
||||||
{% if perms.motion.can_manage_motion or poll.has_votes %}
|
{% 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 %}
|
{% 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_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>
|
<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 %}
|
{% empty %}
|
||||||
<span style="margin-left:-25px;">–</span>
|
<span style="margin-left:-25px;">–</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ul>
|
||||||
{% if allowed_actions.create_poll %}
|
{% if allowed_actions.create_poll %}
|
||||||
<a href="{% url 'motion_poll_create' motion.id %}" class="btn btn-mini">
|
<a href="{% url 'motion_poll_create' motion.id %}" class="btn btn-mini">
|
||||||
<i class="icon-assignment"></i> {% trans 'New vote' %}
|
<i class="icon-assignment"></i> {% trans 'New vote' %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ block.super }} - {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}. {% trans "Vote" %}
|
{{ block.super }} - {% trans "Motion" %} {{ motion.identifier }}, {{ poll }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
@ -11,7 +11,7 @@
|
|||||||
{{ motion }}
|
{{ motion }}
|
||||||
<br>
|
<br>
|
||||||
<small>
|
<small>
|
||||||
{% trans "Motion" %} {{ motion.identifier }}, {{ poll }}. {% trans "Vote" %}
|
{% trans "Motion" %} {{ motion.identifier }}, {{ poll }}
|
||||||
</small>
|
</small>
|
||||||
<small class="pull-right">
|
<small class="pull-right">
|
||||||
<div class="btn-toolbar">
|
<div class="btn-toolbar">
|
||||||
|
Loading…
Reference in New Issue
Block a user