#163 Checked icons improvement

* adds a second star icon on currently unchecked but previously checked entries
   --> can be detected easier for another check run
* simplifies some related code parts
* moves some translation string into message_templates.py
* enables session timeout after 60 minutes
* improves comment card layout sizing
* adds/updates translations
This commit is contained in:
2022-05-30 10:26:34 +02:00
parent 528f2145a4
commit c1aa14f6ba
15 changed files with 186 additions and 120 deletions

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
RECORDED_BLOCKS_EDIT, DATA_CHECKED_PREVIOUSLY_TEMPLATE
from konova.utils.user_checks import in_group
@@ -265,9 +265,15 @@ 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,