Changes between Version 1 and Version 2 of DeveloperGuidelines/Popup


Ignore:
Timestamp:
05/26/09 22:17:10 (13 years ago)
Author:
Fran Boon
Comment:

00_db.py

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Popup

    v1 v2  
    1010Model should include a comment like this:
    1111{{{
    12 db.table.field.comment=DIV(A(T('Add Contact'),_class='popup',_href=URL(r=request,c='pr',f='person',args='create',vars=dict(format='plain')),_target='top'),A(SPAN("[Help]"),_class="tooltip",_title=T("Contact|The Person to contact for this.")))
     12db.table.field.comment = DIV(A(T('Add Contact'),_class='popup',_href=URL(r=request, c='pr', f='person', args='create', vars=dict(format='plain')), _target='top'), A(SPAN("[Help]"), _class="tooltip", _title=T("Contact|The Person to contact for this.")))
    1313}}}
    1414
     
    3131}
    3232}}}
    33 There is a special format=popup added to the RESTlike CRUD controller in {{{__db.py}}}:
     33There is a special format=popup added to the RESTlike CRUD controller in {{{00_db.py}}}:
    3434{{{
    35 elif representation=="popup":
    36     form=crud.create(table,onvalidation=onvalidation)
    37     response.view='popup.html'
    38     return dict(module_name=module_name,form=form,module=module,resource=resource,main=main,caller=request.vars.caller)
     35elif representation == "popup":
     36    form = crud.create(table, onvalidation=onvalidation)
     37    response.view = 'popup.html'
     38    return dict(module_name=module_name, form=form, module=module, resource=resource, main=main, caller=request.vars.caller)
    3939}}}
    4040This uses it's own view: {{{views/popup.html}}}: