diff --git a/initial_data.json b/initial_data.json index 5f7c8e30c..a0d786baf 100644 --- a/initial_data.json +++ b/initial_data.json @@ -11,14 +11,14 @@ "item" ], [ - "can_create_application", - "application", - "application" + "can_create_motion", + "motion", + "motion" ], [ - "can_see_application", - "application", - "application" + "can_see_motion", + "motion", + "motion" ], [ "can_nominate_other", @@ -44,6 +44,11 @@ "can_see_projector", "projector", "projectorslide" + ], + [ + "can_see_dashboard", + "projector", + "projectorslide" ] ] } @@ -60,19 +65,19 @@ "item" ], [ - "can_create_application", - "application", - "application" + "can_create_motion", + "motion", + "motion" ], [ - "can_see_application", - "application", - "application" + "can_see_motion", + "motion", + "motion" ], [ - "can_support_application", - "application", - "application" + "can_support_motion", + "motion", + "motion" ], [ "can_nominate_other", @@ -98,6 +103,11 @@ "can_see_projector", "projector", "projectorslide" + ], + [ + "can_see_dashboard", + "projector", + "projectorslide" ] ] } @@ -119,19 +129,19 @@ "item" ], [ - "can_create_application", - "application", - "application" + "can_create_motion", + "motion", + "motion" ], [ - "can_manage_application", - "application", - "application" + "can_manage_motion", + "motion", + "motion" ], [ - "can_see_application", - "application", - "application" + "can_see_motion", + "motion", + "motion" ], [ "can_manage_assignment", @@ -177,6 +187,11 @@ "can_see_projector", "projector", "projectorslide" + ], + [ + "can_see_dashboard", + "projector", + "projectorslide" ] ] } @@ -206,6 +221,11 @@ "can_see_projector", "projector", "projectorslide" + ], + [ + "can_see_dashboard", + "projector", + "projectorslide" ] ] } diff --git a/openslides/__init__.py b/openslides/__init__.py index f3f4c88a3..17d119cf0 100644 --- a/openslides/__init__.py +++ b/openslides/__init__.py @@ -5,11 +5,14 @@ :license: GNU GPL, see LICENSE for more details. """ -VERSION = (1, 2, 0, 'final', 1) +VERSION = (1, 3, 0, 'alpha', 1) + def get_version(version=None): - """Derives a PEP386-compliant version number from VERSION.""" - # TODO: Get the Version Hash from GIT. + """ + Derives a PEP386-compliant version number from VERSION. Adds id of + the current git commit. + """ if version is None: version = VERSION assert len(version) == 5 @@ -17,67 +20,24 @@ def get_version(version=None): # Now build the two parts of the version number: # main = X.Y[.Z] - # sub = .devN - for pre-alpha releases - # | {a|b|c}N - for alpha, beta and rc releases + # sub = {a|b|c}N for alpha, beta and rc releases + # git's commit id is added - parts = 2 if version[2] == 0 else 3 - main = '.'.join(str(x) for x in version[:parts]) + main_parts = 2 if version[2] == 0 else 3 + main = '.'.join(str(x) for x in version[:main_parts]) - sub = '' - if version[3] == 'alpha' and version[4] == 0: - mercurial_version = hg_version() - if mercurial_version != 'unknown': - sub = '.dev%s' % mercurial_version + if version[3] != 'final': + mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'} + sub = mapping[version[3]] + str(version[4]) + try: + git_head_path = '.git/' + open('.git/HEAD', 'r').read()[5:].rstrip() + except IOError: + git_commit_id = 'unknown' else: - sub = '.dev' - - elif version[3] != 'final': - sub = "-" + version[3] + str(version[4]) + import os + git_commit_id = open(os.path.abspath(git_head_path), 'r').read().rstrip() + sub = '%s commit %s' % (sub, git_commit_id) + else: + sub = '' return main + sub - - -def hg_version(): - import socket - import os - import sys - from os.path import realpath, join, dirname - try: - from mercurial import ui as hgui - from mercurial.localrepo import localrepository - from mercurial.node import short as shorthex - from mercurial.error import RepoError - nomercurial = False - except ImportError: - return 'unknown' - - os.environ['HGRCPATH'] = '' - conts = realpath(join(dirname(__file__))) - try: - ui = hgui.ui() - repository = localrepository(ui, join(conts, '..')) - ctx = repository['.'] - if ctx.tags() and ctx.tags() != ['tip']: - version = ' '.join(ctx.tags()) - else: - version = '%(num)s:%(id)s' % { - 'num': ctx.rev(), 'id': shorthex(ctx.node()) - } - except TypeError: - version = 'unknown' - except RepoError: - return 0 - - # This value defines the timeout for sockets in seconds. Per default python - # sockets do never timeout and as such we have blocking workers. - # Socket timeouts are set globally within the whole application. - # The value *must* be a floating point value. - socket.setdefaulttimeout(10.0) - - return version - - -## import os, site -## -## SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) -## site.addsitedir(SITE_ROOT) diff --git a/openslides/application/templates/application/base_application.html b/openslides/application/templates/application/base_application.html deleted file mode 100644 index c886215ef..000000000 --- a/openslides/application/templates/application/base_application.html +++ /dev/null @@ -1,66 +0,0 @@ -{% extends "base.html" %} - -{% load tags %} -{% load i18n %} -{% load staticfiles %} - -{% block submenu %} - {% url application_overview as url_applicationoverview %} -
{{ assignment.description }}
+{{ assignment.description|linebreaks }}
{number, title, text, reason, "
-"first_name, last_name}
(number
and reason
"
-"are optional and may be empty)"
-msgstr ""
-"Erforderliche kommaseparierte Werte: {Nummer, Titel, Text, Begründung, "
-"Vorname, Nachname}
(Nummer
und Begründung
"
-"sind optional und können auch leer sein)"
-
-#: application/templates/application/import.html:13
-#: participant/templates/participant/import.html:13
-msgid "Required CSV file encoding: UTF-8 (Unicode)."
-msgstr "Erforderliches CSV-Datei-Encoding: UTF-8 (Unicode)."
-
-#: application/templates/application/import.html:16
-#: participant/templates/participant/import.html:16
-msgid "A CSV example file is available in OpenSlides Wiki."
-msgstr "Eine CSV-Beispiel-Datei gibt es im OpenSlides Wiki."
-
-#: application/templates/application/import.html:23
-#: participant/templates/participant/import.html:23
-msgid "Import"
-msgstr "Importieren"
-
-#: application/templates/application/overview.html:15
-msgid "Need supporters"
-msgstr "Benötigt Unterstützer/innen"
-
-#: application/templates/application/overview.html:18
-msgid "Without number"
-msgstr "Ohne Nummer"
-
-#: application/templates/application/overview.html:22
-msgid "Not yet authorized"
-msgstr "Noch nicht zugelassen"
-
-#: application/templates/application/overview.html:23
-msgid "Authorized"
-msgstr "Zugelassen"
-
-#: application/templates/application/overview.html:26
-msgid "Withdrawen (by submitter)"
-msgstr "Zurückgezogen (durch Antragsteller/in)"
-
-#: application/templates/application/overview.html:35
-msgid "Number"
-msgstr "Nummer"
-
-#: application/templates/application/overview.html:36
-msgid "Motion title"
-msgstr "Antragstitel"
-
-#: application/templates/application/overview.html:38
-msgid "Number of supporters"
-msgstr "Anzahl der Unterstützer/innen"
-
-#: application/templates/application/overview.html:42
-#: application/templates/application/view.html:112
-msgid "Creation Time"
-msgstr "Erstellungszeit"
-
-#: application/templates/application/overview.html:67
-msgid "Activate motion"
-msgstr "Antrag projizieren"
-
-#: application/templates/application/poll_view.html:7
-#: application/templates/application/poll_view.html:12
-#: application/templates/application/view.html:7
-#: application/templates/application/view.html:209
-#: application/templates/application/view.html:228
-#: application/templates/projector/Application.html:7
-#: application/templates/projector/Application.html:65
-msgid "Motion"
-msgstr "Antrag"
-
-#: application/templates/application/poll_view.html:14
-#: assignment/templates/assignment/poll_view.html:12
-msgid "Special values"
-msgstr "Spezielle Werte"
-
-#: application/templates/application/poll_view.html:14
-#: assignment/templates/assignment/poll_view.html:12 poll/models.py:235
-msgid "majority"
-msgstr "Mehrheit"
-
-#: application/templates/application/poll_view.html:14
-#: assignment/templates/assignment/poll_view.html:12 poll/models.py:237
-msgid "undocumented"
-msgstr "nicht erfasst"
-
-#: application/templates/application/poll_view.html:21
-msgid "Option"
-msgstr "Wahlmöglichkeit"
-
-#: application/templates/application/poll_view.html:22
-#: assignment/models.py:282
-msgid "Votes"
-msgstr "Stimmen"
-
-#: application/templates/application/poll_view.html:31 assignment/views.py:442
-#: assignment/templates/assignment/poll_view.html:35
-#: assignment/templates/assignment/view.html:175
-#: assignment/templates/projector/Assignment.html:97
-msgid "Invalid votes"
-msgstr "Ungültige Stimmen"
-
-#: application/templates/application/poll_view.html:45
-#: assignment/templates/assignment/poll_view.html:59
-msgid "Ballot paper as PDF"
-msgstr "Stimmzettel als PDF"
-
-#: application/templates/application/view.html:21
-msgid "You!"
-msgstr "Sie!"
-
-#: application/templates/application/view.html:54
-#: application/templates/application/view.html:94
-msgid "New vote"
-msgstr "Neue Abstimmung"
-
-#: application/templates/application/view.html:70
-msgid "Edit Vote"
-msgstr "Abstimmung bearbeiten"
-
-#: application/templates/application/view.html:73
-msgid "Delete Vote"
-msgstr "Abstimmung löschen"
-
-#: application/templates/application/view.html:102
-msgid "Enter result"
-msgstr "Ergebnis eingeben"
-
-#: application/templates/application/view.html:119
-msgid "Withdraw"
-msgstr "Zurückziehen"
-
-#: application/templates/application/view.html:127
-msgid "Unsupport"
-msgstr "Nicht unterstützen"
-
-#: application/templates/application/view.html:133
-msgid "Support"
-msgstr "Unterstützen"
-
-#: application/templates/application/view.html:139
-msgid "minimum required supporters"
-msgstr "minimal erforderliche Unterstützer/innen"
-
-#: application/templates/application/view.html:146
-msgid "Manage motion"
-msgstr "Antrag Verwalten"
-
-#: application/templates/application/view.html:149
-msgid "Formal validation"
-msgstr "Formale Gültigkeitsprüfung"
-
-#: application/templates/application/view.html:151
-msgid "Publish"
-msgstr "Veröffentlichen"
-
-#: application/templates/application/view.html:154
-msgid "Permit"
-msgstr "Zulassen"
-
-#: application/templates/application/view.html:157
-msgid "Not permit (reject)"
-msgstr "Nicht zulassen (verwerfen)"
-
-#: application/templates/application/view.html:160
-msgid "Set Number"
-msgstr "Setze Nummer"
-
-#: application/templates/application/view.html:167
-msgid "Result after vote"
-msgstr "Ergebnis nach der Abstimmung"
-
-#: application/templates/application/view.html:181
-msgid "Result after debate"
-msgstr "Ergebnis nach der Debatte"
-
-#: application/templates/application/view.html:192
-msgid "Withdrawed by Submitter"
-msgstr "Zurückgezogen durch Antragsteller/in"
-
-#: application/templates/application/view.html:197
-msgid "For Administration only:"
-msgstr "Nur zur Administration:"
-
-#: application/templates/application/view.html:199
-msgid "Reset"
-msgstr "Zurücksetzen"
-
-#: application/templates/application/view.html:222
-msgid "This is not the newest version."
-msgstr "Dies ist nicht die neuste Version."
-
-#: application/templates/application/view.html:222
-#: application/templates/application/view.html:224
-msgid "Go to version"
-msgstr "Gehe zu Version"
-
-#: application/templates/application/view.html:224
-msgid "This is not the authorized version."
-msgstr "Dies ist nicht die zugelassene Version."
-
-#: application/templates/application/view.html:242
-msgid "Version History"
-msgstr "Versionshistorie"
-
-#: application/templates/application/view.html:248
-msgid "Time"
-msgstr "Zeit"
-
-#: application/templates/application/view.html:259
-msgid "Version authorized"
-msgstr "Version %d zugelassen"
-
-#: application/templates/application/view.html:262
-msgid "Permit Version"
-msgstr "Version zulassen"
-
-#: application/templates/application/view.html:265
-msgid "Reject Version"
-msgstr "Version verwerfen"
-
-#: application/templates/application/view.html:269
-msgid "Version rejected"
-msgstr "Version verworfen"
-
-#: application/templates/application/view.html:279
-#: application/templates/application/view.html:286
-#: application/templates/application/view.html:293
-msgid "unchanged"
-msgstr "unverändert"
-
-#: application/templates/application/view.html:302
-msgid "Log"
-msgstr "Log"
-
-#: application/templates/application/widget.html:31
-msgid "No motion available."
-msgstr "Keine Antrag vorhanden."
-
-#: application/templates/projector/Application.html:29
-msgid "Poll result"
-msgstr "Abstimmungsergebnis"
-
-#: application/templates/projector/Application.html:47
-msgid "No poll results available."
-msgstr "Keine Abstimmungen vorhanden."
-
-#: assignment/forms.py:24 assignment/models.py:54 assignment/views.py:371
+#: assignment/forms.py:24 assignment/models.py:57 assignment/views.py:383
#: assignment/templates/assignment/view.html:13
#: assignment/templates/projector/Assignment.html:21
msgid "Number of available posts"
@@ -1204,6 +322,26 @@ msgid "Only publish voting results for selected winners (Projector view only)"
msgstr ""
"Wahlergebnisse der nicht gewählten Kandidaten auf dem Projektor verbergen"
+#: assignment/forms.py:47 motion/forms.py:77
+msgid "Number of ballot papers (selection)"
+msgstr "Anzahl der Stimmzettel (Vorauswahl)"
+
+#: assignment/forms.py:49 motion/forms.py:79
+msgid "Number of all delegates"
+msgstr "Anzahl aller Delegierten"
+
+#: assignment/forms.py:50 motion/forms.py:80
+msgid "Number of all participants"
+msgstr "Anzahl aller Teilnehmer/innen"
+
+#: assignment/forms.py:51 motion/forms.py:81
+msgid "Use the following custom number"
+msgstr "Verwende die folgende benutzerdefinierte Anzahl"
+
+#: assignment/forms.py:58 motion/forms.py:88
+msgid "Custom number of ballot papers"
+msgstr "Benutzerdefinierte Anzahl von Stimmzetteln"
+
#: assignment/forms.py:63
msgid "Title for PDF document (all elections)"
msgstr "Titel für PDF-Dokument (alle Wahlen)"
@@ -1228,79 +366,92 @@ msgstr "Eine Stimme pro Kandidat/in."
msgid "Always Yes-No-Abstain per candidate."
msgstr "Ja, Nein, Enthaltung pro Kandidat/in."
-#: assignment/models.py:45 assignment/templates/assignment/overview.html:15
+#: assignment/models.py:48 assignment/templates/assignment/overview.html:15
#: assignment/templates/assignment/view.html:23
msgid "Searching for candidates"
msgstr "Auf Kandidatensuche"
-#: assignment/models.py:46 assignment/templates/assignment/overview.html:16
+#: assignment/models.py:49 assignment/templates/assignment/overview.html:16
#: assignment/templates/assignment/view.html:25
msgid "Voting"
msgstr "Im Wahlvorgang"
-#: assignment/models.py:47 assignment/templates/assignment/overview.html:17
+#: assignment/models.py:50 assignment/templates/assignment/overview.html:17
#: assignment/templates/assignment/view.html:27
msgid "Finished"
msgstr "Abgeschlossen"
-#: assignment/models.py:50
+#: assignment/models.py:53
msgid "Name"
msgstr "Name"
-#: assignment/models.py:52
+#: assignment/models.py:55
msgid "Description"
msgstr "Beschreibung"
-#: assignment/models.py:56
+#: assignment/models.py:59
msgid "Comment on the ballot paper"
msgstr "Kommentar für den Stimmzettel"
-#: assignment/models.py:68
+#: assignment/models.py:69 motion/models.py:339
+#, python-format
+msgid "%s is not a valid status."
+msgstr "%s ist kein gültiger Status."
+
+#: assignment/models.py:71
#, python-format
msgid "The assignment status is already %s."
msgstr "Der Wahlstatus ist bereits %s."
-#: assignment/models.py:82
+#: assignment/models.py:85
#, python-format
msgid "%s is already a candidate."
msgstr "%s ist bereits ein/e Kandidat/in."
-#: assignment/models.py:84 assignment/views.py:192
+#: assignment/models.py:87 assignment/views.py:200
msgid "The candidate list is already closed."
msgstr "Die Kandidatenliste ist bereits geschlossen."
-#: assignment/models.py:90
+#: assignment/models.py:94
#, python-format
msgid "%s does not want to be a candidate."
msgstr "%s möchte nicht kandidieren."
-#: assignment/models.py:110
+#: assignment/models.py:109
#, python-format
msgid "%s is no candidate"
msgstr "%s ist kein/e Kandidat/in"
-#: assignment/models.py:233
+#: assignment/models.py:253
msgid "Can see assignment"
msgstr "Darf Wahlen sehen"
-#: assignment/models.py:235
+#: assignment/models.py:255
msgid "Can nominate another person"
msgstr "Darf andere Personen für Wahlen vorschlagen"
-#: assignment/models.py:236
+#: assignment/models.py:256
msgid "Can nominate themselves"
msgstr "Darf selbst für Wahlen kandidieren"
-#: assignment/models.py:237
+#: assignment/models.py:257
msgid "Can manage assignment"
msgstr "Darf Wahlen verwalten"
-#: assignment/models.py:299
+#: assignment/models.py:301 motion/models.py:579
+msgid "Abstain"
+msgstr "Enthaltung"
+
+#: assignment/models.py:303 motion/templates/motion/poll_view.html:22
+msgid "Votes"
+msgstr "Stimmen"
+
+#: assignment/models.py:320
#, python-format
msgid "Ballot %d"
msgstr "Wahlgang %d"
-#: assignment/models.py:308 assignment/views.py:328 assignment/views.py:651
+#: assignment/models.py:329 assignment/views.py:340 assignment/views.py:663
#: assignment/templates/assignment/base_assignment.html:14
#: assignment/templates/assignment/overview.html:6
#: assignment/templates/assignment/overview.html:9
@@ -1312,110 +463,135 @@ msgstr "Wahlen"
msgid "Candidate %s was nominated successfully."
msgstr "Kandidat/in %s wurde erfolgreich vorgeschlagen."
-#: assignment/views.py:128
+#: assignment/views.py:130
msgid "New election was successfully created."
msgstr "Neue Wahl wurde erfolgreich angelegt."
-#: assignment/views.py:130
+#: assignment/views.py:132
msgid "Election was successfully modified."
msgstr "Wahl wurde erfolgreich geändert."
-#: assignment/views.py:155
+#: assignment/views.py:138 motion/views.py:256 motion/views.py:637
+#: participant/views.py:463 participant/views.py:486 utils/views.py:210
+#: utils/views.py:228 utils/views.py:252
+msgid "Please check the form for errors."
+msgstr "Bitte kontrollieren Sie das Formular nach Fehlern."
+
+#: assignment/views.py:157
#, python-format
msgid "Election %s was successfully deleted."
msgstr "Wahl %s wurde erfolgreich gelöscht."
-#: assignment/views.py:168
+#: assignment/views.py:170
#, python-format
msgid "Election status was set to: %s."
msgstr "Wahlstatus wurde gesetzt auf: %s."
-#: assignment/views.py:179
+#: assignment/views.py:181
msgid "You have set your candidature successfully."
msgstr "Sie haben Ihre Kandidatur erfolgreich gesetzt."
-#: assignment/views.py:196
-msgid "You have withdrawn your candidature successfully."
-msgstr "Sie haben Ihre Kandidatur erfolgreich zurückgezogen."
+#: assignment/views.py:197
+msgid ""
+"You have withdrawn your candidature successfully. You can not be nominated "
+"by other participants anymore."
+msgstr ""
+"Sie haben Ihre Kandidatur erfolgreich zurückgezogen. Sie können nun von "
+"anderen Teilnehmer/innen nicht mehr vorgeschlagen werden."
-#: assignment/views.py:211
+#: assignment/views.py:218
#, python-format
msgid "Candidate %s was withdrawn successfully."
msgstr "Die Kandidatur von %s wurde erfolgreich zurückgezogen."
-#: assignment/views.py:214
+#: assignment/views.py:220
+#, python-format
+msgid "%s was unblocked successfully."
+msgstr "%s wurde erfolgreich freigegeben."
+
+#: assignment/views.py:224
#, python-format
msgid "Do you really want to withdraw %s from the election?"
msgstr "Soll %s wirklich von der Wahl zurückgezogen werden?"
-#: assignment/views.py:229
+#: assignment/views.py:226
+#, python-format
+msgid "Do you really want to unblock %s from the election?"
+msgstr "Soll %s wirklich für die Wahl freigegeben werden?"
+
+#: assignment/views.py:241
msgid "New ballot was successfully created."
msgstr "Neuer Wahlgang erfolgreich angelegt."
-#: assignment/views.py:261
+#: assignment/views.py:273
#, python-format
msgid "Ballot ID %d does not exist."
msgstr "Wahlgang-ID %d existiert nicht."
-#: assignment/views.py:268
+#: assignment/views.py:280
msgid "Ballot successfully published."
msgstr "Wahlgang wurde erfolgreich veröffentlicht."
-#: assignment/views.py:270
+#: assignment/views.py:282
msgid "Ballot successfully unpublished."
msgstr "Wahlgang wurde erfolgreich unveröffentlicht."
-#: assignment/views.py:283
+#: assignment/views.py:295
msgid "not elected"
msgstr "nicht gewählt"
-#: assignment/views.py:286 assignment/views.py:469
+#: assignment/views.py:298 assignment/views.py:481
msgid "elected"
msgstr "gewählt"
-#: assignment/views.py:314
+#: assignment/views.py:326
msgid "Ballot was successfully deleted."
msgstr "Abstimmung wurde erfolgreich gelöscht."
-#: assignment/views.py:325
+#: assignment/views.py:337
msgid "Assignment"
msgstr "Wahl"
-#: assignment/views.py:346 assignment/templates/assignment/overview.html:53
+#: assignment/views.py:358 assignment/templates/assignment/overview.html:53
#: assignment/templates/assignment/widget.html:23
msgid "No assignments available."
msgstr "Keine Wahlen vorhanden."
-#: assignment/views.py:365
+#: assignment/views.py:377
#, python-format
msgid "Election: %s"
msgstr "Wahlen: %s"
-#: assignment/views.py:377 assignment/views.py:410
+#: assignment/views.py:389 assignment/views.py:422
#: assignment/templates/assignment/overview.html:26
#: assignment/templates/assignment/poll_view.html:18
#: assignment/templates/assignment/view.html:36
-#: assignment/templates/assignment/view.html:108
+#: assignment/templates/assignment/view.html:118
#: assignment/templates/projector/Assignment.html:38
#: assignment/templates/projector/Assignment.html:56
msgid "Candidates"
msgstr "Kandidaten/innen"
-#: assignment/views.py:402
+#: assignment/views.py:410 motion/views.py:771
+#: motion/templates/motion/view.html:44
+msgid "Vote results"
+msgstr "Abstimmungsergebnis"
+
+#: assignment/views.py:414
#: assignment/templates/assignment/base_assignment.html:71
#: assignment/templates/assignment/poll_view.html:5
#: assignment/templates/assignment/poll_view.html:8
-#: assignment/templates/assignment/view.html:102
-#: assignment/templates/assignment/view.html:111
+#: assignment/templates/assignment/view.html:112
+#: assignment/templates/assignment/view.html:121
#: assignment/templates/projector/Assignment.html:59
msgid "ballot"
msgstr "Wahlgang"
-#: assignment/views.py:405
+#: assignment/views.py:417
msgid "ballots"
msgstr "Wahlgänge"
-#: assignment/views.py:431
+#: assignment/views.py:443
#, python-format
msgid ""
"Y: %(YES)s\n"
@@ -1426,7 +602,25 @@ msgstr ""
"N: %(NO)s\n"
"E: %(ABSTAIN)s"
-#: assignment/views.py:508 assignment/views.py:524
+#: assignment/views.py:454 assignment/templates/assignment/poll_view.html:35
+#: assignment/templates/assignment/view.html:185
+#: assignment/templates/projector/Assignment.html:97
+#: motion/templates/motion/poll_view.html:31
+msgid "Invalid votes"
+msgstr "Ungültige Stimmen"
+
+#: assignment/views.py:461 assignment/templates/assignment/poll_view.html:45
+#: assignment/templates/assignment/view.html:202
+#: assignment/templates/assignment/view.html:207
+#: assignment/templates/projector/Assignment.html:111
+#: assignment/templates/projector/Assignment.html:117 motion/views.py:778
+#: motion/templates/motion/poll_view.html:35
+#: motion/templates/motion/view.html:84
+#: motion/templates/projector/Motion.html:42 poll/models.py:76
+msgid "Votes cast"
+msgstr "Abgegebene Stimmen"
+
+#: assignment/views.py:520 assignment/views.py:536
#: assignment/templates/assignment/overview.html:25
#: assignment/templates/assignment/poll_view.html:5
#: assignment/templates/assignment/view.html:6
@@ -1434,28 +628,35 @@ msgstr ""
msgid "Election"
msgstr "Wahl"
-#: assignment/views.py:530
+#: assignment/views.py:542
#, python-format
msgid "%d. ballot"
msgstr "%d. Wahlgang"
-#: assignment/views.py:531
+#: assignment/views.py:543
#, python-format
msgid "%d candidate"
msgid_plural "%d candidates"
msgstr[0] "%d Kandidat/in"
msgstr[1] "%d Kandidaten/innen"
-#: assignment/views.py:533
+#: assignment/views.py:545
#, python-format
msgid "%d available posts"
msgstr "%d verfügbare Posten"
-#: assignment/views.py:644
+#: assignment/views.py:577 assignment/templates/assignment/view.html:168
+#: assignment/templates/projector/Assignment.html:80 motion/views.py:778
+#: motion/views.py:831 motion/templates/motion/view.html:81
+#: motion/templates/projector/Motion.html:39
+msgid "Abstention"
+msgstr "Enthaltung"
+
+#: assignment/views.py:656
msgid "Election settings successfully saved."
msgstr "Wahl-Einstellungen wurden erfolgreich gespeichert."
-#: assignment/views.py:664
+#: assignment/views.py:676
msgid "Assignments"
msgstr "Wahlen"
@@ -1498,11 +699,28 @@ msgstr "Wahl als PDF"
msgid "Show election"
msgstr "Wahl projizieren"
+#: assignment/templates/assignment/base_assignment.html:63
+#: motion/templates/motion/base_motion.html:61
+msgid "New agenda item"
+msgstr "Neuer Tagesordnungseintrag"
+
#: assignment/templates/assignment/config.html:5
#: assignment/templates/assignment/config.html:8
msgid "Election settings"
msgstr "Wahl-Einstellungen"
+#: assignment/templates/assignment/overview.html:14
+#: assignment/templates/assignment/overview.html:27
+#: assignment/templates/assignment/view.html:11
+#: assignment/templates/projector/Assignment.html:18 motion/views.py:749
+#: motion/templates/motion/overview.html:20
+#: motion/templates/motion/overview.html:40
+#: motion/templates/motion/view.html:34
+#: motion/templates/projector/Motion.html:11
+#: participant/templates/participant/overview.html:52
+msgid "Status"
+msgstr "Status"
+
#: assignment/templates/assignment/overview.html:22
msgid "election"
msgid_plural "elections"
@@ -1517,11 +735,33 @@ msgstr "Wahl projizieren"
msgid "Short description (for ballot paper)"
msgstr "Kurzbeschreibung (für Stimmzettel)"
+#: assignment/templates/assignment/poll_view.html:12
+#: motion/templates/motion/poll_view.html:14
+msgid "Special values"
+msgstr "Spezielle Werte"
+
+#: assignment/templates/assignment/poll_view.html:12
+#: motion/templates/motion/poll_view.html:14 poll/models.py:235
+msgid "majority"
+msgstr "Mehrheit"
+
+#: assignment/templates/assignment/poll_view.html:12
+#: motion/templates/motion/poll_view.html:14 poll/models.py:237
+#: poll/models.py:239
+msgid "undocumented"
+msgstr "nicht erfasst"
+
+#: assignment/templates/assignment/poll_view.html:59
+#: motion/templates/motion/poll_view.html:45
+msgid "Ballot paper as PDF"
+msgstr "Stimmzettel als PDF"
+
#: assignment/templates/assignment/view.html:21
msgid "Change status"
msgstr "Status ändern"
#: assignment/templates/assignment/view.html:43
+#: assignment/templates/assignment/view.html:96
msgid "Remove candidate"
msgstr "Kandidate/in entfernen"
@@ -1542,31 +782,46 @@ msgstr "Selbst kandidieren"
msgid "Add new participant"
msgstr "Neue/n Teilnehmer/in hinzufügen"
-#: assignment/templates/assignment/view.html:93
+#: assignment/templates/assignment/view.html:92
+msgid "Blocked Candidates"
+msgstr "Blockierte Kandidaten/innen"
+
+#: assignment/templates/assignment/view.html:99
+msgid "There are no blocked candidates."
+msgstr "Keine blockierten Kandidaten verfügbar."
+
+#: assignment/templates/assignment/view.html:103
#: assignment/templates/projector/Assignment.html:52
msgid "Election results"
msgstr "Wahlergebnisse"
-#: assignment/templates/assignment/view.html:116
+#: assignment/templates/assignment/view.html:126
msgid "Publish/unpublish results"
msgstr "Ergebnisse veröffentlichen/unveröffentlichen"
-#: assignment/templates/assignment/view.html:128
-#: assignment/templates/assignment/view.html:216
+#: assignment/templates/assignment/view.html:138
+#: assignment/templates/assignment/view.html:226
msgid "New ballot"
msgstr "Neuer Wahlgang"
-#: assignment/templates/assignment/view.html:143
+#: assignment/templates/assignment/view.html:153
#: assignment/templates/projector/Assignment.html:69
msgid "Candidate is elected"
msgstr "Kandidat/in ist gewählt"
-#: assignment/templates/assignment/view.html:162
+#: assignment/templates/assignment/view.html:172
#: assignment/templates/projector/Assignment.html:84
msgid "was not a {number, title, text, reason, "
+"first_name, last_name}
(number
and reason
"
+"are optional and may be empty)"
+msgstr ""
+"Erforderliche kommaseparierte Werte: {Nummer, Titel, Text, Begründung, "
+"Vorname, Nachname}
(Nummer
und Begründung
"
+"sind optional und können auch leer sein)"
+
+#: motion/templates/motion/import.html:13
+#: participant/templates/participant/import.html:13
+msgid "Required CSV file encoding: UTF-8 (Unicode)."
+msgstr "Erforderliches CSV-Datei-Encoding: UTF-8 (Unicode)."
+
+#: motion/templates/motion/import.html:16
+#: participant/templates/participant/import.html:16
+msgid "A CSV example file is available in OpenSlides Wiki."
+msgstr "Eine CSV-Beispiel-Datei gibt es im OpenSlides Wiki."
+
+#: motion/templates/motion/import.html:23
+#: participant/templates/participant/import.html:23
+msgid "Import"
+msgstr "Importieren"
+
+#: motion/templates/motion/overview.html:15
+msgid "Need supporters"
+msgstr "Benötigt Unterstützer/innen"
+
+#: motion/templates/motion/overview.html:18
+msgid "Without number"
+msgstr "Ohne Nummer"
+
+#: motion/templates/motion/overview.html:22
+msgid "Not yet authorized"
+msgstr "Noch nicht zugelassen"
+
+#: motion/templates/motion/overview.html:23
+msgid "Authorized"
+msgstr "Zugelassen"
+
+#: motion/templates/motion/overview.html:26
+msgid "Withdrawen (by submitter)"
+msgstr "Zurückgezogen (durch Antragsteller/in)"
+
+#: motion/templates/motion/overview.html:35
+msgid "Number"
+msgstr "Nummer"
+
+#: motion/templates/motion/overview.html:36
+msgid "Motion title"
+msgstr "Antragstitel"
+
+#: motion/templates/motion/overview.html:38
+msgid "Number of supporters"
+msgstr "Anzahl der Unterstützer/innen"
+
+#: motion/templates/motion/overview.html:42
+#: motion/templates/motion/view.html:109
+msgid "Creation Time"
+msgstr "Erstellungszeit"
+
+#: motion/templates/motion/overview.html:67
+msgid "Activate motion"
+msgstr "Antrag projizieren"
+
+#: motion/templates/motion/poll_view.html:21
+msgid "Option"
+msgstr "Wahlmöglichkeit"
+
+#: motion/templates/motion/view.html:51 motion/templates/motion/view.html:91
+msgid "New vote"
+msgstr "Neue Abstimmung"
+
+#: motion/templates/motion/view.html:67
+msgid "Edit Vote"
+msgstr "Abstimmung bearbeiten"
+
+#: motion/templates/motion/view.html:70
+msgid "Delete Vote"
+msgstr "Abstimmung löschen"
+
+#: motion/templates/motion/view.html:99
+msgid "Enter result"
+msgstr "Ergebnis eingeben"
+
+#: motion/templates/motion/view.html:116
+msgid "Withdraw"
+msgstr "Zurückziehen"
+
+#: motion/templates/motion/view.html:124
+msgid "Unsupport"
+msgstr "Nicht unterstützen"
+
+#: motion/templates/motion/view.html:130
+msgid "Support"
+msgstr "Unterstützen"
+
+#: motion/templates/motion/view.html:136
+msgid "minimum required supporters"
+msgstr "minimal erforderliche Unterstützer/innen"
+
+#: motion/templates/motion/view.html:143
+msgid "Manage motion"
+msgstr "Antrag Verwalten"
+
+#: motion/templates/motion/view.html:146
+msgid "Formal validation"
+msgstr "Formale Gültigkeitsprüfung"
+
+#: motion/templates/motion/view.html:148
+msgid "Publish"
+msgstr "Veröffentlichen"
+
+#: motion/templates/motion/view.html:151
+msgid "Permit"
+msgstr "Zulassen"
+
+#: motion/templates/motion/view.html:154
+msgid "Not permit (reject)"
+msgstr "Nicht zulassen (verwerfen)"
+
+#: motion/templates/motion/view.html:157
+msgid "Set Number"
+msgstr "Setze Nummer"
+
+#: motion/templates/motion/view.html:164
+msgid "Result after vote"
+msgstr "Ergebnis nach der Abstimmung"
+
+#: motion/templates/motion/view.html:178
+msgid "Result after debate"
+msgstr "Ergebnis nach der Debatte"
+
+#: motion/templates/motion/view.html:189
+msgid "Withdrawed by Submitter"
+msgstr "Zurückgezogen durch Antragsteller/in"
+
+#: motion/templates/motion/view.html:194
+msgid "For Administration only:"
+msgstr "Nur zur Administration:"
+
+#: motion/templates/motion/view.html:196
+msgid "Reset"
+msgstr "Zurücksetzen"
+
+#: motion/templates/motion/view.html:219
+msgid "This is not the newest version."
+msgstr "Dies ist nicht die neuste Version."
+
+#: motion/templates/motion/view.html:219 motion/templates/motion/view.html:221
+msgid "Go to version"
+msgstr "Gehe zu Version"
+
+#: motion/templates/motion/view.html:221
+msgid "This is not the authorized version."
+msgstr "Dies ist nicht die zugelassene Version."
+
+#: motion/templates/motion/view.html:239
+msgid "Version History"
+msgstr "Versionshistorie"
+
+#: motion/templates/motion/view.html:245
+msgid "Time"
+msgstr "Zeit"
+
+#: motion/templates/motion/view.html:256
+msgid "Version authorized"
+msgstr "Version %d zugelassen"
+
+#: motion/templates/motion/view.html:259
+msgid "Permit Version"
+msgstr "Version zulassen"
+
+#: motion/templates/motion/view.html:262
+msgid "Reject Version"
+msgstr "Version verwerfen"
+
+#: motion/templates/motion/view.html:266
+msgid "Version rejected"
+msgstr "Version verworfen"
+
+#: motion/templates/motion/view.html:276 motion/templates/motion/view.html:283
+#: motion/templates/motion/view.html:290
+msgid "unchanged"
+msgstr "unverändert"
+
+#: motion/templates/motion/view.html:299
+msgid "Log"
+msgstr "Log"
+
+#: motion/templates/motion/widget.html:31
+msgid "No motion available."
+msgstr "Keine Antrag vorhanden."
+
+#: motion/templates/projector/Motion.html:29
+msgid "Poll result"
+msgstr "Abstimmungsergebnis"
+
+#: motion/templates/projector/Motion.html:47
+msgid "No poll results available."
+msgstr "Keine Abstimmungen vorhanden."
+
#: participant/__init__.py:3
msgid "Participant"
msgstr "Teilnehmer"
@@ -1692,145 +1677,149 @@ msgstr "System URL"
msgid "Printed in PDF of first time passwords only."
msgstr "Erscheint nur im PDF der Erst-Passwörter"
-#: participant/models.py:28 participant/templates/participant/overview.html:25
+#: participant/forms.py:118
+msgid "Sort users by first name"
+msgstr "Sortiere Teilnehmer beim Vornamen"
+
+#: participant/models.py:29 participant/templates/participant/overview.html:25
msgid "Male"
msgstr "Männlich"
-#: participant/models.py:29 participant/templates/participant/overview.html:26
+#: participant/models.py:30 participant/templates/participant/overview.html:26
msgid "Female"
msgstr "Weiblich"
-#: participant/models.py:32 participant/templates/participant/overview.html:38
+#: participant/models.py:33 participant/templates/participant/overview.html:38
msgid "Delegate"
msgstr "Delegierter"
-#: participant/models.py:33 participant/templates/participant/overview.html:39
+#: participant/models.py:34 participant/templates/participant/overview.html:39
msgid "Observer"
msgstr "Beobachter"
-#: participant/models.py:34 participant/templates/participant/overview.html:40
+#: participant/models.py:35 participant/templates/participant/overview.html:40
msgid "Staff"
msgstr "Mitarbeiter"
-#: participant/models.py:35 participant/templates/participant/overview.html:41
+#: participant/models.py:36 participant/templates/participant/overview.html:41
msgid "Guest"
msgstr "Gast"
-#: participant/models.py:40 participant/templates/participant/overview.html:30
+#: participant/models.py:41 participant/templates/participant/overview.html:30
#: participant/templates/participant/overview.html:68
-msgid "Category"
-msgstr "Kategorie"
+msgid "Detail"
+msgstr "Detail"
-#: participant/models.py:41
+#: participant/models.py:42
msgid "Will be shown behind the name."
msgstr "Wird nach dem Namen angezeigt."
-#: participant/models.py:44 participant/templates/participant/overview.html:24
+#: participant/models.py:45 participant/templates/participant/overview.html:24
msgid "Gender"
msgstr "Geschlecht"
-#: participant/models.py:44 participant/models.py:47 participant/models.py:50
+#: participant/models.py:45 participant/models.py:48 participant/models.py:51
msgid "Only for filter the userlist."
msgstr "Nur zum Filtern der Benutzerliste."
-#: participant/models.py:47
+#: participant/models.py:48
msgid "Typ"
msgstr "Typ"
-#: participant/models.py:49 participant/views.py:216
+#: participant/models.py:50 participant/views.py:217
#: participant/templates/participant/overview.html:45
#: participant/templates/participant/overview.html:70
msgid "Committee"
msgstr "Amt"
-#: participant/models.py:53
+#: participant/models.py:54
msgid "Only for notes."
msgstr "Nur für Notizen."
-#: participant/models.py:56
+#: participant/models.py:57
msgid "Default password"
msgstr "Vorgegebenes Passwort"
-#: participant/models.py:98
+#: participant/models.py:102
msgid "Can see participant"
msgstr "Darf die Teilnehmer/inen sehen"
-#: participant/models.py:100
+#: participant/models.py:104
msgid "Can manage participant"
msgstr "Darf die Teilnehmer/inen verwalten"
-#: participant/views.py:211
+#: participant/views.py:212
msgid "Participant-list"
msgstr "Teilnehmerliste"
-#: participant/views.py:212
+#: participant/views.py:213
msgid "List of Participants"
msgstr "Teilnehmerliste"
-#: participant/views.py:215 participant/templates/participant/overview.html:67
+#: participant/views.py:216 participant/templates/participant/overview.html:67
msgid "Last Name"
msgstr "Nachname"
-#: participant/views.py:215 participant/templates/participant/overview.html:66
+#: participant/views.py:216 participant/templates/participant/overview.html:66
msgid "First Name"
msgstr "Vorname"
-#: participant/views.py:215
+#: participant/views.py:216
msgid "Group"
msgstr "Gruppe"
-#: participant/views.py:215 participant/templates/participant/overview.html:37
+#: participant/views.py:216 participant/templates/participant/overview.html:37
#: participant/templates/participant/overview.html:69
msgid "Type"
msgstr "Typ"
-#: participant/views.py:244
+#: participant/views.py:245
msgid "Participant-passwords"
msgstr "Teilnehmer-Passwoerter"
-#: participant/views.py:262
+#: participant/views.py:263
msgid "Account for OpenSlides"
msgstr "Zugang für OpenSlides"
-#: participant/views.py:264
+#: participant/views.py:265
#, python-format
msgid "for %s"
msgstr "für %s"
-#: participant/views.py:267
+#: participant/views.py:268
#, python-format
msgid "User: %s"
msgstr "Nutzername: %s"
-#: participant/views.py:271
+#: participant/views.py:272
#, python-format
msgid "Password: %s"
msgstr "Passwort: %s"
-#: participant/views.py:276
+#: participant/views.py:277
#, python-format
msgid "URL: %s"
msgstr "URL: %s"
-#: participant/views.py:318
+#: participant/views.py:319
#, python-format
msgid "%d new participants were successfully imported."
msgstr "%d neue Teilnehmer/innen wurden erfolgreich importiert."
-#: participant/views.py:329
+#: participant/views.py:330
msgid "Do you really want to reset the password?"
msgstr "Soll das Passwort wirklich zurückgesetzt werden?"
-#: participant/views.py:345
+#: participant/views.py:346
#, python-format
msgid "The Password for %s was successfully reset."
msgstr "Das Passwort für %s wurde erfolgreich zurückgesetzt."
-#: participant/views.py:424
+#: participant/views.py:428
msgid "Participants settings successfully saved."
msgstr "Teilnehmer/innen-Einstellungen wurden erfolgreich gespeichert."
-#: participant/views.py:434
+#: participant/views.py:438
#, python-format
msgid ""
"Installation was successfully! Use %(user)s (password: %(password)s) for "
@@ -1843,15 +1832,15 @@ msgstr ""
"Sie das Passwort nach der ersten Anmeldung! Anderenfalls erscheint diese "
"Meldung weiterhin für alle und ist ein Sicherheitsrisiko."
-#: participant/views.py:457
+#: participant/views.py:461
msgid "User settings successfully saved."
msgstr "Nutzereinstellungen wurden erfolgreich gespeichert."
-#: participant/views.py:479
+#: participant/views.py:483
msgid "Password successfully changed."
msgstr "Password wurde erfolgreich geändert."
-#: participant/views.py:497
+#: participant/views.py:501
#: participant/templates/participant/base_participant.html:12
#: participant/templates/participant/overview.html:7
#: participant/templates/participant/overview.html:18
@@ -2045,23 +2034,23 @@ msgstr "Darf den Projektor sehen"
msgid "Can see the dashboard"
msgstr "Darf das Dashboard sehen"
-#: projector/views.py:184
+#: projector/views.py:185
msgid "Errors in the form"
msgstr "Fehler im Formular"
-#: projector/views.py:360 projector/templates/projector/dashboard.html:17
+#: projector/views.py:361 projector/templates/projector/dashboard.html:17
msgid "Dashboard"
msgstr "Dashboard"
-#: projector/views.py:377
+#: projector/views.py:378
msgid "Projector live view"
msgstr "Projektor-Live-Ansicht"
-#: projector/views.py:403
+#: projector/views.py:404
msgid "Overlays"
msgstr "Einblendungen"
-#: projector/views.py:416
+#: projector/views.py:417
msgid "Custom Slides"
msgstr "Benutzerdefinierte Folien"
@@ -2086,6 +2075,7 @@ msgid "Projector view"
msgstr "Projektor-Ansicht"
#: projector/templates/projector/control_countdown.html:6
+msgctxt "seconds"
msgid "s"
msgstr "s"
@@ -2225,3 +2215,33 @@ msgstr "undefinierter-dateiname"
#: utils/jsonfield/fields.py:21
msgid "Enter valid JSON"
msgstr "Gebe valides JSON ein"
+
+#~ msgid "Applications"
+#~ msgstr "Anträge"
+
+#~ msgid "Application"
+#~ msgstr "Antrag"
+
+#~ msgid "Application No. %s"
+#~ msgstr "Antrag Nr. %s"
+
+#~ msgid "Application No."
+#~ msgstr "Antrag Nr."
+
+#~ msgid "Show Application"
+#~ msgstr "Antrag projizieren"
+
+#~ msgid "Application settings"
+#~ msgstr "Antrags-Einstellungen"
+
+#~ msgid "Category"
+#~ msgstr "Kategorie"
+
+#~ msgid "Do you really want to delete multiple motions?"
+#~ msgstr "Wollen Sie wirklich mehrere Anträge löschen?"
+
+#~ msgid "Do you really want to delete %s?"
+#~ msgstr "Soll %s wirklich gelöscht werden?"
+
+#~ msgid "You!"
+#~ msgstr "Sie!"
diff --git a/openslides/application/__init__.py b/openslides/motion/__init__.py
similarity index 100%
rename from openslides/application/__init__.py
rename to openslides/motion/__init__.py
diff --git a/openslides/application/forms.py b/openslides/motion/forms.py
similarity index 77%
rename from openslides/application/forms.py
rename to openslides/motion/forms.py
index a6cc0bfad..cf144feec 100644
--- a/openslides/application/forms.py
+++ b/openslides/motion/forms.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
- openslides.application.forms
+ openslides.motion.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Forms for the application app.
+ Forms for the motion app.
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
@@ -15,36 +15,36 @@ from django.utils.translation import ugettext_lazy as _, ugettext_noop
from openslides.utils.forms import CssClassMixin
from openslides.utils.person import PersonFormField, MultiplePersonFormField
-from openslides.application.models import Application
+from openslides.motion.models import Motion
-class ApplicationForm(forms.Form, CssClassMixin):
+class MotionForm(forms.Form, CssClassMixin):
title = forms.CharField(widget=forms.TextInput(), label=_("Title"))
text = forms.CharField(widget=forms.Textarea(), label=_("Text"))
reason = forms.CharField(widget=forms.Textarea(), required=False,
label=_("Reason"))
-class ApplicationFormTrivialChanges(ApplicationForm):
+class MotionFormTrivialChanges(MotionForm):
trivial_change = forms.BooleanField(required=False,
label=_("Trivial change"),
help_text=_("Trivial changes don't create a new version."))
-class ApplicationManagerForm(forms.ModelForm, CssClassMixin):
+class MotionManagerForm(forms.ModelForm, CssClassMixin):
submitter = PersonFormField()
class Meta:
- model = Application
+ model = Motion
exclude = ('number', 'status', 'permitted', 'log', 'supporter')
-class ApplicationManagerFormSupporter(ApplicationManagerForm):
+class MotionManagerFormSupporter(MotionManagerForm):
# TODO: Do not show the submitter in the user-list
supporter = MultiplePersonFormField(required=False, label=_("Supporters"))
-class ApplicationImportForm(forms.Form, CssClassMixin):
+class MotionImportForm(forms.Form, CssClassMixin):
csvfile = forms.FileField(
widget=forms.FileInput(attrs={'size':'50'}),
label=_("CSV File"),
@@ -58,7 +58,7 @@ class ApplicationImportForm(forms.Form, CssClassMixin):
class ConfigForm(forms.Form, CssClassMixin):
- application_min_supporters = forms.IntegerField(
+ motion_min_supporters = forms.IntegerField(
widget=forms.TextInput(attrs={'class':'small-input'}),
label=_("Number of (minimum) required supporters for a motion"),
initial=4,
@@ -66,12 +66,12 @@ class ConfigForm(forms.Form, CssClassMixin):
max_value=8,
help_text=_("Choose 0 to disable the supporting system"),
)
- application_preamble = forms.CharField(
+ motion_preamble = forms.CharField(
widget=forms.TextInput(),
required=False,
label=_("Motion preamble")
)
- application_pdf_ballot_papers_selection = forms.ChoiceField(
+ motion_pdf_ballot_papers_selection = forms.ChoiceField(
widget=forms.Select(),
required=False,
label=_("Number of ballot papers (selection)"),
@@ -81,24 +81,24 @@ class ConfigForm(forms.Form, CssClassMixin):
("CUSTOM_NUMBER", _("Use the following custom number")),
]
)
- application_pdf_ballot_papers_number = forms.IntegerField(
+ motion_pdf_ballot_papers_number = forms.IntegerField(
widget=forms.TextInput(attrs={'class':'small-input'}),
required=False,
min_value=1,
label=_("Custom number of ballot papers")
)
- application_pdf_title = forms.CharField(
+ motion_pdf_title = forms.CharField(
widget=forms.TextInput(),
required=False,
label=_("Title for PDF document (all motions)")
)
- application_pdf_preamble = forms.CharField(
+ motion_pdf_preamble = forms.CharField(
widget=forms.Textarea(),
required=False,
label=_("Preamble text for PDF document (all motions)")
)
- application_allow_trivial_change = forms.BooleanField(
+ motion_allow_trivial_change = forms.BooleanField(
label=_("Allow trivial changes"),
help_text=_('Warning: Trivial changes undermine the motions '
'autorisation system.'),
diff --git a/openslides/application/models.py b/openslides/motion/models.py
similarity index 74%
rename from openslides/application/models.py
rename to openslides/motion/models.py
index e1c6c3555..3f5635a19 100644
--- a/openslides/application/models.py
+++ b/openslides/motion/models.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
- openslides.application.models
+ openslides.motion.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Models for the application app.
+ Models for the motion app.
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
:license: GNU GPL, see LICENSE for more details.
@@ -34,13 +34,13 @@ from openslides.projector.models import SlideMixin
from openslides.agenda.models import Item
-class ApplicationSupporter(models.Model):
- application = models.ForeignKey("Application")
+class MotionSupporter(models.Model):
+ motion = models.ForeignKey("Motion")
person = PersonField()
-class Application(models.Model, SlideMixin):
- prefix = "application"
+class Motion(models.Model, SlideMixin):
+ prefix = "motion"
STATUS = (
('pub', _('Published')),
('per', _('Permitted')),
@@ -74,10 +74,10 @@ class Application(models.Model, SlideMixin):
@property
def last_version(self):
"""
- Return last version of the application.
+ Return last version of the motion.
"""
try:
- return AVersion.objects.filter(application=self).order_by('id') \
+ return AVersion.objects.filter(motion=self).order_by('id') \
.reverse()[0]
except IndexError:
return None
@@ -85,7 +85,7 @@ class Application(models.Model, SlideMixin):
@property
def public_version(self):
"""
- Return permitted, if the application was permitted, else last_version
+ Return permitted, if the motion was permitted, else last_version
"""
if self.permitted is not None:
return self.permitted
@@ -115,14 +115,14 @@ class Application(models.Model, SlideMixin):
@property
def versions(self):
"""
- Return a list of all versions of the application.
+ Return a list of all versions of the motion.
"""
- return AVersion.objects.filter(application=self)
+ return AVersion.objects.filter(motion=self)
@property
def creation_time(self):
"""
- Return the time of the creation of the application.
+ Return the time of the creation of the motion.
"""
try:
return self.versions[0].time
@@ -132,7 +132,7 @@ class Application(models.Model, SlideMixin):
@property
def notes(self):
"""
- Return some information of the application.
+ Return some information of the motion.
"""
note = []
if self.status == "pub" and not self.enough_supporters:
@@ -146,9 +146,9 @@ class Application(models.Model, SlideMixin):
@property
def unpermitted_changes(self):
"""
- Return True if the application has unpermitted changes.
+ Return True if the motion has unpermitted changes.
- The application has unpermitted changes, if the permitted-version
+ The motion has unpermitted changes, if the permitted-version
is not the lastone and the lastone is not rejected.
TODO: rename the property in unchecked__changes
"""
@@ -160,32 +160,35 @@ class Application(models.Model, SlideMixin):
@property
def supporters(self):
- for object in self.applicationsupporter_set.all():
+ for object in self.motionsupporter_set.all():
yield object.person
def is_supporter(self, person):
- return self.applicationsupporter_set.filter(person=person).exists()
+ try:
+ return self.motionsupporter_set.filter(person=person).exists()
+ except AttributeError:
+ return False
@property
def enough_supporters(self):
"""
- Return True, if the application has enough supporters
+ Return True, if the motion has enough supporters
"""
- min_supporters = int(config['application_min_supporters'])
+ min_supporters = int(config['motion_min_supporters'])
if self.status == "pub":
return self.count_supporters() >= min_supporters
else:
return True
def count_supporters(self):
- return self.applicationsupporter_set.count()
+ return self.motionsupporter_set.count()
@property
def missing_supporters(self):
"""
Return number of missing supporters
"""
- min_supporters = int(config['application_min_supporters'])
+ min_supporters = int(config['motion_min_supporters'])
delta = min_supporters - self.count_supporters()
if delta > 0:
return delta
@@ -194,9 +197,9 @@ class Application(models.Model, SlideMixin):
def save(self, user=None, nonewversion=False, trivial_change=False):
"""
- Save the Application, and create a new AVersion if necessary
+ Save the Motion, and create a new AVersion if necessary
"""
- super(Application, self).save()
+ super(Motion, self).save()
if nonewversion:
return
last_version = self.last_version
@@ -226,14 +229,14 @@ class Application(models.Model, SlideMixin):
version = AVersion(title=getattr(self, 'title', ''),
text=getattr(self, 'text', ''),
reason=getattr(self, 'reason', ''),
- application=self)
+ motion=self)
version.save()
self.writelog(_("Version %s created") % version.aid, user)
- is_manager = user.has_perm('application.can_manage_application')
+ is_manager = user.has_perm('motion.can_manage_motion')
except AttributeError:
is_manager = False
- supporters = self.applicationsupporter_set.all()
+ supporters = self.motionsupporter_set.all()
if (self.status == "pub"
and supporters
and not is_manager):
@@ -242,7 +245,7 @@ class Application(models.Model, SlideMixin):
def reset(self, user):
"""
- Reset the application.
+ Reset the motion.
"""
self.status = "pub"
self.permitted = None
@@ -251,30 +254,30 @@ class Application(models.Model, SlideMixin):
def support(self, person):
"""
- Add a Supporter to the list of supporters of the application.
+ Add a Supporter to the list of supporters of the motion.
"""
if person == self.submitter:
# TODO: Use own Exception
raise NameError('Supporter can not be the submitter of a ' \
- 'application.')
+ 'motion.')
if self.permitted is not None:
# TODO: Use own Exception
- raise NameError('This application is already permitted.')
+ raise NameError('This motion is already permitted.')
if not self.is_supporter(person):
- ApplicationSupporter(application=self, person=person).save()
+ MotionSupporter(motion=self, person=person).save()
self.writelog(_("Supporter: +%s") % (person))
# TODO: Raise a precise exception for the view in else-clause
def unsupport(self, person):
"""
- remove a supporter from the list of supporters of the application
+ remove a supporter from the list of supporters of the motion
"""
if self.permitted is not None:
# TODO: Use own Exception
- raise NameError('This application is already permitted.')
+ raise NameError('This motion is already permitted.')
try:
- object = self.applicationsupporter_set.get(person=person).delete()
- except ApplicationSupporter.DoesNotExist:
+ object = self.motionsupporter_set.get(person=person).delete()
+ except MotionSupporter.DoesNotExist:
# TODO: Don't do nothing but raise a precise exception for the view
pass
else:
@@ -282,14 +285,14 @@ class Application(models.Model, SlideMixin):
def set_number(self, number=None, user=None):
"""
- Set a number for ths application.
+ Set a number for ths motion.
"""
if self.number is not None:
# TODO: Use own Exception
- raise NameError('This application has already a number.')
+ raise NameError('This motion has already a number.')
if number is None:
try:
- number = Application.objects.aggregate(Max('number')) \
+ number = Motion.objects.aggregate(Max('number')) \
['number__max'] + 1
except TypeError:
number = 1
@@ -300,7 +303,7 @@ class Application(models.Model, SlideMixin):
def permit(self, user=None):
"""
- Change the status of this application to permit.
+ Change the status of this motion to permit.
"""
self.set_status(user, "per")
aversion = self.last_version
@@ -313,7 +316,7 @@ class Application(models.Model, SlideMixin):
def notpermit(self, user=None):
"""
- Change the status of this application to 'not permitted (rejected)'.
+ Change the status of this motion to 'not permitted (rejected)'.
"""
self.set_status(user, "nop")
#TODO: reject last version
@@ -326,10 +329,10 @@ class Application(models.Model, SlideMixin):
def set_status(self, user, status, force=False):
"""
- Set the status of the application.
+ Set the status of the motion.
"""
error = True
- for a, b in Application.STATUS:
+ for a, b in Motion.STATUS:
if status == a:
error = False
break
@@ -363,25 +366,25 @@ class Application(models.Model, SlideMixin):
"""
actions = []
- # check if user allowed to withdraw an application
+ # check if user allowed to withdraw an motion
if ((self.status == "pub"
and self.number
and user == self.submitter)
or (self.status == "pub"
and self.number
- and user.has_perm("application.can_manage_application"))
+ and user.has_perm("motion.can_manage_motion"))
or (self.status == "per"
and user == self.submitter)
or (self.status == "per"
- and user.has_perm("application.can_manage_application"))):
+ and user.has_perm("motion.can_manage_motion"))):
actions.append("wit")
- #Check if the user can review the application
+ #Check if the user can review the motion
if (self.status == "rev"
and (self.submitter == user
- or user.has_perm("application.can_manage_application"))):
+ or user.has_perm("motion.can_manage_motion"))):
actions.append("pub")
- # Check if the user can support and unspoort the application
+ # Check if the user can support and unspoort the motion
if (self.status == "pub"
and user != self.submitter
and not self.is_supporter(user)):
@@ -390,22 +393,22 @@ class Application(models.Model, SlideMixin):
if self.status == "pub" and self.is_supporter(user):
actions.append("unsupport")
- #Check if the user can edit the application
+ #Check if the user can edit the motion
if (user == self.submitter \
and (self.status in ('pub', 'per'))) \
- or user.has_perm("application.can_manage_application"):
+ or user.has_perm("motion.can_manage_motion"):
actions.append("edit")
- # Check if the user can delete the application (admin, manager, owner)
+ # Check if the user can delete the motion (admin, manager, owner)
# reworked as requiered in #100
- if (user.has_perm("applicatoin.can_delete_all_applications") or
- (user.has_perm("application.can_manage_application") and
+ if (user.has_perm("motion.can_delete_all_motions") or
+ (user.has_perm("motion.can_manage_motion") and
self.number is None) or
(self.submitter == user and self.number is None)):
actions.append("delete")
#For the rest, all actions need the manage permission
- if not user.has_perm("application.can_manage_application"):
+ if not user.has_perm("motion.can_manage_motion"):
return actions
if self.status == "pub":
@@ -429,17 +432,17 @@ class Application(models.Model, SlideMixin):
def delete(self, force=False):
"""
- Delete the application. It is not possible, if the application has
+ Delete the motion. It is not possible, if the motion has
allready a number
"""
if self.number and not force:
- raise NameError('The application has already a number. ' \
+ raise NameError('The motion has already a number. ' \
'You can not delete it.')
for item in Item.objects.filter(related_sid=self.sid):
item.delete()
- super(Application, self).delete()
+ super(Motion, self).delete()
def writelog(self, text, user=None):
if not self.log:
@@ -460,7 +463,7 @@ class Application(models.Model, SlideMixin):
def __getattr__(self, name):
"""
if name is title, text, reason or time,
- Return this attribute from the newest version of the application
+ Return this attribute from the newest version of the motion
"""
if name in ('title', 'text', 'reason', 'time', 'aid'):
try:
@@ -475,9 +478,9 @@ class Application(models.Model, SlideMixin):
def gen_poll(self, user=None):
"""
- Generates a poll object for the application
+ Generates a poll object for the motion
"""
- poll = ApplicationPoll(application=self)
+ poll = MotionPoll(motion=self)
poll.save()
poll.set_options()
self.writelog(_("Poll created"), user)
@@ -485,7 +488,7 @@ class Application(models.Model, SlideMixin):
@property
def polls(self):
- return self.applicationpoll_set.all()
+ return self.motionpoll_set.all()
@property
def results(self):
@@ -509,19 +512,19 @@ class Application(models.Model, SlideMixin):
"""
return the slide dict
"""
- data = super(Application, self).slide()
- data['application'] = self
+ data = super(Motion, self).slide()
+ data['motion'] = self
data['title'] = self.title
- data['template'] = 'projector/Application.html'
+ data['template'] = 'projector/Motion.html'
return data
def get_absolute_url(self, link='view'):
if link == 'view':
- return reverse('application_view', args=[str(self.id)])
+ return reverse('motion_view', args=[str(self.id)])
if link == 'edit':
- return reverse('application_edit', args=[str(self.id)])
+ return reverse('motion_edit', args=[str(self.id)])
if link == 'delete':
- return reverse('application_delete', args=[str(self.id)])
+ return reverse('motion_delete', args=[str(self.id)])
def __unicode__(self):
try:
@@ -531,10 +534,10 @@ class Application(models.Model, SlideMixin):
class Meta:
permissions = (
- ('can_see_application', ugettext_noop("Can see motions")),
- ('can_create_application', ugettext_noop("Can create motions")),
- ('can_support_application', ugettext_noop("Can support motions")),
- ('can_manage_application', ugettext_noop("Can manage motions")),
+ ('can_see_motion', ugettext_noop("Can see motions")),
+ ('can_create_motion', ugettext_noop("Can create motions")),
+ ('can_support_motion', ugettext_noop("Can support motions")),
+ ('can_manage_motion', ugettext_noop("Can manage motions")),
)
ordering = ('number',)
@@ -545,7 +548,7 @@ class AVersion(models.Model):
reason = models.TextField(null=True, blank=True, verbose_name = _("Reason"))
rejected = models.BooleanField() # = Not Permitted
time = models.DateTimeField(auto_now=True)
- application = models.ForeignKey(Application)
+ motion = models.ForeignKey(Motion)
def __unicode__(self):
return "%s %s" % (self.id, self.title)
@@ -556,31 +559,31 @@ class AVersion(models.Model):
return self._aid
except AttributeError:
self._aid = AVersion.objects \
- .filter(application=self.application) \
+ .filter(motion=self.motion) \
.filter(id__lte=self.id).count()
return self._aid
-register_slidemodel(Application)
+register_slidemodel(Motion)
-class ApplicationVote(BaseVote):
- option = models.ForeignKey('ApplicationOption')
+class MotionVote(BaseVote):
+ option = models.ForeignKey('MotionOption')
-class ApplicationOption(BaseOption):
- poll = models.ForeignKey('ApplicationPoll')
- vote_class = ApplicationVote
+class MotionOption(BaseOption):
+ poll = models.ForeignKey('MotionPoll')
+ vote_class = MotionVote
-class ApplicationPoll(BasePoll, CountInvalid, CountVotesCast):
- option_class = ApplicationOption
+class MotionPoll(BasePoll, CountInvalid, CountVotesCast):
+ option_class = MotionOption
vote_values = [ugettext_noop('Yes'), ugettext_noop('No'),
ugettext_noop('Abstain')]
- application = models.ForeignKey(Application)
+ motion = models.ForeignKey(Motion)
- def get_application(self):
- return self.application
+ def get_motion(self):
+ return self.motion
def set_options(self):
#TODO: maybe it is possible with .create() to call this without poll=self
@@ -591,20 +594,20 @@ class ApplicationPoll(BasePoll, CountInvalid, CountVotesCast):
CountVotesCast.append_pollform_fields(self, fields)
def get_absolute_url(self):
- return reverse('application_poll_view', args=[self.id])
+ return reverse('motion_poll_view', args=[self.id])
def get_ballot(self):
- return self.application.applicationpoll_set.filter(id__lte=self.id).count()
+ return self.motion.motionpoll_set.filter(id__lte=self.id).count()
-@receiver(default_config_value, dispatch_uid="application_default_config")
+@receiver(default_config_value, dispatch_uid="motion_default_config")
def default_config(sender, key, **kwargs):
return {
- 'application_min_supporters': 0,
- 'application_preamble': _('The assembly may decide,'),
- 'application_pdf_ballot_papers_selection': 'CUSTOM_NUMBER',
- 'application_pdf_ballot_papers_number': '8',
- 'application_pdf_title': _('Motions'),
- 'application_pdf_preamble': '',
- 'application_allow_trivial_change': False,
+ 'motion_min_supporters': 0,
+ 'motion_preamble': _('The assembly may decide,'),
+ 'motion_pdf_ballot_papers_selection': 'CUSTOM_NUMBER',
+ 'motion_pdf_ballot_papers_number': '8',
+ 'motion_pdf_title': _('Motions'),
+ 'motion_pdf_preamble': '',
+ 'motion_allow_trivial_change': False,
}.get(key)
diff --git a/openslides/motion/templates/motion/base_motion.html b/openslides/motion/templates/motion/base_motion.html
new file mode 100644
index 000000000..1466bfcf2
--- /dev/null
+++ b/openslides/motion/templates/motion/base_motion.html
@@ -0,0 +1,66 @@
+{% extends "base.html" %}
+
+{% load tags %}
+{% load i18n %}
+{% load staticfiles %}
+
+{% block submenu %}
+ {% url motion_overview as url_motionoverview %}
+ {% trans "Number" %} | @@ -42,39 +42,39 @@{% trans "Creation Time" %} | {% trans "Actions" %} | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
{% if application.number %}{{ application.number }}{% else %}-{% endif %} | -{{ application.public_version.title }} | + {% if motion.active %}activeline{% endif %}"> +{% if motion.number %}{{ motion.number }}{% else %}-{% endif %} | +{{ motion.public_version.title }} | {% if min_supporters > 0 %} -{{ application.supporter.count }} | +{{ motion.count_supporters }} | {% endif %} -{% if application.status != "pub" %}
- {{ application.get_status_display }} + | {% if motion.status != "pub" %}
+ {{ motion.get_status_display }} {% endif %} - {% for note in application.notes %} + {% for note in motion.notes %} {{ note }} {% if not forloop.last %} {%endif%} {% endfor %} |
- {{ application.submitter }} | -{{ application.creation_time }} | +{{ motion.submitter }} | +{{ motion.creation_time }} | {% if perms.projector.can_manage_projector %} - + {% endif %} - {% if perms.application.can_manage_application %} - + {% if perms.motion.can_manage_motion %} + {% if "delete" in useractions %} - + {% endif %} {% endif %} - + |