# 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,8 @@ from konova.forms import SimpleGeomForm
from konova.forms.modals import RemoveModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import RECORDED_BLOCKS_EDIT, IDENTIFIER_REPLACED, FORM_INVALID
from konova.utils.message_templates import RECORDED_BLOCKS_EDIT, IDENTIFIER_REPLACED, FORM_INVALID, \
DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group
@@ -148,6 +149,13 @@ def detail_view(request: HttpRequest, id: str):
ema.set_status_messages(request)
requesting_user_is_only_shared_user = ema.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = {
"obj": ema,
"geom_form": geom_form,