|
@@ -22,6 +22,7 @@ ATTACHMENT_UID = 'attachment'
|
22
|
22
|
BACK_UID = 'back'
|
23
|
23
|
EDIT_UID = 'edit'
|
24
|
24
|
HELP_UID = 'help'
|
|
25
|
+INDEX_UID = 'index'
|
25
|
26
|
NAVIGATION_ENTRY_UID = 'navigation-%s'
|
26
|
27
|
|
27
|
28
|
|
|
@@ -81,18 +82,30 @@ def navigation_entry_parameters(request, path):
|
81
|
82
|
def menubar(context, request, caller_name, **kwargs):
|
82
|
83
|
bar = context[context.MENUBAR]
|
83
|
84
|
menubar_users(bar, request)
|
84
|
|
- add_help_menu(request, bar)
|
|
85
|
+ add_help_menu(request, bar, "current_help_page" in kwargs)
|
|
86
|
+ add_index_menu(request, bar, kwargs.get("rel_path", ''))
|
85
|
87
|
finalise_bar(request, bar)
|
86
|
88
|
|
87
|
89
|
|
88
|
|
-def add_help_menu(request, bar):
|
|
90
|
+def add_help_menu(request, bar, active):
|
89
|
91
|
bar.append_entry(
|
90
|
92
|
HELP_UID,
|
91
|
93
|
_('Help'),
|
92
|
94
|
color_icon_url(request, 'help.png'),
|
93
|
95
|
pages.url_helpview(request, 'main'),
|
94
|
96
|
True,
|
95
|
|
- False
|
|
97
|
+ active
|
|
98
|
+ )
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+def add_index_menu(request, bar, rel_path):
|
|
102
|
+ bar.append_entry(
|
|
103
|
+ INDEX_UID,
|
|
104
|
+ _('Index'),
|
|
105
|
+ color_icon_url(request, 'info.png'),
|
|
106
|
+ pages.url_page(request, 'index'),
|
|
107
|
+ True,
|
|
108
|
+ request.path == "/page/index"
|
96
|
109
|
)
|
97
|
110
|
|
98
|
111
|
|