{{ #-------------------------------------------------------------------------- # # The python controller return: # - cfg_store, the configuration of the Ext.data.Array # - team_project string # - selector object # # prepare the data # - build unique DIV identifier # - Title and DIV block # #-------------------------------------------------------------------------- # # unique identifier for the DIV block associated to the grid # divgrid = "grid-%s" % id(cfg_store) # # The title and the DIV block for the Ext.grid.Panel # title = "%s %s" % (T("Publications"), team_project) response.write(H2(title, _class="dbui-h2 dbui-small-cap")) response.write(DIV(_id=divgrid)) # # The footer # # Add the URL providing a direct access to this list. # The application use the POST method will a user will use the GET one. # Display the URL only in the first case. # if request.env.request_method == 'POST': html_url = A("url", _href=selector.repr_url(), _target='_blank') =P(T("Direct access to the table: "), html_url, _class="dbui-p") =P(request.now.strftime("%d %b %Y %H:%M"), _class="dbui-p") =BR() pass # # Export python variables to the javascript # jsvars = ["cfgStore = %s" % cfg_store, "columns = []", "divgrid = '%s'" % divgrid, "i"] jsvars = " var %s;" % ',\n'.join(jsvars) response.write(SCRIPT(jsvars), escape=False) }}