20 | | module = "module" |
21 | | # Options Menu (available in all Functions' Views) |
22 | | response.menu_options = [ |
23 | | [T("Home"), False, URL(r=request, f="index")], [ |
24 | | [T("Resources"), False, URL(r=request, f="resource")], |
25 | | [T("List"), False, URL(r=request, f="person")], |
26 | | [T("Add"), False, URL(r=request, f="resource", args="create")], |
27 | | [T("Search People"), False, URL(r=request, f="resource", args="search")] |
| 20 | module = request.controller |
| 21 | resourcename = request.function |
| 22 | |
| 23 | if not deployment_settings.has_module(module): |
| 24 | raise HTTP(404, body="Module disabled: %s" % module) |
| 25 | |
| 26 | # Options Menu (available in all Functions) |
| 27 | shn_menu(module) |
| 28 | }}} |
| 29 | |
| 30 | menu is defined in {{{models/01_menu.py}}}: |
| 31 | module_menu = [ |
| 32 | [T("Home"), False, URL(f="index")], [ |
| 33 | [T("Resources"), False, URL(f="resource")], |
| 34 | [T("List"), False, URL(f="person")], |
| 35 | [T("Add"), False, URL(f="resource", args="create")], |
| 36 | [T("Search People"), False, URL(f="resource", args="search")] |