From c8948ddaeaacc318bb37f70c35471404e1d94571 Mon Sep 17 00:00:00 2001
From: mpeltriaux <Michel.Peltriaux@sgdnord.rlp.de>
Date: Mon, 19 Aug 2024 09:39:58 +0200
Subject: [PATCH] # Censor payments

* censor payments if entry is not shared with user
* updates translations
---
 .../detail/includes/payments.html             |  12 +-
 locale/de/LC_MESSAGES/django.po               | 115 ++++++++++--------
 2 files changed, 71 insertions(+), 56 deletions(-)

diff --git a/intervention/templates/intervention/detail/includes/payments.html b/intervention/templates/intervention/detail/includes/payments.html
index 5dde0098..74cdcb8b 100644
--- a/intervention/templates/intervention/detail/includes/payments.html
+++ b/intervention/templates/intervention/detail/includes/payments.html
@@ -46,12 +46,20 @@
             {% for pay in obj.payments.all %}
             <tr>
                 <td class="align-middle">
-                    {{ pay.amount|floatformat:2 }} €
+                    {% if has_access %}
+                        {{ pay.amount|floatformat:2 }} €
+                    {% else %}
+                        ***
+                    {% endif %}
                 </td>
                 <td class="align-middle">{{ pay.due_on|default_if_none:"---" }}</td>
                 <td class="align-middle">
                     <div class="scroll-150">
-                        {{ pay.comment }}
+                        {% if has_access %}
+                            {{ pay.comment }}
+                        {% else %}
+                            {% trans 'This data is not shared with you' %}
+                        {% endif %}
                     </div>
                 </td>
                 <td class="align-middle float-right">
diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po
index 11b46229..9e02af87 100644
--- a/locale/de/LC_MESSAGES/django.po
+++ b/locale/de/LC_MESSAGES/django.po
@@ -43,7 +43,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-02-16 09:49+0100\n"
+"POT-Creation-Date: 2024-08-19 09:38+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"
@@ -259,7 +259,7 @@ msgstr ""
 
 #: analysis/templates/analysis/reports/includes/eco_account/deductions.html:14
 #: analysis/templates/analysis/reports/includes/eco_account/deductions.html:16
-#: compensation/forms/modals/state.py:58
+#: compensation/forms/modals/state.py:59
 #: compensation/templates/compensation/detail/compensation/includes/states-after.html:36
 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:36
 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36
@@ -447,7 +447,7 @@ msgid "Select the intervention for which this compensation compensates"
 msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
 
 #: compensation/forms/compensation.py:114
-#: compensation/views/compensation/compensation.py:119
+#: compensation/views/compensation/compensation.py:120
 msgid "New compensation"
 msgstr "Neue Kompensation"
 
@@ -474,7 +474,7 @@ msgid "When did the parties agree on this?"
 msgstr "Wann wurde dieses Ökokonto offiziell vereinbart?"
 
 #: compensation/forms/eco_account.py:72
-#: compensation/views/eco_account/eco_account.py:100
+#: compensation/views/eco_account/eco_account.py:101
 msgid "New Eco-Account"
 msgstr "Neues Ökokonto"
 
@@ -696,46 +696,46 @@ msgid "If there is no date you can enter, please explain why."
 msgstr "Falls Sie kein Datum angeben können, erklären Sie bitte weshalb."
 
 #: compensation/forms/modals/payment.py:108
-#: intervention/templates/intervention/detail/includes/payments.html:59
+#: intervention/templates/intervention/detail/includes/payments.html:67
 msgid "Edit payment"
 msgstr "Zahlung bearbeiten"
 
-#: compensation/forms/modals/state.py:32
+#: compensation/forms/modals/state.py:33
 msgid "Biotope Type"
 msgstr "Biotoptyp"
 
-#: compensation/forms/modals/state.py:35
+#: compensation/forms/modals/state.py:36
 msgid "Select the biotope type"
 msgstr "Biotoptyp wählen"
 
-#: compensation/forms/modals/state.py:39 compensation/forms/modals/state.py:51
+#: compensation/forms/modals/state.py:40 compensation/forms/modals/state.py:52
 msgid "Biotope additional type"
 msgstr "Zusatzbezeichnung"
 
-#: compensation/forms/modals/state.py:42
+#: compensation/forms/modals/state.py:43
 msgid "Select an additional biotope type"
 msgstr "Zusatzbezeichnung wählen"
 
-#: compensation/forms/modals/state.py:61
+#: compensation/forms/modals/state.py:62
 #: intervention/forms/modals/deduction.py:49
 msgid "in m²"
 msgstr ""
 
-#: compensation/forms/modals/state.py:72
+#: compensation/forms/modals/state.py:73
 #: compensation/tests/compensation/unit/test_forms.py:175
 msgid "New state"
 msgstr "Neuer Zustand"
 
-#: compensation/forms/modals/state.py:73
+#: compensation/forms/modals/state.py:74
 #: compensation/tests/compensation/unit/test_forms.py:176
 msgid "Insert data for the new state"
 msgstr "Geben Sie die Daten des neuen Zustandes ein"
 
-#: compensation/forms/modals/state.py:90 konova/forms/modals/base_form.py:32
+#: compensation/forms/modals/state.py:91 konova/forms/modals/base_form.py:32
 msgid "Object removed"
 msgstr "Objekt entfernt"
 
-#: compensation/forms/modals/state.py:145
+#: compensation/forms/modals/state.py:146
 #: compensation/templates/compensation/detail/compensation/includes/states-after.html:62
 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:62
 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:62
@@ -1287,44 +1287,44 @@ msgstr ""
 msgid "Responsible data"
 msgstr "Daten zu den verantwortlichen Stellen"
 
-#: compensation/views/compensation/compensation.py:57
+#: compensation/views/compensation/compensation.py:58
 msgid "Compensations - Overview"
 msgstr "Kompensationen - Übersicht"
 
-#: compensation/views/compensation/compensation.py:180
+#: compensation/views/compensation/compensation.py:181
 #: konova/utils/message_templates.py:40
 msgid "Compensation {} edited"
 msgstr "Kompensation {} bearbeitet"
 
-#: compensation/views/compensation/compensation.py:195
-#: compensation/views/eco_account/eco_account.py:172 ema/views/ema.py:230
-#: intervention/views/intervention.py:251
+#: compensation/views/compensation/compensation.py:196
+#: compensation/views/eco_account/eco_account.py:173 ema/views/ema.py:232
+#: intervention/views/intervention.py:253
 msgid "Edit {}"
 msgstr "Bearbeite {}"
 
 #: compensation/views/compensation/report.py:34
 #: compensation/views/eco_account/report.py:34 ema/views/report.py:34
-#: intervention/views/report.py:37
+#: intervention/views/report.py:35
 msgid "Report {}"
 msgstr "Bericht {}"
 
-#: compensation/views/eco_account/eco_account.py:52
+#: compensation/views/eco_account/eco_account.py:53
 msgid "Eco-account - Overview"
 msgstr "Ökokonten - Übersicht"
 
-#: compensation/views/eco_account/eco_account.py:85
+#: compensation/views/eco_account/eco_account.py:86
 msgid "Eco-Account {} added"
 msgstr "Ökokonto {} hinzugefügt"
 
-#: compensation/views/eco_account/eco_account.py:157
+#: compensation/views/eco_account/eco_account.py:158
 msgid "Eco-Account {} edited"
 msgstr "Ökokonto {} bearbeitet"
 
-#: compensation/views/eco_account/eco_account.py:286
+#: compensation/views/eco_account/eco_account.py:288
 msgid "Eco-account removed"
 msgstr "Ökokonto entfernt"
 
-#: ema/forms.py:42 ema/tests/unit/test_forms.py:27 ema/views/ema.py:101
+#: ema/forms.py:42 ema/tests/unit/test_forms.py:27 ema/views/ema.py:102
 msgid "New EMA"
 msgstr "Neue EMA hinzufügen"
 
@@ -1352,19 +1352,19 @@ msgstr ""
 msgid "Payment funded compensation"
 msgstr "Ersatzzahlungsmaßnahme"
 
-#: ema/views/ema.py:52
+#: ema/views/ema.py:53
 msgid "EMAs - Overview"
 msgstr "EMAs - Übersicht"
 
-#: ema/views/ema.py:85
+#: ema/views/ema.py:86
 msgid "EMA {} added"
 msgstr "EMA {} hinzugefügt"
 
-#: ema/views/ema.py:215
+#: ema/views/ema.py:217
 msgid "EMA {} edited"
 msgstr "EMA {} bearbeitet"
 
-#: ema/views/ema.py:254
+#: ema/views/ema.py:256
 msgid "EMA removed"
 msgstr "EMA entfernt"
 
@@ -1428,7 +1428,7 @@ msgstr "Datum Bestandskraft bzw. Rechtskraft"
 
 #: intervention/forms/intervention.py:216
 #: intervention/tests/unit/test_forms.py:36
-#: intervention/views/intervention.py:104
+#: intervention/views/intervention.py:105
 msgid "New intervention"
 msgstr "Neuer Eingriff"
 
@@ -1597,7 +1597,12 @@ msgctxt "money"
 msgid "Amount"
 msgstr "Betrag"
 
-#: intervention/templates/intervention/detail/includes/payments.html:62
+#: intervention/templates/intervention/detail/includes/payments.html:61
+#: konova/utils/message_templates.py:25
+msgid "This data is not shared with you"
+msgstr "Diese Daten sind für Sie nicht freigegeben"
+
+#: intervention/templates/intervention/detail/includes/payments.html:70
 msgid "Remove payment"
 msgstr "Zahlung entfernen"
 
@@ -1659,19 +1664,19 @@ msgstr ""
 msgid "Check performed"
 msgstr "Prüfung durchgeführt"
 
-#: intervention/views/intervention.py:56
+#: intervention/views/intervention.py:57
 msgid "Interventions - Overview"
 msgstr "Eingriffe - Übersicht"
 
-#: intervention/views/intervention.py:89
+#: intervention/views/intervention.py:90
 msgid "Intervention {} added"
 msgstr "Eingriff {} hinzugefügt"
 
-#: intervention/views/intervention.py:234
+#: intervention/views/intervention.py:236
 msgid "Intervention {} edited"
 msgstr "Eingriff {} bearbeitet"
 
-#: intervention/views/intervention.py:276
+#: intervention/views/intervention.py:278
 msgid "{} removed"
 msgstr "{} entfernt"
 
@@ -1911,11 +1916,11 @@ msgstr "Kontrolle am"
 msgid "Other"
 msgstr "Sonstige"
 
-#: konova/sub_settings/django_settings.py:166
+#: konova/sub_settings/django_settings.py:157
 msgid "German"
 msgstr ""
 
-#: konova/sub_settings/django_settings.py:167
+#: konova/sub_settings/django_settings.py:158
 msgid "English"
 msgstr ""
 
@@ -2091,10 +2096,6 @@ msgstr ""
 "Eintrag ist verzeichnet. Um Daten zu bearbeiten, muss der Eintrag erst "
 "entzeichnet werden."
 
-#: konova/utils/message_templates.py:25
-msgid "This data is not shared with you"
-msgstr "Diese Daten sind für Sie nicht freigegeben"
-
 #: konova/utils/message_templates.py:26
 msgid ""
 "Remember: This data has not been shared with you, yet. This means you can "
@@ -2817,11 +2818,17 @@ msgstr "Mehr"
 msgid "Reports"
 msgstr "Berichte"
 
-#: templates/navbars/navbar.html:56 user/templates/user/index.html:31
+#: templates/navbars/navbar.html:57
+#, fuzzy
+#| msgid "Admins"
+msgid "Admin"
+msgstr "Administratoren"
+
+#: templates/navbars/navbar.html:59 user/templates/user/index.html:31
 msgid "Settings"
 msgstr "Einstellungen"
 
-#: templates/navbars/navbar.html:57
+#: templates/navbars/navbar.html:60
 msgid "Logout"
 msgstr "Abmelden"
 
@@ -3032,7 +3039,7 @@ msgid "Manage teams"
 msgstr ""
 
 #: user/templates/user/index.html:53 user/templates/user/team/index.html:19
-#: user/views.py:171
+#: user/views/views.py:171
 msgid "Teams"
 msgstr ""
 
@@ -3084,43 +3091,43 @@ msgstr "Token noch nicht freigeschaltet"
 msgid "Valid until"
 msgstr "Läuft ab am"
 
-#: user/views.py:35
+#: user/views/views.py:35
 msgid "User settings"
 msgstr "Einstellungen"
 
-#: user/views.py:61
+#: user/views/views.py:61
 msgid "Notifications edited"
 msgstr "Benachrichtigungen bearbeitet"
 
-#: user/views.py:73
+#: user/views/views.py:73
 msgid "User notifications"
 msgstr "Benachrichtigungen"
 
-#: user/views.py:96
+#: user/views/views.py:96
 msgid "New token generated. Administrators need to validate."
 msgstr "Neuer Token generiert. Administratoren sind informiert."
 
-#: user/views.py:107
+#: user/views/views.py:107
 msgid "User API token"
 msgstr "API Nutzer Token"
 
-#: user/views.py:183
+#: user/views/views.py:183
 msgid "New team added"
 msgstr "Neues Team hinzugefügt"
 
-#: user/views.py:198
+#: user/views/views.py:198
 msgid "Team edited"
 msgstr "Team bearbeitet"
 
-#: user/views.py:213
+#: user/views/views.py:213
 msgid "Team removed"
 msgstr "Team gelöscht"
 
-#: user/views.py:228
+#: user/views/views.py:228
 msgid "You are not a member of this team"
 msgstr "Sie sind kein Mitglied dieses Teams"
 
-#: user/views.py:235
+#: user/views/views.py:235
 msgid "Left Team"
 msgstr "Team verlassen"