In order to make this work you need to tag any link in a mako template (or even static
html pages) you wish to be transformed with moksha_url="<dynamic|static>".
"static" simply rewrites the href to include the csrf token and any other query
string variables that are set. "dynamic" does the static rewrite but also sets
up an onClick handler so that the csrf token and query string can be updated when the user
clicks and not just when the page load. It will also in the future try to determine if a
whole page load is unnecessary and simply switch tabs if that is the case.
The only place where you do not add moksha_url is inside of the javascript grid templates
since it transforms the template, messing up the final output. The grid will take care of
the template links. Come to think of it I still want you to be able to add the markers to
the grid template so I am going to look at a way to tell the parser to ignore anything
inside javascript templates. For now just assume all links will be transformed to a
dynamic url.
--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.