Compare commits

..

No commits in common. "b790921e42e222ffb490aebd8f0f49d03bab575f" and "528f2145a45f10f7f275244c7354252258420f87" have entirely different histories.

15 changed files with 120 additions and 186 deletions

View File

@ -5,15 +5,17 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 01.12.20
"""
from konova.utils.message_templates import DATA_IS_UNCHECKED, DATA_CHECKED_ON_TEMPLATE, DATA_CHECKED_PREVIOUSLY_TEMPLATE
from user.models import User
from django.http import HttpRequest
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.html import format_html
from django.utils.timezone import localtime
from django.utils.translation import gettext_lazy as _
from compensation.filters import CompensationTableFilter, EcoAccountTableFilter
from compensation.models import Compensation, EcoAccount
from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT
from konova.utils.tables import BaseTable, TableRenderMixin
import django_tables2 as tables
@ -109,21 +111,16 @@ class CompensationTable(BaseTable, TableRenderMixin):
"""
html = ""
checked = value is not None
tooltip = DATA_IS_UNCHECKED
previously_checked = record.intervention.get_last_checked_action()
tooltip = _("Not checked yet")
if checked:
checked_on = value.get_timestamp_str_formatted()
tooltip = DATA_CHECKED_ON_TEMPLATE.format(checked_on, record.intervention.checked.user)
value = value.timestamp
value = localtime(value)
checked_on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Checked on {} by {}").format(checked_on, record.intervention.checked.user)
html += self.render_checked_star(
tooltip=tooltip,
icn_filled=checked,
)
if previously_checked and not checked:
checked_on = previously_checked.get_timestamp_str_formatted()
tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(checked_on, previously_checked.user)
html += self.render_previously_checked_star(
tooltip=tooltip,
)
return format_html(html)
def render_d(self, value, record: Compensation):
@ -162,7 +159,9 @@ class CompensationTable(BaseTable, TableRenderMixin):
recorded = value is not None
tooltip = _("Not recorded yet")
if recorded:
on = value.get_timestamp_str_formatted()
value = value.timestamp
value = localtime(value)
on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Recorded on {} by {}").format(on, record.intervention.recorded.user)
html += self.render_bookmark(
tooltip=tooltip,
@ -180,6 +179,8 @@ class CompensationTable(BaseTable, TableRenderMixin):
Returns:
"""
if value is None:
value = User.objects.none()
has_access = record.is_shared_with(self.user)
html = self.render_icn(
@ -317,7 +318,9 @@ class EcoAccountTable(BaseTable, TableRenderMixin):
checked = value is not None
tooltip = _("Not recorded yet. Can not be used for deductions, yet.")
if checked:
on = value.get_timestamp_str_formatted()
value = value.timestamp
value = localtime(value)
on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Recorded on {} by {}").format(on, record.recorded.user)
html += self.render_bookmark(
tooltip=tooltip,

View File

@ -66,11 +66,6 @@
<span>
{% fa5_icon 'star' 'far' %}
</span>
{% if last_checked %}
<span class="rlp-gd-inv" title="{{last_checked_tooltip}}">
{% fa5_icon 'star' 'fas' %}
</span>
{% endif %}
{% else %}
<span class="check-star" title="{% trans 'Checked on '%} {{obj.intervention.checked.timestamp}} {% trans 'by' %} {{obj.intervention.checked.user}}">
{% fa5_icon 'star' %}

View File

@ -23,7 +23,7 @@ from konova.utils.message_templates import FORM_INVALID, IDENTIFIER_REPLACED, DA
CHECKED_RECORDED_RESET, COMPENSATION_ADDED_TEMPLATE, COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, \
COMPENSATION_STATE_REMOVED, COMPENSATION_STATE_ADDED, COMPENSATION_ACTION_REMOVED, COMPENSATION_ACTION_ADDED, \
DEADLINE_ADDED, DEADLINE_REMOVED, DOCUMENT_EDITED, COMPENSATION_STATE_EDITED, COMPENSATION_ACTION_EDITED, \
DEADLINE_EDITED, RECORDED_BLOCKS_EDIT, PARAMS_INVALID, DATA_CHECKED_PREVIOUSLY_TEMPLATE
DEADLINE_EDITED, RECORDED_BLOCKS_EDIT, PARAMS_INVALID
from konova.utils.user_checks import in_group
@ -217,15 +217,8 @@ def detail_view(request: HttpRequest, id: str):
request = comp.set_status_messages(request)
last_checked = comp.intervention.get_last_checked_action()
last_checked_tooltip = ""
if last_checked:
last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(last_checked.get_timestamp_str_formatted(), last_checked.user)
context = {
"obj": comp,
"last_checked": last_checked,
"last_checked_tooltip": last_checked_tooltip,
"geom_form": geom_form,
"parcels": parcels,
"has_access": is_data_shared,

View File

@ -115,6 +115,7 @@ class EmaTable(BaseTable, TableRenderMixin):
)
return html
def render_r(self, value, record: Ema):
""" Renders the registered column for a EMA
@ -129,7 +130,9 @@ class EmaTable(BaseTable, TableRenderMixin):
recorded = value is not None
tooltip = _("Not recorded yet")
if recorded:
on = value.get_timestamp_str_formatted()
value = value.timestamp
value = localtime(value)
on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Recorded on {} by {}").format(on, record.recorded.user)
html += self.render_bookmark(
tooltip=tooltip,

View File

@ -9,11 +9,12 @@ from django.http import HttpRequest
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.html import format_html
from django.utils.timezone import localtime
from django.utils.translation import gettext_lazy as _
from intervention.filters import InterventionTableFilter
from intervention.models import Intervention
from konova.utils.message_templates import DATA_CHECKED_ON_TEMPLATE, DATA_IS_UNCHECKED, DATA_CHECKED_PREVIOUSLY_TEMPLATE
from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT, DEFAULT_DATE_FORMAT
from konova.utils.tables import BaseTable, TableRenderMixin
import django_tables2 as tables
@ -107,21 +108,16 @@ class InterventionTable(BaseTable, TableRenderMixin):
"""
html = ""
checked = value is not None
previously_checked = record.get_last_checked_action()
tooltip = DATA_IS_UNCHECKED
tooltip = _("Not checked yet")
if checked:
checked_on = value.get_timestamp_str_formatted()
tooltip = DATA_CHECKED_ON_TEMPLATE.format(checked_on, record.checked.user)
value = value.timestamp
value = localtime(value)
checked_on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Checked on {} by {}").format(checked_on, record.checked.user)
html += self.render_checked_star(
tooltip=tooltip,
icn_filled=checked,
)
if previously_checked and not checked:
checked_on = previously_checked.get_timestamp_str_formatted()
tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(checked_on, previously_checked.user)
html += self.render_previously_checked_star(
tooltip=tooltip,
)
return format_html(html)
def render_d(self, value, record: Intervention):
@ -160,7 +156,9 @@ class InterventionTable(BaseTable, TableRenderMixin):
checked = value is not None
tooltip = _("Not recorded yet")
if checked:
on = value.get_timestamp_str_formatted()
value = value.timestamp
value = localtime(value)
on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Recorded on {} by {}").format(on, record.recorded.user)
html += self.render_bookmark(
tooltip=tooltip,

View File

@ -70,11 +70,6 @@
<span>
{% fa5_icon 'star' 'far' %}
</span>
{% if last_checked %}
<span class="rlp-gd-inv" title="{{last_checked_tooltip}}">
{% fa5_icon 'star' 'fas' %}
</span>
{% endif %}
{% else %}
<span class="check-star" title="{% trans 'Checked on '%} {{obj.checked.timestamp}} {% trans 'by' %} {{obj.checked.user}}">
{% fa5_icon 'star' %}

View File

@ -19,7 +19,7 @@ from konova.utils.generators import generate_qr_code
from konova.utils.message_templates import INTERVENTION_INVALID, FORM_INVALID, IDENTIFIER_REPLACED, \
CHECKED_RECORDED_RESET, DEDUCTION_REMOVED, DEDUCTION_ADDED, REVOCATION_ADDED, REVOCATION_REMOVED, \
COMPENSATION_REMOVED_TEMPLATE, DOCUMENT_ADDED, DEDUCTION_EDITED, REVOCATION_EDITED, DOCUMENT_EDITED, \
RECORDED_BLOCKS_EDIT, DATA_CHECKED_PREVIOUSLY_TEMPLATE
RECORDED_BLOCKS_EDIT
from konova.utils.user_checks import in_group
@ -265,15 +265,9 @@ def detail_view(request: HttpRequest, id: str):
geom_form = SimpleGeomForm(
instance=intervention,
)
last_checked = intervention.get_last_checked_action()
last_checked_tooltip = ""
if last_checked:
last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(last_checked.get_timestamp_str_formatted(), last_checked.user)
context = {
"obj": intervention,
"last_checked": last_checked,
"last_checked_tooltip": last_checked_tooltip,
"compensations": compensations,
"has_access": is_data_shared,
"geom_form": geom_form,

View File

@ -408,20 +408,6 @@ class CheckableObjectMixin(models.Model):
self.log.add(action)
return action
def get_last_checked_action(self):
""" Getter for the most recent checked action on the log
Returns:
previously_checked (UserActionLogEntry): The most recent checked action
"""
from user.models import UserAction
previously_checked = self.log.filter(
action=UserAction.CHECKED
).order_by(
"-timestamp"
).first()
return previously_checked
class ShareableObjectMixin(models.Model):
# Users having access on this object

View File

@ -46,8 +46,8 @@ ALLOWED_HOSTS = [
LOGIN_URL = "/login/"
# Session settings
SESSION_COOKIE_AGE = 60 * 60 # 60 minutes
SESSION_SAVE_EVERY_REQUEST = True
#SESSION_COOKIE_AGE = 30 * 60 # 30 minutes
#SESSION_SAVE_EVERY_REQUEST = True
# Application definition

View File

@ -6,7 +6,7 @@
{% if obj.comment %}
<div class="col-sm-12">
<div class="w-100">
<div class="card mt-3">
<div class="card-header rlp-gd">
<div class="row">

View File

@ -81,8 +81,3 @@ GEOMETRY_CONFLICT_WITH_TEMPLATE = _("Geometry conflict detected with {}")
# INTERVENTION
INTERVENTION_HAS_REVOCATIONS_TEMPLATE = _("This intervention has {} revocations")
# CHECKED
DATA_CHECKED_ON_TEMPLATE = _("Checked on {} by {}")
DATA_CHECKED_PREVIOUSLY_TEMPLATE = _("Data has changed since last check on {} by {}")
DATA_IS_UNCHECKED = _("Current data not checked yet")

View File

@ -112,17 +112,6 @@ class BaseTable(tables.tables.Table):
icon
)
def render_previously_checked_star(self, tooltip: str = None):
"""
Returns a star icon for a check action in the past
"""
icon = "fas fa-star rlp-gd-inv"
return format_html(
"<em title='{}' class='{}'></em>",
tooltip,
icon
)
def render_bookmark(self, tooltip: str = None, icn_filled: bool = False):
"""
Returns a bookmark icon

Binary file not shown.

View File

@ -18,15 +18,15 @@
#: konova/filters/mixins.py:277 konova/filters/mixins.py:323
#: konova/filters/mixins.py:361 konova/filters/mixins.py:362
#: konova/filters/mixins.py:393 konova/filters/mixins.py:394
#: konova/forms.py:179 konova/forms.py:281 konova/forms.py:395
#: konova/forms.py:439 konova/forms.py:449 konova/forms.py:462
#: konova/forms.py:474 konova/forms.py:492 user/forms.py:42
#: konova/forms.py:179 konova/forms.py:281 konova/forms.py:382
#: konova/forms.py:426 konova/forms.py:436 konova/forms.py:449
#: konova/forms.py:461 konova/forms.py:479 user/forms.py:42
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-30 09:16+0200\n"
"POT-Creation-Date: 2022-05-11 13:41+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"
@ -138,9 +138,9 @@ msgstr "Zuständigkeitsbereich"
#: analysis/templates/analysis/reports/includes/intervention/amount.html:17
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:8
#: analysis/templates/analysis/reports/includes/intervention/laws.html:17
#: compensation/tables.py:41
#: compensation/tables.py:40
#: compensation/templates/compensation/detail/compensation/view.html:64
#: intervention/tables.py:40
#: intervention/tables.py:39
#: intervention/templates/intervention/detail/view.html:68
#: user/models/user_action.py:20
msgid "Checked"
@ -154,12 +154,12 @@ msgstr "Geprüft"
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:9
#: analysis/templates/analysis/reports/includes/intervention/laws.html:20
#: analysis/templates/analysis/reports/includes/old_data/amount.html:18
#: compensation/tables.py:47 compensation/tables.py:230
#: compensation/tables.py:46 compensation/tables.py:220
#: compensation/templates/compensation/detail/compensation/view.html:78
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31
#: compensation/templates/compensation/detail/eco_account/view.html:45
#: ema/tables.py:44 ema/templates/ema/detail/view.html:35
#: intervention/tables.py:46
#: intervention/tables.py:45
#: intervention/templates/intervention/detail/view.html:82
#: user/models/user_action.py:21
msgid "Recorded"
@ -198,7 +198,7 @@ msgid "Other registration office"
msgstr "Andere Zulassungsbehörden"
#: analysis/templates/analysis/reports/includes/compensation/card_compensation.html:11
#: compensation/tables.py:68
#: compensation/tables.py:67
#: intervention/templates/intervention/detail/includes/compensations.html:8
#: intervention/templates/intervention/report/report.html:45
msgid "Compensations"
@ -227,7 +227,7 @@ msgid "Surface"
msgstr "Fläche"
#: analysis/templates/analysis/reports/includes/intervention/card_intervention.html:10
#: intervention/tables.py:67
#: intervention/tables.py:66
msgid "Interventions"
msgstr "Eingriffe"
@ -285,8 +285,8 @@ msgid "Type"
msgstr "Typ"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:24
#: compensation/tables.py:90 intervention/forms/modalForms.py:375
#: intervention/forms/modalForms.py:382 intervention/tables.py:89
#: compensation/tables.py:89 intervention/forms/modalForms.py:375
#: intervention/forms/modalForms.py:382 intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/includes/quickstart/interventions.html:4
#: templates/navbars/navbar.html:22
@ -294,7 +294,7 @@ msgid "Intervention"
msgstr "Eingriff"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:34
#: compensation/tables.py:274
#: compensation/tables.py:264
#: compensation/templates/compensation/detail/eco_account/view.html:20
#: intervention/forms/modalForms.py:348 intervention/forms/modalForms.py:355
#: konova/templates/konova/includes/quickstart/ecoaccounts.html:4
@ -314,9 +314,9 @@ msgstr "Vor"
msgid "Show only unrecorded"
msgstr "Nur unverzeichnete anzeigen"
#: compensation/forms/forms.py:32 compensation/tables.py:26
#: compensation/tables.py:205 ema/tables.py:29 intervention/forms/forms.py:28
#: intervention/tables.py:25
#: compensation/forms/forms.py:32 compensation/tables.py:25
#: compensation/tables.py:195 ema/tables.py:29 intervention/forms/forms.py:28
#: intervention/tables.py:24
#: intervention/templates/intervention/detail/includes/compensations.html:30
msgid "Identifier"
msgstr "Kennung"
@ -326,8 +326,8 @@ msgstr "Kennung"
msgid "Generated automatically"
msgstr "Automatisch generiert"
#: compensation/forms/forms.py:44 compensation/tables.py:31
#: compensation/tables.py:210
#: compensation/forms/forms.py:44 compensation/tables.py:30
#: compensation/tables.py:200
#: compensation/templates/compensation/detail/compensation/includes/documents.html:28
#: compensation/templates/compensation/detail/compensation/view.html:32
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
@ -337,12 +337,12 @@ msgstr "Automatisch generiert"
#: ema/tables.py:34 ema/templates/ema/detail/includes/documents.html:28
#: ema/templates/ema/detail/view.html:31
#: ema/templates/ema/report/report.html:12 intervention/forms/forms.py:40
#: intervention/tables.py:30
#: intervention/tables.py:29
#: intervention/templates/intervention/detail/includes/compensations.html:33
#: intervention/templates/intervention/detail/includes/documents.html:28
#: intervention/templates/intervention/detail/view.html:31
#: intervention/templates/intervention/report/report.html:12
#: konova/forms.py:438
#: konova/forms.py:425
msgid "Title"
msgstr "Bezeichnung"
@ -369,7 +369,7 @@ msgstr "Kompensation XY; Flur ABC"
#: intervention/templates/intervention/detail/includes/documents.html:34
#: intervention/templates/intervention/detail/includes/payments.html:34
#: intervention/templates/intervention/detail/includes/revocation.html:38
#: konova/forms.py:473 konova/templates/konova/includes/comment_card.html:16
#: konova/forms.py:460 konova/templates/konova/includes/comment_card.html:16
msgid "Comment"
msgstr "Kommentar"
@ -493,7 +493,7 @@ msgid "Due on which date"
msgstr "Zahlung wird an diesem Datum erwartet"
#: compensation/forms/modalForms.py:65 compensation/forms/modalForms.py:363
#: intervention/forms/modalForms.py:177 konova/forms.py:475
#: intervention/forms/modalForms.py:177 konova/forms.py:462
msgid "Additional comment, maximum {} letters"
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
@ -675,62 +675,70 @@ msgstr ""
"Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen "
"wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!"
#: compensation/tables.py:36 compensation/tables.py:215 ema/tables.py:39
#: intervention/tables.py:35 konova/filters/mixins.py:98
#: compensation/tables.py:35 compensation/tables.py:205 ema/tables.py:39
#: intervention/tables.py:34 konova/filters/mixins.py:98
msgid "Parcel gmrkng"
msgstr "Gemarkung"
#: compensation/tables.py:53 compensation/tables.py:236 ema/tables.py:50
#: intervention/tables.py:52
#: compensation/tables.py:52 compensation/tables.py:226 ema/tables.py:50
#: intervention/tables.py:51
msgid "Editable"
msgstr "Freigegeben"
#: compensation/tables.py:59 compensation/tables.py:242 ema/tables.py:56
#: intervention/tables.py:58
#: compensation/tables.py:58 compensation/tables.py:232 ema/tables.py:56
#: intervention/tables.py:57
msgid "Last edit"
msgstr "Zuletzt bearbeitet"
#: compensation/tables.py:90 compensation/tables.py:274 ema/tables.py:89
#: intervention/tables.py:89
#: compensation/tables.py:89 compensation/tables.py:264 ema/tables.py:89
#: intervention/tables.py:88
msgid "Open {}"
msgstr "Öffne {}"
#: compensation/tables.py:170
#: compensation/tables.py:114 intervention/tables.py:111
msgid "Not checked yet"
msgstr "Noch nicht geprüft"
#: compensation/tables.py:119 intervention/tables.py:116
msgid "Checked on {} by {}"
msgstr "Am {} von {} geprüft worden"
#: compensation/tables.py:160
#: compensation/templates/compensation/detail/compensation/view.html:81
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:58
#: compensation/templates/compensation/detail/eco_account/view.html:48
#: ema/tables.py:131 ema/templates/ema/detail/view.html:38
#: intervention/tables.py:167
#: intervention/tables.py:157
#: intervention/templates/intervention/detail/view.html:85
msgid "Not recorded yet"
msgstr "Noch nicht verzeichnet"
#: compensation/tables.py:175 compensation/tables.py:334 ema/tables.py:136
#: intervention/tables.py:172
#: compensation/tables.py:165 compensation/tables.py:324 ema/tables.py:136
#: intervention/tables.py:162
msgid "Recorded on {} by {}"
msgstr "Am {} von {} verzeichnet worden"
#: compensation/tables.py:197 compensation/tables.py:356 ema/tables.py:157
#: intervention/tables.py:193
#: compensation/tables.py:187 compensation/tables.py:346 ema/tables.py:157
#: intervention/tables.py:183
msgid "Full access granted"
msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden"
#: compensation/tables.py:197 compensation/tables.py:356 ema/tables.py:157
#: intervention/tables.py:193
#: compensation/tables.py:187 compensation/tables.py:346 ema/tables.py:157
#: intervention/tables.py:183
msgid "Access not granted"
msgstr "Nicht freigegeben - Datensatz nur lesbar"
#: compensation/tables.py:220
#: compensation/tables.py:210
#: compensation/templates/compensation/detail/eco_account/view.html:36
#: konova/templates/konova/widgets/progressbar.html:3
msgid "Available"
msgstr "Verfügbar"
#: compensation/tables.py:251
#: compensation/tables.py:241
msgid "Eco Accounts"
msgstr "Ökokonten"
#: compensation/tables.py:329
#: compensation/tables.py:319
msgid "Not recorded yet. Can not be used for deductions, yet."
msgstr ""
"Noch nicht verzeichnet. Kann noch nicht für Abbuchungen genutzt werden."
@ -863,7 +871,7 @@ msgstr "Dokumente"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
#: ema/templates/ema/detail/includes/documents.html:14
#: intervention/templates/intervention/detail/includes/documents.html:14
#: konova/forms.py:491
#: konova/forms.py:478
msgid "Add new document"
msgstr "Neues Dokument hinzufügen"
@ -871,7 +879,7 @@ msgstr "Neues Dokument hinzufügen"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:31
#: ema/templates/ema/detail/includes/documents.html:31
#: intervention/templates/intervention/detail/includes/documents.html:31
#: konova/forms.py:448
#: konova/forms.py:435
msgid "Created on"
msgstr "Erstellt"
@ -879,7 +887,7 @@ msgstr "Erstellt"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:61
#: ema/templates/ema/detail/includes/documents.html:61
#: intervention/templates/intervention/detail/includes/documents.html:65
#: konova/forms.py:553
#: konova/forms.py:540
msgid "Edit document"
msgstr "Dokument bearbeiten"
@ -1142,17 +1150,17 @@ msgid "Compensation {} edited"
msgstr "Kompensation {} bearbeitet"
#: compensation/views/compensation.py:182 compensation/views/eco_account.py:173
#: ema/views.py:240 intervention/views.py:332
#: ema/views.py:240 intervention/views.py:334
msgid "Edit {}"
msgstr "Bearbeite {}"
#: compensation/views/compensation.py:261 compensation/views/eco_account.py:359
#: ema/views.py:194 intervention/views.py:536
#: ema/views.py:194 intervention/views.py:538
msgid "Log"
msgstr "Log"
#: compensation/views/compensation.py:605 compensation/views/eco_account.py:727
#: ema/views.py:558 intervention/views.py:682
#: ema/views.py:558 intervention/views.py:684
msgid "Report {}"
msgstr "Bericht {}"
@ -1173,32 +1181,32 @@ msgid "Eco-account removed"
msgstr "Ökokonto entfernt"
#: compensation/views/eco_account.py:380 ema/views.py:282
#: intervention/views.py:635
#: intervention/views.py:637
msgid "{} unrecorded"
msgstr "{} entzeichnet"
#: compensation/views/eco_account.py:380 ema/views.py:282
#: intervention/views.py:635
#: intervention/views.py:637
msgid "{} recorded"
msgstr "{} verzeichnet"
#: compensation/views/eco_account.py:804 ema/views.py:628
#: intervention/views.py:433
#: intervention/views.py:435
msgid "{} has already been shared with you"
msgstr "{} wurde bereits für Sie freigegeben"
#: compensation/views/eco_account.py:809 ema/views.py:633
#: intervention/views.py:438
#: intervention/views.py:440
msgid "{} has been shared with you"
msgstr "{} ist nun für Sie freigegeben"
#: compensation/views/eco_account.py:816 ema/views.py:640
#: intervention/views.py:445
#: intervention/views.py:447
msgid "Share link invalid"
msgstr "Freigabelink ungültig"
#: compensation/views/eco_account.py:839 ema/views.py:663
#: intervention/views.py:468
#: intervention/views.py:470
msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert"
@ -1304,7 +1312,7 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss"
msgid "Binding on"
msgstr "Datum Bestandskraft bzw. Rechtskraft"
#: intervention/forms/forms.py:211 intervention/views.py:95
#: intervention/forms/forms.py:211 intervention/views.py:97
msgid "New intervention"
msgstr "Neuer Eingriff"
@ -1384,7 +1392,7 @@ msgstr "Kompensationen und Zahlungen geprüft"
msgid "Run check"
msgstr "Prüfung vornehmen"
#: intervention/forms/modalForms.py:264 konova/forms.py:594
#: intervention/forms/modalForms.py:264 konova/forms.py:581
msgid ""
"I, {} {}, confirm that all necessary control steps have been performed by "
"myself."
@ -1524,27 +1532,27 @@ msgstr ""
"Kein Ausgleich jeglicher Art gefunden (Kompensation, Ersatzzahlung, "
"Abbuchung)"
#: intervention/views.py:52
#: intervention/views.py:54
msgid "Interventions - Overview"
msgstr "Eingriffe - Übersicht"
#: intervention/views.py:85
#: intervention/views.py:87
msgid "Intervention {} added"
msgstr "Eingriff {} hinzugefügt"
#: intervention/views.py:320
#: intervention/views.py:322
msgid "Intervention {} edited"
msgstr "Eingriff {} bearbeitet"
#: intervention/views.py:356
#: intervention/views.py:358
msgid "{} removed"
msgstr "{} entfernt"
#: intervention/views.py:489
#: intervention/views.py:491
msgid "Check performed"
msgstr "Prüfung durchgeführt"
#: intervention/views.py:640
#: intervention/views.py:642
msgid "There are errors on this intervention:"
msgstr "Es liegen Fehler in diesem Eingriff vor:"
@ -1637,11 +1645,11 @@ msgstr "Speichern"
msgid "Not editable"
msgstr "Nicht editierbar"
#: konova/forms.py:178 konova/forms.py:394
#: konova/forms.py:178 konova/forms.py:381
msgid "Confirm"
msgstr "Bestätige"
#: konova/forms.py:190 konova/forms.py:403
#: konova/forms.py:190 konova/forms.py:390
msgid "Remove"
msgstr "Löschen"
@ -1654,49 +1662,48 @@ msgstr "Sie sind dabei {} {} zu löschen"
msgid "Geometry"
msgstr "Geometrie"
#: konova/forms.py:331
#: konova/forms.py:325
msgid "Only surfaces allowed. Points or lines must be buffered."
msgstr ""
"Nur Flächen erlaubt. Punkte oder Linien müssen zu Flächen gepuffert werden."
msgstr "Nur Flächen erlaubt. Punkte oder Linien müssen zu Flächen gepuffert werden."
#: konova/forms.py:404
#: konova/forms.py:391
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
#: konova/forms.py:450
#: konova/forms.py:437
msgid "When has this file been created? Important for photos."
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?"
#: konova/forms.py:461
#: konova/forms.py:448
#: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
msgid "File"
msgstr "Datei"
#: konova/forms.py:463
#: konova/forms.py:450
msgid "Allowed formats: pdf, jpg, png. Max size 15 MB."
msgstr "Formate: pdf, jpg, png. Maximal 15 MB."
#: konova/forms.py:528
#: konova/forms.py:515
msgid "Added document"
msgstr "Dokument hinzugefügt"
#: konova/forms.py:585
#: konova/forms.py:572
msgid "Confirm record"
msgstr "Verzeichnen bestätigen"
#: konova/forms.py:593
#: konova/forms.py:580
msgid "Record data"
msgstr "Daten verzeichnen"
#: konova/forms.py:600
#: konova/forms.py:587
msgid "Confirm unrecord"
msgstr "Entzeichnen bestätigen"
#: konova/forms.py:601
#: konova/forms.py:588
msgid "Unrecord data"
msgstr "Daten entzeichnen"
#: konova/forms.py:602
#: konova/forms.py:589
msgid "I, {} {}, confirm that this data must be unrecorded."
msgstr ""
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
@ -2052,18 +2059,6 @@ msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}"
msgid "This intervention has {} revocations"
msgstr "Dem Eingriff liegen {} Widersprüche vor"
#: konova/utils/message_templates.py:86
msgid "Checked on {} by {}"
msgstr "Am {} von {} geprüft worden"
#: konova/utils/message_templates.py:87
msgid "Data has changed since last check on {} by {}"
msgstr "Daten wurden nach der letzten Prüfung geändert. Letzte Prüfung am {} durch {}"
#: konova/utils/message_templates.py:88
msgid "Current data not checked yet"
msgstr "Momentane Daten noch nicht geprüft"
#: konova/utils/messenger.py:70
msgid "{} checked"
msgstr "{} geprüft"
@ -2494,9 +2489,8 @@ msgid ""
msgstr ""
"\n"
" Diese Daten sind noch nicht veröffentlicht und/oder haben das "
"Bestands-/Rechtskraftdatum noch nicht erreicht. Sie können daher aktuell "
"nicht eingesehen werden. Schauen Sie zu einem späteren Zeitpunkt wieder "
"vorbei. \n"
"Bestands-/Rechtskraftdatum noch nicht erreicht. Sie können daher aktuell nicht "
"eingesehen werden. Schauen Sie zu einem späteren Zeitpunkt wieder vorbei. \n"
" "
#: templates/table/gmrkng_col.html:6

View File

@ -8,7 +8,6 @@ Created on: 15.11.21
import uuid
from django.db import models
from django.utils.timezone import localtime
from django.utils.translation import gettext_lazy as _
from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT
@ -123,13 +122,3 @@ class UserActionLogEntry(models.Model):
comment=comment,
)
return action
def get_timestamp_str_formatted(self):
""" Getter for formatted timestamp string of the entry
Returns:
val (str): The formatted timestamp as string
"""
val = self.timestamp
val = localtime(val)
return val.strftime(DEFAULT_DATE_TIME_FORMAT)