Show power buttons as icons
authorQuentin Smith <quentin@mit.edu>
Sun, 22 Jun 2008 06:37:06 +0000 (02:37 -0400)
committerQuentin Smith <quentin@mit.edu>
Sun, 22 Jun 2008 06:37:06 +0000 (02:37 -0400)
svn path=/trunk/packages/sipb-xen-www/; revision=639

code/static/style.css
code/templates/list.tmpl

index ef294ad..29216cc 100644 (file)
@@ -74,6 +74,14 @@ td.error {
   font-weight: bold;
 }
 
+/* Machine list power buttons */
+.power.on:hover {
+  background: url(/static/power_button_on_to_off_bg.png);
+}
+.power.off:hover {
+  background: url(/static/power_button_off_to_on_bg.png);
+}
+
 /* Striping applied (by JavaScript) to every other row in /list. */
 tr.stripedrow {
   background-color: #DDF;
index a72c558..e9200dd 100644 (file)
@@ -113,8 +113,12 @@ $errorRow('cdrom', $err)
            <input type="hidden" name="back" value="list"/>
            <input type="hidden" name="machine_id"
                   value="$machine.machine_id"/>
-<input type="submit" class="button" name="action" value="#slurp
+<input type="image" class="power #slurp
+#if $machine.uptime then 'on' else 'off'
+" name="action" value="#slurp
 #if $machine.uptime then 'Power off' else 'Power on'
+" src="#slurp
+#if $machine.uptime then 'static/power_button_on.png' else 'static/power_button_off.png'
 "/>
          </form>
        </td>