# 308 To share info message

* adds needs-to-be-shared info message on entries which are only shared with the current user
This commit is contained in:
2023-03-07 07:17:08 +01:00
parent 4d3831f30b
commit f22b45b82b
9 changed files with 212 additions and 119 deletions

View File

@@ -22,7 +22,7 @@ from konova.forms import SimpleGeomForm
from konova.settings import ETS_GROUP, DEFAULT_GROUP, ZB_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import CANCEL_ACC_RECORDED_OR_DEDUCTED, RECORDED_BLOCKS_EDIT, FORM_INVALID, \
IDENTIFIER_REPLACED
IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group
@@ -213,6 +213,13 @@ def detail_view(request: HttpRequest, id: str):
request = acc.set_status_messages(request)
requesting_user_is_only_shared_user = acc.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = {
"obj": acc,
"geom_form": geom_form,