templateize detail inline button panel, add save/continue and save/another buttons, add insert button
diff --git a/planetstack/core/xoslib/templates/xosAdmin.html b/planetstack/core/xoslib/templates/xosAdmin.html
index 8e79904..94fb0f8 100644
--- a/planetstack/core/xoslib/templates/xosAdmin.html
+++ b/planetstack/core/xoslib/templates/xosAdmin.html
@@ -51,7 +51,6 @@
   <h3><%= title %></h3>
 </script>
 
-
 <script type="text/template" id="xos-navbutton">
   <li>
       <a href="<%= routeUrl %>">
@@ -61,6 +60,15 @@
   </li>
 </script>
 
+<script type="text/template" id="xos-inline-detail-buttons-template">
+    <tr>
+       <td colspan=2><button class="btn js-submit btn-xos-detail btn-xos-save-leave">Save</button>
+           <button class="btn js-submit btn-xos-detail btn-xos-save-continue">Save and Continue Editing</button>
+           <button class="btn js-submit btn-xos-detail btn-xos-save-another">Save and Add Another</button>
+       </td>
+    </tr>
+</script>
+
 <!-- Deployment -->
 
 <script type="text/template" id="xosAdmin-deployment-list-template">
@@ -93,7 +101,7 @@
   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>

   <tr><td>Backend:</td><td><input type="text" name="backend_type" value="<%= backend_type %>"></td></tr>

   <tr><td>Admin Tenant:</td><td><input type="text" name="admin_tenant" value="<%= admin_tenant %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>

@@ -129,7 +137,7 @@
   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>

   <tr><td>Disk Format:</td><td><input type="text" name="backend_type" value="<%= disk_format %>"></td></tr>

   <tr><td>Container Format:</td><td><input type="text" name="admin_tenant" value="<%= container_format %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -173,7 +181,7 @@
   <tr><td>Translation:</td><td><input type="text" name="translation" value="<%= translation %>"></td></tr>

   <tr><td>Shared Network Name:</td><td><input type="text" name="sharedNetworkName" value="<%= sharedNetworkName %>"></td></tr>

   <tr><td>Shared Network Id:</td><td><input type="text" name="sharedNetworkId" value="<%= sharedNetworkId %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -213,7 +221,7 @@
   <tr><td>Ports:</td><td><input type="text" name="ports" value="<%= ports %>"></td></tr>

   <tr><td>Labels:</td><td><input type="text" name="labels" value="<%= labels %>"></td></tr>

   <tr><td>Owner:</td><td><%= idToSelect("owner",owner,"slices","name") %></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -250,7 +258,7 @@
   <tr><td>Sliver:</td><td><input type="text" name="sliver" value="<%= sliver %>"></td></tr>

   <tr><td>Ip:</td><td><input type="text" name="ip" value="<%= ip %>"></td></tr>

   <tr><td>Port_id:</td><td><input type="text" name="port_id" value="<%= port_id %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -284,7 +292,7 @@
   <tr><td>Network:</td><td><input type="text" name="network" value="<%= network %>"></td></tr>

   <tr><td>Sliver:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>

   <tr><td>Ip:</td><td><input type="text" name="net_id" value="<%= net_id %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -319,7 +327,7 @@
   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>

   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>

   <tr><td>Deployment:</td><td><%= idToSelect("deployment",deployment,"deployments","name") %></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -348,7 +356,7 @@
   <form>

   <table>

   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -387,7 +395,7 @@
   <tr><td>Name:</td><td><input type="text" name="name" value="<%= name %>"></td></tr>

   <tr><td>description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>

   <tr><td>Version Number:</td><td><input type="text" name="versionNumber" value="<%= versionNumber %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -430,7 +438,7 @@
   <tr><td>Enabled:</td><td><input type="checkbox" name="enabled" <% if (enabled) print("checked"); %>></td></tr>

   <tr><td>Is Public:</td><td><input type="checkbox" name="is_public" <% if (is_public) print("checked"); %>></td></tr>

   <tr><td>login_base:</td><td><input type="text" name="login_base" value="<%= login_base %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -476,7 +484,7 @@
   <tr><td>Description:</td><td><input type="text" name="description" value="<%= description %>"></td></tr>

   <tr><td>Url:</td><td><input type="text" name="slice_url" value="<%= slice_url %>"></td></tr>

   <tr><td>Max Slivers:</td><td><input type="text" name="max_slivers" value="<%= max_slivers %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -510,7 +518,7 @@
   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>

   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>

   <tr><td>Tenant Id:</td><td><input type="text" name="tenant_id" value="<%= tenant_id %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -544,7 +552,7 @@
   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>

   <tr><td>Slice:</td><td><input type="text" name="slice" value="<%= slice %>"></td></tr>

   <tr><td>Role:</td><td><input type="text" name="role" value="<%= role %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -597,7 +605,7 @@
   <tr><td>Creator:</td><td><%= idToSelect("creator",creator,"users","username") %></td></tr>

   <tr><td>Slice:</td><td><%= idToSelect("slice",slice,"slices","name") %></td></tr>

   <tr><td>Deployment:</td><td><%= idToSelect("deploymentNetwork",deploymentNetwork,"deployments","name") %></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -641,7 +649,7 @@
   <tr><td>Phone:</td><td><input type="text" name="phone" value="<%= phone %>"></td></tr>

   <tr><td>Url:</td><td><input type="text" name="user_url" value="<%= user_url %>"></td></tr>

   <tr><td>Site:</td><td><%= idToSelect("site",site,"sites","name") %></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
@@ -661,7 +669,6 @@
   </table>
 </script>
 
-
 <script type="text/template" id="xosAdmin-userDeployment-listitem-template">
   <td class="objectLink"><%= id %></td>
   <td><%= idToName(user,"users","username") %></td>
@@ -676,7 +683,11 @@
   <tr><td>User:</td><td><input type="text" name="user" value="<%= user %>"></td></tr>

   <tr><td>Deployment:</td><td><input type="text" name="deployment" value="<%= deployment %>"></td></tr>

   <tr><td>kuser_id:</td><td><input type="text" name="kuser_id" value="<%= kuser_id %>"></td></tr>

-  <tr><td colspan=2><button class="btn js-submit btn-xos-detail">Save</button></td></tr>

+  <%= xosInlineDetailButtonsTemplate() %>

   </table>

   </form>

 </script>
+
+<script>
+xosInlineDetailButtonsTemplate = _.template($("#xos-inline-detail-buttons-template").html());
+</script>