From 97a1b45c11a71728664e994cbcdca4801baa8635 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Sun, 9 Aug 2009 20:13:20 -0400 Subject: [PATCH] Use RESTful URLs for commands svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2683 --- code/static/style.css | 4 ++++ code/templates/info.mako | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/code/static/style.css b/code/static/style.css index 49fe8e2..a764e17 100644 --- a/code/static/style.css +++ b/code/static/style.css @@ -104,3 +104,7 @@ tr.stripedrow { #machinelist td, #machinelist th { padding: 0.1em 0.5em; } + +form { + display: inline; +} diff --git a/code/templates/info.mako b/code/templates/info.mako index 5af29bb..b98e7c2 100644 --- a/code/templates/info.mako +++ b/code/templates/info.mako @@ -26,24 +26,26 @@ Info on ${machine.name} VNC console not enabled; still booting? % endif % endif -
- - +<%def name="command_button(title, value, cdrom=False, extra='')"> + + + +% if cdrom: + Boot CD: ${self.fn.cdromList()} +% endif +
+
% if on: - - - + ${command_button("Power off", "destroy")} + ${command_button("Shutdown", "shutdown")} + ${command_button("Reboot", "reboot", cdrom=True)} % else: - + ${command_button("Power on", "create", cdrom=True)} % endif
- Boot CD: -${self.fn.cdromList()} -
-
- + ${command_button("Delete VM", "delete", extra='''onclick="return confirm('Are you sure that you want to delete this VM?');"''')}
-- 1.7.9.5