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/agenda/views.py b/openslides/agenda/views.py index deb3e69a6..57629e1e4 100644 --- a/openslides/agenda/views.py +++ b/openslides/agenda/views.py @@ -177,12 +177,12 @@ class ItemDelete(DeleteView): if self.get_answer() == 'all': self.object.delete(with_children=True) messages.success(request, - _("Item %s and his children were successfully deleted.") \ + _("Item %s and his children were successfully deleted.") % html_strong(self.object)) elif self.get_answer() == 'yes': self.object.delete(with_children=False) messages.success(request, - _("Item %s was successfully deleted.") \ + _("Item %s was successfully deleted.") % html_strong(self.object)) 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:109
-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:206
-#: application/templates/application/view.html:225
-#: 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
-#: poll/models.py:239
-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:300
-msgid "Votes"
-msgstr "Stimmen"
-
-#: application/templates/application/poll_view.html:31 assignment/views.py:454
-#: assignment/templates/assignment/poll_view.html:35
-#: assignment/templates/assignment/view.html:185
-#: 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:51
-#: application/templates/application/view.html:91
-msgid "New vote"
-msgstr "Neue Abstimmung"
-
-#: application/templates/application/view.html:67
-msgid "Edit Vote"
-msgstr "Abstimmung bearbeiten"
-
-#: application/templates/application/view.html:70
-msgid "Delete Vote"
-msgstr "Abstimmung löschen"
-
-#: application/templates/application/view.html:99
-msgid "Enter result"
-msgstr "Ergebnis eingeben"
-
-#: application/templates/application/view.html:116
-msgid "Withdraw"
-msgstr "Zurückziehen"
-
-#: application/templates/application/view.html:124
-msgid "Unsupport"
-msgstr "Nicht unterstützen"
-
-#: application/templates/application/view.html:130
-msgid "Support"
-msgstr "Unterstützen"
-
-#: application/templates/application/view.html:136
-msgid "minimum required supporters"
-msgstr "minimal erforderliche Unterstützer/innen"
-
-#: application/templates/application/view.html:143
-msgid "Manage motion"
-msgstr "Antrag Verwalten"
-
-#: application/templates/application/view.html:146
-msgid "Formal validation"
-msgstr "Formale Gültigkeitsprüfung"
-
-#: application/templates/application/view.html:148
-msgid "Publish"
-msgstr "Veröffentlichen"
-
-#: application/templates/application/view.html:151
-msgid "Permit"
-msgstr "Zulassen"
-
-#: application/templates/application/view.html:154
-msgid "Not permit (reject)"
-msgstr "Nicht zulassen (verwerfen)"
-
-#: application/templates/application/view.html:157
-msgid "Set Number"
-msgstr "Setze Nummer"
-
-#: application/templates/application/view.html:164
-msgid "Result after vote"
-msgstr "Ergebnis nach der Abstimmung"
-
-#: application/templates/application/view.html:178
-msgid "Result after debate"
-msgstr "Ergebnis nach der Debatte"
-
-#: application/templates/application/view.html:189
-msgid "Withdrawed by Submitter"
-msgstr "Zurückgezogen durch Antragsteller/in"
-
-#: application/templates/application/view.html:194
-msgid "For Administration only:"
-msgstr "Nur zur Administration:"
-
-#: application/templates/application/view.html:196
-msgid "Reset"
-msgstr "Zurücksetzen"
-
-#: application/templates/application/view.html:219
-msgid "This is not the newest version."
-msgstr "Dies ist nicht die neuste Version."
-
-#: application/templates/application/view.html:219
-#: application/templates/application/view.html:221
-msgid "Go to version"
-msgstr "Gehe zu Version"
-
-#: application/templates/application/view.html:221
-msgid "This is not the authorized version."
-msgstr "Dies ist nicht die zugelassene Version."
-
-#: application/templates/application/view.html:239
-msgid "Version History"
-msgstr "Versionshistorie"
-
-#: application/templates/application/view.html:245
-msgid "Time"
-msgstr "Zeit"
-
-#: application/templates/application/view.html:256
-msgid "Version authorized"
-msgstr "Version %d zugelassen"
-
-#: application/templates/application/view.html:259
-msgid "Permit Version"
-msgstr "Version zulassen"
-
-#: application/templates/application/view.html:262
-msgid "Reject Version"
-msgstr "Version verwerfen"
-
-#: application/templates/application/view.html:266
-msgid "Version rejected"
-msgstr "Version verworfen"
-
-#: application/templates/application/view.html:276
-#: application/templates/application/view.html:283
-#: application/templates/application/view.html:290
-msgid "unchanged"
-msgstr "unverändert"
-
-#: application/templates/application/view.html:299
-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:57 assignment/views.py:383
#: assignment/templates/assignment/view.html:13
#: assignment/templates/projector/Assignment.html:21
@@ -1195,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)"
@@ -1246,6 +393,11 @@ msgstr "Beschreibung"
msgid "Comment on the ballot paper"
msgstr "Kommentar für den Stimmzettel"
+#: 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."
@@ -1270,28 +422,36 @@ msgstr "%s möchte nicht kandidieren."
msgid "%s is no candidate"
msgstr "%s ist kein/e Kandidat/in"
-#: assignment/models.py:250
+#: assignment/models.py:253
msgid "Can see assignment"
msgstr "Darf Wahlen sehen"
-#: assignment/models.py:252
+#: assignment/models.py:255
msgid "Can nominate another person"
msgstr "Darf andere Personen für Wahlen vorschlagen"
-#: assignment/models.py:253
+#: assignment/models.py:256
msgid "Can nominate themselves"
msgstr "Darf selbst für Wahlen kandidieren"
-#: assignment/models.py:254
+#: assignment/models.py:257
msgid "Can manage assignment"
msgstr "Darf Wahlen verwalten"
-#: assignment/models.py:317
+#: 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:326 assignment/views.py:340 assignment/views.py:663
+#: 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
@@ -1311,6 +471,12 @@ msgstr "Neue Wahl wurde erfolgreich angelegt."
msgid "Election was successfully modified."
msgstr "Wahl wurde erfolgreich geändert."
+#: 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."
@@ -1329,8 +495,9 @@ msgstr "Sie haben Ihre Kandidatur erfolgreich gesetzt."
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."
+msgstr ""
+"Sie haben Ihre Kandidatur erfolgreich zurückgezogen. Sie können nun von "
+"anderen Teilnehmer/innen nicht mehr vorgeschlagen werden."
#: assignment/views.py:218
#, python-format
@@ -1338,6 +505,7 @@ msgid "Candidate %s was withdrawn successfully."
msgstr "Die Kandidatur von %s wurde erfolgreich zurückgezogen."
#: assignment/views.py:220
+#, python-format
msgid "%s was unblocked successfully."
msgstr "%s wurde erfolgreich freigegeben."
@@ -1347,6 +515,7 @@ msgid "Do you really want to withdraw %s from the election?"
msgstr "Soll %s wirklich von der Wahl zurückgezogen werden?"
#: 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?"
@@ -1403,6 +572,11 @@ msgstr "Wahlen: %s"
msgid "Candidates"
msgstr "Kandidaten/innen"
+#: 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
@@ -1428,6 +602,24 @@ msgstr ""
"N: %(NO)s\n"
"E: %(ABSTAIN)s"
+#: 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
@@ -1453,6 +645,13 @@ msgstr[1] "%d Kandidaten/innen"
msgid "%d available posts"
msgstr "%d verfügbare Posten"
+#: 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."
@@ -1500,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"
@@ -1519,6 +735,27 @@ 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"
@@ -1577,6 +814,13 @@ msgstr "Kandidat/in ist gewählt"
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"
@@ -1705,7 +1679,7 @@ msgstr "Erscheint nur im PDF der Erst-Passwörter"
#: participant/forms.py:118
msgid "Sort users by first name"
-msgstr ""
+msgstr "Sortiere Teilnehmer beim Vornamen"
#: participant/models.py:29 participant/templates/participant/overview.html:25
msgid "Male"
@@ -1733,8 +1707,8 @@ msgstr "Gast"
#: 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:42
msgid "Will be shown behind the name."
@@ -1752,7 +1726,7 @@ msgstr "Nur zum Filtern der Benutzerliste."
msgid "Typ"
msgstr "Typ"
-#: participant/models.py:50 participant/views.py:219
+#: participant/models.py:50 participant/views.py:217
#: participant/templates/participant/overview.html:45
#: participant/templates/participant/overview.html:70
msgid "Committee"
@@ -1766,86 +1740,86 @@ msgstr "Nur für Notizen."
msgid "Default password"
msgstr "Vorgegebenes Passwort"
-#: participant/models.py:99
+#: participant/models.py:102
msgid "Can see participant"
msgstr "Darf die Teilnehmer/inen sehen"
-#: participant/models.py:101
+#: participant/models.py:104
msgid "Can manage participant"
msgstr "Darf die Teilnehmer/inen verwalten"
-#: participant/views.py:214
+#: participant/views.py:212
msgid "Participant-list"
msgstr "Teilnehmerliste"
-#: participant/views.py:215
+#: participant/views.py:213
msgid "List of Participants"
msgstr "Teilnehmerliste"
-#: participant/views.py:218 participant/templates/participant/overview.html:67
+#: participant/views.py:216 participant/templates/participant/overview.html:67
msgid "Last Name"
msgstr "Nachname"
-#: participant/views.py:218 participant/templates/participant/overview.html:66
+#: participant/views.py:216 participant/templates/participant/overview.html:66
msgid "First Name"
msgstr "Vorname"
-#: participant/views.py:218
+#: participant/views.py:216
msgid "Group"
msgstr "Gruppe"
-#: participant/views.py:218 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:247
+#: participant/views.py:245
msgid "Participant-passwords"
msgstr "Teilnehmer-Passwoerter"
-#: participant/views.py:269
+#: participant/views.py:263
msgid "Account for OpenSlides"
msgstr "Zugang für OpenSlides"
-#: participant/views.py:271
+#: participant/views.py:265
#, python-format
msgid "for %s"
msgstr "für %s"
-#: participant/views.py:274
+#: participant/views.py:268
#, python-format
msgid "User: %s"
msgstr "Nutzername: %s"
-#: participant/views.py:278
+#: participant/views.py:272
#, python-format
msgid "Password: %s"
msgstr "Passwort: %s"
-#: participant/views.py:283
+#: participant/views.py:277
#, python-format
msgid "URL: %s"
msgstr "URL: %s"
-#: participant/views.py:368
+#: participant/views.py:319
#, python-format
msgid "%d new participants were successfully imported."
msgstr "%d neue Teilnehmer/innen wurden erfolgreich importiert."
-#: participant/views.py:379
+#: participant/views.py:330
msgid "Do you really want to reset the password?"
msgstr "Soll das Passwort wirklich zurückgesetzt werden?"
-#: participant/views.py:395
+#: 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:477
+#: participant/views.py:428
msgid "Participants settings successfully saved."
msgstr "Teilnehmer/innen-Einstellungen wurden erfolgreich gespeichert."
-#: participant/views.py:487
+#: participant/views.py:438
#, python-format
msgid ""
"Installation was successfully! Use %(user)s (password: %(password)s) for "
@@ -1858,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:510
+#: participant/views.py:461
msgid "User settings successfully saved."
msgstr "Nutzereinstellungen wurden erfolgreich gespeichert."
-#: participant/views.py:532
+#: participant/views.py:483
msgid "Password successfully changed."
msgstr "Password wurde erfolgreich geändert."
-#: participant/views.py:550
+#: participant/views.py:501
#: participant/templates/participant/base_participant.html:12
#: participant/templates/participant/overview.html:7
#: participant/templates/participant/overview.html:18
@@ -2060,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"
@@ -2101,6 +2075,7 @@ msgid "Projector view"
msgstr "Projektor-Ansicht"
#: projector/templates/projector/control_countdown.html:6
+msgctxt "seconds"
msgid "s"
msgstr "s"
@@ -2187,16 +2162,16 @@ msgstr "Abmelden"
msgid "You have access to the following pages:"
msgstr "Sie haben Zugriff auf folgende Seiten:"
-#: utils/pdf.py:224
+#: utils/pdf.py:225
msgid "%Y-%m-%d %H:%Mh"
msgstr "%d.%m.%Y %H:%Mh"
-#: utils/pdf.py:225
+#: utils/pdf.py:226
#, python-format
msgid "Printed: %s"
msgstr "Gedruckt am: %s"
-#: utils/pdf.py:236 utils/pdf.py:245
+#: utils/pdf.py:237 utils/pdf.py:246
#, python-format
msgid "Page %s"
msgstr "Seite %s"
@@ -2241,6 +2216,27 @@ msgstr "undefinierter-dateiname"
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?"
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 73%
rename from openslides/application/models.py
rename to openslides/motion/models.py
index bac0f47f0..71a6aa80f 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,35 +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):
try:
- return self.applicationsupporter_set.filter(person=person).exists()
+ 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
@@ -197,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
@@ -229,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):
@@ -245,7 +245,7 @@ class Application(models.Model, SlideMixin):
def reset(self, user):
"""
- Reset the application.
+ Reset the motion.
"""
self.status = "pub"
self.permitted = None
@@ -254,43 +254,39 @@ 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.')
- if self.permitted is not None:
- # TODO: Use own Exception
- raise NameError('This application is already permitted.')
+ raise NameError('Supporter can not be the submitter of a '
+ 'motion.')
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.')
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:
self.writelog(_("Supporter: -%s") % (person))
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
@@ -301,7 +297,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
@@ -314,7 +310,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
@@ -327,10 +323,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
@@ -364,25 +360,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)):
@@ -391,22 +387,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":
@@ -430,17 +426,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:
@@ -461,7 +457,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:
@@ -476,9 +472,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)
@@ -486,7 +482,7 @@ class Application(models.Model, SlideMixin):
@property
def polls(self):
- return self.applicationpoll_set.all()
+ return self.motionpoll_set.all()
@property
def results(self):
@@ -510,19 +506,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:
@@ -532,10 +528,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',)
@@ -546,7 +542,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)
@@ -557,31 +553,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
@@ -592,20 +588,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.count_supporters }} | +{{ 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 %} - + |