Compensation action

* adds compensation action to compensation detail view
* adds adding/removing logic for compensation action
* adds bootstrap style to select fields in forms
* refactors UnitEnum into UnitChoices using models.TextChoices (Django 3.x)
* adds translations
This commit is contained in:
mipel
2021-08-04 10:44:02 +02:00
parent d773c3b3d4
commit f666c3afa3
8 changed files with 333 additions and 70 deletions

Binary file not shown.

View File

@@ -4,17 +4,17 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#: compensation/forms.py:34 compensation/forms.py:39 compensation/forms.py:52
#: compensation/forms.py:177 intervention/filters.py:26
#: intervention/filters.py:40 intervention/filters.py:47
#: intervention/filters.py:48 konova/forms.py:84 konova/forms.py:213
#: konova/forms.py:244 konova/forms.py:249 konova/forms.py:261
#: konova/forms.py:272 konova/forms.py:285 user/forms.py:38
#: compensation/forms.py:182 compensation/forms.py:241
#: intervention/filters.py:26 intervention/filters.py:40
#: intervention/filters.py:47 intervention/filters.py:48 konova/forms.py:91
#: konova/forms.py:220 konova/forms.py:251 konova/forms.py:256
#: konova/forms.py:268 konova/forms.py:279 konova/forms.py:292 user/forms.py:38
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-08-03 17:21+0200\n"
"POT-Creation-Date: 2021-08-04 10:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,7 +24,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: compensation/forms.py:33
#: compensation/forms.py:33 compensation/forms.py:233
#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:33
msgid "Amount"
msgstr "Menge"
@@ -84,7 +84,7 @@ msgstr "Neuer Zustand"
msgid "Insert data for the new state"
msgstr "Geben Sie die Daten des neuen Zustandes ein"
#: compensation/forms.py:113 konova/forms.py:134
#: compensation/forms.py:113 konova/forms.py:141
msgid "Object removed"
msgstr "Objekt entfernt"
@@ -92,39 +92,88 @@ msgstr "Objekt entfernt"
msgid "Deadline Type"
msgstr "Fristart"
#: compensation/forms.py:158
#: compensation/forms.py:158 compensation/forms.py:218
msgid "Select the deadline type"
msgstr "Fristart wählen"
#: compensation/forms.py:162
#: compensation/forms.py:167
#: compensation/templates/compensation/detail/includes/deadlines.html:31
msgid "Date"
msgstr "Datum"
#: compensation/forms.py:165
#: compensation/forms.py:170
msgid "Select date"
msgstr "Datum wählen"
#: compensation/forms.py:176
#: compensation/forms.py:181 compensation/forms.py:240
#: compensation/templates/compensation/detail/includes/deadlines.html:34
#: compensation/templates/compensation/detail/includes/documents.html:31
#: intervention/templates/intervention/detail/includes/documents.html:31
#: konova/forms.py:271
#: konova/forms.py:278
msgid "Comment"
msgstr "Kommentar"
#: compensation/forms.py:178
#: compensation/forms.py:183 compensation/forms.py:242
msgid "Additional comment"
msgstr "Zusätzlicher Kommentar"
#: compensation/forms.py:189
#: compensation/forms.py:194
msgid "New deadline"
msgstr "Neue Frist"
#: compensation/forms.py:190
#: compensation/forms.py:195
msgid "Insert data for the new deadline"
msgstr "Geben Sie die Daten der neuen Frist ein"
#: compensation/forms.py:215
msgid "Action Type"
msgstr "Maßnahmentyp"
#: compensation/forms.py:221
#: compensation/templates/compensation/detail/includes/actions.html:34
msgid "Unit"
msgstr "Einheit"
#: compensation/forms.py:224
msgid "Select the unit"
msgstr "Einheit wählen"
#: compensation/forms.py:236
msgid "Insert the amount"
msgstr "Menge eingeben"
#: compensation/forms.py:253
msgid "New action"
msgstr "Neue Maßnahme"
#: compensation/forms.py:254
msgid "Insert data for the new action"
msgstr "Geben Sie die Daten der neuen Maßnahme ein"
#: compensation/models.py:71
msgid "cm"
msgstr ""
#: compensation/models.py:72
msgid "m"
msgstr ""
#: compensation/models.py:73
msgid "km"
msgstr ""
#: compensation/models.py:74
msgid "m²"
msgstr ""
#: compensation/models.py:75
msgid "ha"
msgstr ""
#: compensation/models.py:76
msgid "Pieces"
msgstr "Stück"
#: compensation/tables.py:24 compensation/tables.py:164
#: intervention/forms.py:28 intervention/tables.py:23
#: intervention/templates/intervention/detail/includes/compensations.html:30
@@ -137,7 +186,7 @@ msgstr "Kennung"
#: intervention/forms.py:35 intervention/tables.py:28
#: intervention/templates/intervention/detail/includes/compensations.html:33
#: intervention/templates/intervention/detail/includes/documents.html:28
#: intervention/templates/intervention/detail/view.html:64 konova/forms.py:243
#: intervention/templates/intervention/detail/view.html:64 konova/forms.py:250
msgid "Title"
msgstr "Bezeichnung"
@@ -206,7 +255,7 @@ msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden"
msgid "Access not granted"
msgstr "Nicht freigegeben - Datensatz nur lesbar"
#: compensation/tables.py:174 konova/forms.py:248
#: compensation/tables.py:174 konova/forms.py:255
msgid "Created on"
msgstr "Erstellt"
@@ -226,6 +275,40 @@ msgstr "Bearbeite {}"
msgid "Delete {}"
msgstr "Lösche {}"
#: compensation/templates/compensation/detail/includes/actions.html:8
msgctxt "Compensation"
msgid "Actions"
msgstr "Maßnahmen"
#: compensation/templates/compensation/detail/includes/actions.html:14
msgid "Add new action"
msgstr "Neue Maßnahme hinzufügen"
#: compensation/templates/compensation/detail/includes/actions.html:28
msgid "Action type"
msgstr "Maßnahmentyp"
#: compensation/templates/compensation/detail/includes/actions.html:31
msgctxt "Compensation"
msgid "Amount"
msgstr "Menge"
#: compensation/templates/compensation/detail/includes/actions.html:37
#: compensation/templates/compensation/detail/includes/deadlines.html:37
#: compensation/templates/compensation/detail/includes/documents.html:34
#: compensation/templates/compensation/detail/includes/states-after.html:39
#: compensation/templates/compensation/detail/includes/states-before.html:39
#: intervention/templates/intervention/detail/includes/compensations.html:36
#: intervention/templates/intervention/detail/includes/documents.html:34
#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36
#: intervention/templates/intervention/detail/includes/payments.html:37
msgid "Action"
msgstr "Aktionen"
#: compensation/templates/compensation/detail/includes/actions.html:51
msgid "Remove action"
msgstr "Maßnahme entfernen"
#: compensation/templates/compensation/detail/includes/deadlines.html:8
msgid "Deadlines"
msgstr "Termine und Fristen"
@@ -239,17 +322,6 @@ msgstr "Neue Frist hinzufügen"
msgid "Type"
msgstr "Typ"
#: compensation/templates/compensation/detail/includes/deadlines.html:37
#: compensation/templates/compensation/detail/includes/documents.html:34
#: compensation/templates/compensation/detail/includes/states-after.html:39
#: compensation/templates/compensation/detail/includes/states-before.html:39
#: intervention/templates/intervention/detail/includes/compensations.html:36
#: intervention/templates/intervention/detail/includes/documents.html:34
#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36
#: intervention/templates/intervention/detail/includes/payments.html:37
msgid "Action"
msgstr "Aktionen"
#: compensation/templates/compensation/detail/includes/deadlines.html:51
msgid "Remove deadline"
msgstr "Frist löschen"
@@ -261,7 +333,7 @@ msgstr "Dokumente"
#: compensation/templates/compensation/detail/includes/documents.html:14
#: intervention/templates/intervention/detail/includes/documents.html:14
#: konova/forms.py:284
#: konova/forms.py:291
msgid "Add new document"
msgstr "Neues Dokument hinzufügen"
@@ -384,13 +456,21 @@ msgid "State added"
msgstr "Zustand hinzugefügt"
#: compensation/views.py:318
msgid "Action added"
msgstr "Maßnahme hinzugefügt"
#: compensation/views.py:337
msgid "Deadline added"
msgstr "Frist hinzugefügt"
#: compensation/views.py:328
#: compensation/views.py:356
msgid "State removed"
msgstr "Zustand gelöscht"
#: compensation/views.py:375
msgid "Action removed"
msgstr "Maßnahme entfernt"
#: intervention/filters.py:25
msgid "Show unshared"
msgstr "Nicht freigegebene anzeigen"
@@ -648,40 +728,40 @@ msgstr ""
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/forms.py:57
#: konova/forms.py:64
msgid "Not editable"
msgstr "Nicht editierbar"
#: konova/forms.py:83 konova/forms.py:212
#: konova/forms.py:90 konova/forms.py:219
msgid "Confirm"
msgstr "Bestätige"
#: konova/forms.py:95 konova/forms.py:221
#: konova/forms.py:102 konova/forms.py:228
msgid "Remove"
msgstr "Löschen"
#: konova/forms.py:97
#: konova/forms.py:104
msgid "You are about to remove {} {}"
msgstr "Sie sind dabei {} {} zu löschen"
#: konova/forms.py:222
#: konova/forms.py:229
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
#: konova/forms.py:250
#: konova/forms.py:257
msgid "When has this file been created? Important for photos."
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?"
#: konova/forms.py:260
#: konova/forms.py:267
#: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
msgid "File"
msgstr "Datei"
#: konova/forms.py:262
#: konova/forms.py:269
msgid "Must be smaller than 15 Mb"
msgstr "Muss kleiner als 15 Mb sein"
#: konova/forms.py:273
#: konova/forms.py:280
msgid "Additional comment on this file"
msgstr "Zusätzlicher Kommentar"
@@ -897,7 +977,7 @@ msgstr "Abbrechen"
msgid "Save"
msgstr "Speichern"
#: templates/table/generic_table_form_body.html:20
#: templates/table/generic_table_form_body.html:21
msgid "Fields with * are required."
msgstr "* sind Pflichtfelder."
@@ -2247,9 +2327,6 @@ msgstr ""
#~ msgid "Withdraw from eco-account"
#~ msgstr "Von Konto abbuchen"
#~ msgid "Show actions"
#~ msgstr "Zeige Maßnahmen"
#~ msgid "You are currently working as "
#~ msgstr "Sie arbeiten gerade als "