Changes between Version 66 and Version 67 of DeveloperGuidelinesS3Framework


Ignore:
Timestamp:
08/07/11 17:12:51 (10 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesS3Framework

    v66 v67  
    1818Each Controller should start like this:
    1919{{{
    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")]
     20module = request.controller
     21resourcename = request.function
     22
     23if not deployment_settings.has_module(module):
     24    raise HTTP(404, body="Module disabled: %s" % module)
     25
     26# Options Menu (available in all Functions)
     27shn_menu(module)
     28}}}
     29
     30menu is defined in {{{models/01_menu.py}}}:
     31module_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")]
    2837    ]]
    2938]
    30 }}}
    31 
    3239=== Conflict Detection ===
    3340Sahana is a multi-user system so there is a potential for multiple users to be editing the same record at once.[[BR]]