~dongpo-deng/sahana-eden/test

« back to all changes in this revision

Viewing changes to controllers/vts.py

  • Committer: Deng Dongpo
  • Date: 2010-08-01 09:29:44 UTC
  • Revision ID: dongpo@dhcp-21193.iis.sinica.edu.tw-20100801092944-8t9obt4xtl7otesb
initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
def presence():
 
3
    resource = request.function
 
4
    return shn_rest_controller(module, resource)
 
5
    
 
6
response.menu_options=[
 
7
    [T("Vehicles"), False, URL(r=request, f="vehicle"),[
 
8
        [T("List"), False, URL(r=request, f="vehicle")],
 
9
        [T("Add"), False, URL(r=request, f="vehicle", args="create")] ]]]
 
10
        
 
11
def vehicle():
 
12
    db.vts_vehicle.registration.label = T("License Plate")
 
13
    db.vts_vehicle.registration.comment = SPAN("*", _class="req")
 
14
    def veh_postp(jr, output):
 
15
        shn_action_buttons(jr)
 
16
        return output
 
17
    response.s3.postp = veh_postp
 
18
    output = shn_rest_controller("vts", "vehicle")
 
19
    return output
 
20
module = request.controller
 
21
def index():
 
22
    "Custom View"
 
23
    module_name = deployment_settings.modules[module].name_nice
 
24
    return dict(module_name=module_name)
 
 
b'\\ No newline at end of file'