X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/96d25596909648779ec4703abb25f489a33ca4aa..41c2aef6270583d1bd47c245f27cf87487857b5d:/code/templates/functions.tmpl?ds=sidebyside diff --git a/code/templates/functions.tmpl b/code/templates/functions.tmpl index a746145..635f5db 100644 --- a/code/templates/functions.tmpl +++ b/code/templates/functions.tmpl @@ -1,24 +1,43 @@ -#def cdromList($cdroms, $default="") - - #for $cdrom in $cdroms + #for $item in $lst #end for #end def +#def cdromList($default="", $onchange=None) +#filter None +$databaseList(sorted($sipb_xen_database.CDROM.select(), key=lambda x: x.description), + default, onchange, 'cdrom', 'cdromlist', 'cdrom_id', 'description') +#end filter +#end def + +#def autoList($default="", $onchange=None) +#filter None +$databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.description), + default, onchange, 'autoinstall', 'autoinstalllist', 'autoinstall_id', 'description') +#end filter +#end def + #def vmTypeList($default=None) -#for $vmtype in sorted($sipb_xen_database.Type.select(), key=lambda x: x.description) +#for $vmtype in (('linux-hvm', 'HVM'), ('linux', 'ParaVM'), ) #end for #end def @@ -38,5 +57,7 @@ #end if #end def - -$full_body \ No newline at end of file +#filter None +$full_body +#end filter +#end filter \ No newline at end of file