X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/d6a12bd1e32e3f9bc63c2c6f1d2d2793a9eee4d2..8837d33652d15c7656d6486d55c9d6bfaf342c2e:/code/templates/functions.mako diff --git a/code/templates/functions.mako b/code/templates/functions.mako index 99c0d30..068401f 100644 --- a/code/templates/functions.mako +++ b/code/templates/functions.mako @@ -27,7 +27,7 @@ ${databaseList(sorted(database.Autoinstall.query(), key=lambda x: x.description) <%def name="vmTypeList(default=None)"> % for vmtype in (('linux-hvm', 'HVM'), ('linux', 'ParaVM'), ): % endfor @@ -39,3 +39,16 @@ ${databaseList(sorted(database.Autoinstall.query(), key=lambda x: x.description) % endif + +<%! +def jquote(string): + return "'" + string.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n') + "'" + +def nl2br(string): + return string.replace('\n', '
') +%> + +<%def name="helppopup(subj)"> +## Return HTML code for a (?) link to a specified help topic +(?) +