|
@@ -1,8 +1,10 @@
|
1
|
1
|
from .access import create_project_possible, create_task_possible, acc_task
|
|
2
|
+from django.conf import settings
|
2
|
3
|
from django.db.models.functions import Lower
|
3
|
4
|
from django.utils.translation import gettext as _
|
4
|
5
|
from .help import actionbar as actionbar_add_help
|
5
|
6
|
import inspect
|
|
7
|
+import logging
|
6
|
8
|
import mycreole
|
7
|
9
|
import patt
|
8
|
10
|
from .search import common_searches
|
|
@@ -10,6 +12,8 @@ from themes import empty_entry_parameters, color_icon_url, gray_icon_url
|
10
|
12
|
from users.context import menubar as menubar_users
|
11
|
13
|
from users.context import PROFILE_ENTRY_UID
|
12
|
14
|
|
|
15
|
+logger = logging.getLogger(settings.ROOT_LOGGER_NAME).getChild(__name__)
|
|
16
|
+
|
13
|
17
|
ATTACHMENT_UID = 'attachment'
|
14
|
18
|
BACK_UID = 'back'
|
15
|
19
|
COMMENTNEW_UID = 'commentnew'
|
|
@@ -28,16 +32,23 @@ def context_adaption(context, request, **kwargs):
|
28
|
32
|
context.set_additional_title(kwargs.pop('title'))
|
29
|
33
|
except KeyError:
|
30
|
34
|
pass # no title in kwargs
|
31
|
|
- menubar_users(context[context.MENUBAR], request)
|
32
|
35
|
menubar(context, request, caller_name, **kwargs)
|
33
|
36
|
actionbar(context, request, caller_name, **kwargs)
|
34
|
|
- navigationbar(context, request)
|
|
37
|
+ navigationbar(context, request, caller_name, **kwargs)
|
35
|
38
|
for key in kwargs:
|
36
|
39
|
context[key] = kwargs[key]
|
|
40
|
+ logger.debug("context adapted: %s", repr(context))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+def navigationbar(context, request, caller_name, **kwargs):
|
|
44
|
+ bar = context[context.NAVIGATIONBAR]
|
|
45
|
+ add_back_menu(request, bar)
|
|
46
|
+ finalise_bar(request, bar)
|
37
|
47
|
|
38
|
48
|
|
39
|
49
|
def menubar(context, request, caller_name, **kwargs):
|
40
|
50
|
bar = context[context.MENUBAR]
|
|
51
|
+ menubar_users(bar, request)
|
41
|
52
|
replace_profile(request, bar)
|
42
|
53
|
add_help_menu(request, bar)
|
43
|
54
|
add_tasklist_menu(request, bar)
|
|
@@ -47,12 +58,6 @@ def menubar(context, request, caller_name, **kwargs):
|
47
|
58
|
finalise_bar(request, bar)
|
48
|
59
|
|
49
|
60
|
|
50
|
|
-def navigationbar(context, request):
|
51
|
|
- bar = context[context.NAVIGATIONBAR]
|
52
|
|
- add_back_menu(request, bar)
|
53
|
|
- finalise_bar(request, bar)
|
54
|
|
-
|
55
|
|
-
|
56
|
61
|
def actionbar(context, request, caller_name, **kwargs):
|
57
|
62
|
bar = context[context.ACTIONBAR]
|
58
|
63
|
if caller_name == 'patt_tasklist':
|