add popup for nuget install nuget.exe dialog
authorEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 11 Aug 2011 08:06:05 +0000 (12:06 +0400)
committerEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 11 Aug 2011 08:06:05 +0000 (12:06 +0400)
nuget-server/resources/tool/tools.jsp

index b1a5461b65acb400f9642e30c0b2befea06f7b90..f15be715905094e37bfb79d83f66a20960bc20fa 100644 (file)
 <%@ include file="/include-internal.jsp" %>\r
 <jsp:useBean id="tools" type="jetbrains.buildServer.nuget.server.toolRegistry.tab.ToolsModel" scope="request"/>\r
 \r
-<h3>Installed NuGet Versions</h3>\r
+<c:set var="installedPluginsCount" value="${fn:length(tools.installed)}"/>\r
+<p>\r
+  TeamCity NuGet plugin requires to configure NuGet.Exe Command Line clients.\r
+  There are\r
+  <strong><c:out value="${installedPluginsCount}"/></strong>\r
+  plugin<bs:s val="${installedPluginsCount}"/> installed.\r
+</p>\r
+\r
+<h2 class="noBorder">Installed NuGet Versions</h2>\r
 <c:choose>\r
   <c:when test="${fn:length(tools.installed) eq 0}">\r
-    No NuGet packages installed\r
+    <div>There are no installed NuGet.exe</div>\r
   </c:when>\r
   <c:otherwise>\r
     <c:forEach var="tool" items="${tools.installed}">\r
     </c:forEach>\r
   </c:otherwise>\r
 </c:choose>\r
-<div class="addNew"><a href="#">Download NuGet</a></div>\r
-<div class="addNew"><a href="#">Install custom NuGet.exe</a></div>\r
 \r
+<div class="addNew">\r
+  <a href="#" onclick="return BS.NuGet.InstallPopup.show();">Install NuGet.exe Command Line client</a>\r
+</div>\r
 \r
-<%--\r
-<h3>Available NuGet Versions</h3>\r
-<c:choose>\r
-  <c:when test="${tools.toolsToInstallComputed}">\r
-    <c:forEach var="tool" items="${tools.toolsToInstall}">\r
-      <div>\r
-        NuGet version: <c:out value="${tool.version}"/> <a href="#" class="addNew">Install</a>\r
-      </div>\r
-    </c:forEach>\r
-  </c:when>\r
-  <c:otherwise>\r
+<script type="text/javascript">\r
+  if (!BS) BS = {};\r
+  if (!BS.NuGet) BS.NuGet = {};\r
+  BS.NuGet.InstallPopup = OO.extend(BS.AbstractModalDialog, {\r
+    getContainer : function() {\r
+      return $('nugetInstallFormDialog');\r
+    },\r
 \r
-  </c:otherwise>\r
-</c:choose>\r
+    show : function() {\r
+      this.showCentered();\r
+      return false;\r
+    },\r
 \r
+    save : function() {\r
+      alert('save');\r
+    }\r
+  });\r
+</script>\r
 \r
---%>\r
+<bs:modalDialog\r
+        formId="nugetInstallForm"\r
+        title="Install NuGet.exe Command Line"\r
+        action="foo.html"\r
+        closeCommand="BS.NuGet.InstallPopup.close();"\r
+        saveCommand="BS.NuGet.InstallPopup.save();">\r
+  This is modal dialog\r
+</bs:modalDialog>
\ No newline at end of file