{% extends "base.html" %} {% load tags %} {% load i18n %} {% load staticfiles %} {% block title %}{{ block.super }} – {% trans "Motion" %} {{ motion.identifier|default:'' }}{% endblock %} {% block content %}

{{ motion.title }} {{ motion.category|default:'' }}
{% if motion.identifier %} {% trans "Motion" %} {{ motion.identifier|default:'' }}, {% else %} [{% trans "no number" %}], {% endif %} {# TODO: show only for complex workflow #} {% trans "Version" %} {{ motion.version.version_number }}
{% trans "Back to overview" %} PDF {% if perms.projector.can_manage_projector %} {% endif %}
{% trans 'More actions' %}

{# TODO: show only for complex workflow #} {% if motion.version.version_number < motion.last_version.version_number %} {% trans "This is not the newest version." %} {% trans "Go to last version" %} (#{{ motion.last_version.version_number }}) {% endif %} {% if motion.version.version_number > motion.active_version.version_number %} {% trans "This version is not yet authorized." %} {% trans "Go to last authorized version" %} (#{{ motion.active_version.version_number }}) {% endif %}

{% trans "Motion text" %}:

{{ motion.version.text|safe }}

{% trans "Reason" %}:

{% if motion.version.reason %} {{ motion.version.reason|safe }} {% else %} – {% endif %}
{% with versions=motion.versions.all %} {% if versions|length > 1 %} {% for version in versions %} {% if forloop.first %}

{% trans "Version history" %}:

{% endif %} {% if forloop.last %}
# {% trans "Time" %} {% trans "Actions" %}
{% if version == motion.active_version %} {% else %} {% if perms.motion.can_manage_motion %} {% endif %} {% if not version.rejected and version.id > motion.active_version.id and perms.motion.can_manage_motion %} {% endif %} {% endif %} {% if version.rejected %} {% endif %} {{ version.version_number }} {{ version.creation_time }} {# TODO: add delete version function #}
{% endif %} {% endfor %} {% endif %} {% endwith %} {% if perms.motion.can_manage_motion %}
    {% for message in motion.log_messages.all %}
  • {{ message }}
  • {% endfor %}
{% endif %}
{% trans "Submitter" %}:
{% for submitter in motion.submitter.all %} {{ submitter.person }}{% if not forloop.last %}, {% endif %} {% endfor %} {% if min_supporters > 0 %}
{% trans "Supporters" %}: *
{% if not motion.supporters %} - {% else %}
    {% for supporter in motion.supporter.all %}
  1. {{ supporter }}
  2. {% endfor %}
{% endif %} {% endif %}
{% trans "Status" %}:
{% if motion.state_id != "pub" %} {# TODO: trans motion.state #} {{ motion.state }}
{% endif %} {% for note in motion.notes %} {{ note }} {% if not forloop.last %}
{% endif %} {% endfor %}
{% trans "Vote results" %}:
{% with motion.polls.all as polls %}
    {% for poll in polls %} {% if perms.motion.can_manage_motion or poll.has_votes %}
  1. {% trans "Vote" %} {% if perms.motion.can_manage_motion %} {% endif %}
    {% if poll.has_votes %} {% with poll.get_options.0 as option %} {{ option.Yes }}
    {{ option.No }}
    {{ option.Abstain }}
    {{ poll.print_votesinvalid }}
    {{ poll.print_votescast }}
    {% endwith %} {% else %} {% if perms.motion.can_manage_motion %} {% trans 'No results' %} {% endif %} {% endif %}
  2. {% endif %} {% endfor %}
{% if allowed_actions.create_poll %} {% trans 'New vote' %} {% endif %} {% endwith %}
{% trans "Category" %}:
{{ motion.category }}
{% trans "Creation Time" %}:
{# TODO: use creation time of _first_ version #} {{ motion.version.creation_time }} {% if allowed_actions.wit and user in motion.submitters %}

{% trans 'Withdraw motion' %} {% endif %} {% if perms.motion.can_support_motion and min_supporters > 0 %} {% if allowed_actions.unsupport %}

{% trans 'Unsupport' %} {% endif %} {% if allowed_actions.support %}

{% trans 'Support' %} {% endif %} {% endif %} {% if min_supporters > 0 %}

* {% trans "minimum required supporters" %}: {{ min_supporters }} {% endif %}
{% if perms.motion.can_manage_motion %}

{% trans "Manage motion" %}

{% for state in motion.state.next_states.all %} {{ state }} {% endfor %}


{% trans "For administration only:" %}
{% trans 'Reset state' %}
{% endif %}
{% endblock %}