Now ignore negative rights, rather than treat them as positive.
[invirt/packages/invirt-web.git] / templates / list.tmpl
index 68f0858..19b4c6e 100644 (file)
@@ -16,7 +16,8 @@ List of your VMs
 #else if $varExists('new_machine')
 <p>Congratulations! You successfully created a new VM called $new_machine.</p>
 #end if
 #else if $varExists('new_machine')
 <p>Congratulations! You successfully created a new VM called $new_machine.</p>
 #end if
-    <form action="create" method="POST" onsubmit="return jsFormSubmit('create', this);">
+    <form action="create" method="POST">
+    <input type="hidden" name="back" value="list"/>
       <table>
       $errorRow('create', $err)
        <tr>
       <table>
       $errorRow('create', $err)
        <tr>
@@ -26,12 +27,12 @@ List of your VMs
 $errorRow('name', $err)
        <tr>
          <td>Memory</td>
 $errorRow('name', $err)
        <tr>
          <td>Memory</td>
-         <td><input type="text" name="memory" value="$defaults.memory" size=3/> megabytes ($max_memory max)</td>
+         <td><input type="text" name="memory" value="$defaults.memory" size=3/> MiB ($max_memory max)</td>
        </tr>
 $errorRow('memory', $err)
        <tr>
          <td>Disk</td>
        </tr>
 $errorRow('memory', $err)
        <tr>
          <td>Disk</td>
-         <td><input type="text" name="disk" value="$defaults.disk" size=3/> gigabytes (${"%0.1f" % ($max_disk-0.05)} max)</td>
+         <td><input type="text" name="disk" value="$defaults.disk" size=3/> GiB (${"%0.1f" % ($max_disk-0.05)} max)</td>
        </tr>
 $errorRow('disk', $err)
        <tr>
        </tr>
 $errorRow('disk', $err)
        <tr>
@@ -50,6 +51,11 @@ $errorRow('vmtype', $err)
          <td>$cdromList($cdroms, $defaults.cdrom)</td>
        </tr>
 $errorRow('cdrom', $err)
          <td>$cdromList($cdroms, $defaults.cdrom)</td>
        </tr>
 $errorRow('cdrom', $err)
+       <tr>
+         <td>Owner</td>
+         <td><input type="text" name="owner" value="$defaults.owner"/></td>
+       </tr>
+       $errorRow('owner', $err)
       </table>
       <input type="submit" class="button" value="Create it!"/>
     </form>
       </table>
       <input type="submit" class="button" value="Create it!"/>
     </form>
@@ -61,13 +67,12 @@ $errorRow('cdrom', $err)
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
        <td>${machine.memory}M</td>
        <td>$machine.owner</td>
        <td><a href="info?machine_id=$machine.machine_id">$machine.name</a></td>
        <td>${machine.memory}M</td>
        <td>$machine.owner</td>
+       <td>$machine.administrator</td>
 #if $machine.nics
 #set $nic = $machine.nics[0]
        <td>$nic.ip</td>
 #if $machine.nics
 #set $nic = $machine.nics[0]
        <td>$nic.ip</td>
-       <td>$nic.hostname</td>
 #else
        <td></td>
 #else
        <td></td>
-       <td></td>
 #end if
 <td>#slurp
 #if $machine.uptime
 #end if
 <td>#slurp
 #if $machine.uptime
@@ -84,11 +89,12 @@ $has_vnc[$machine]
 #end if
 </td>
        <td>
 #end if
 </td>
        <td>
-         <form action="command" method="post" onsubmit="return rowFormSubmit(this, 'list');">
+         <form action="command" method="post">
+           <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="hidden" name="machine_id"
                   value="$machine.machine_id"/>
 <input type="submit" class="button" name="action" value="#slurp
-#if $machine.uptime then 'Shutdown' else 'Power on'
+#if $machine.uptime then 'Power off' else 'Power on'
 "/>
          </form>
        </td>
 "/>
          </form>
        </td>
@@ -100,9 +106,9 @@ $has_vnc[$machine]
       <tr>
        <td>Name</td>
        <td>Memory</td>
       <tr>
        <td>Name</td>
        <td>Memory</td>
-       <td>owner</td>
+       <td>Owner</td>
+        <td>Administrator</td>
        <td>IP</td>
        <td>IP</td>
-       <td>Hostname</td>
        <td>Uptime</td>
        <td>VNC</td>
        <td></td>
        <td>Uptime</td>
        <td>VNC</td>
        <td></td>
@@ -119,7 +125,7 @@ $has_vnc[$machine]
 #else
     <p>You have the following VMs:</p>
 #end if
 #else
     <p>You have the following VMs:</p>
 #end if
-    <p><a href="list" onclick="new Ajax.Updater('machinelist', 'list?js=machinelist', {method: 'get' });return false">refresh</a></p>
+    <p><a href="list">refresh</a></p>
     <div id="machinelist">
     $machineList($machines)
     </div>
     <div id="machinelist">
     $machineList($machines)
     </div>