-
- Available skins
- You can choose from the following skins.
- Please wait...
-
-
-
-
-
-
-
Available starter kits
You can choose from the following starter kits, each having specific functionality.
@@ -89,7 +76,7 @@
- We can not install starterkits when the install directory is not present.
+ We can not install starterkits when the install directory or package repository is not present.
diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs
index af31f42143..e5cb1acc7d 100644
--- a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs
+++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.cs
@@ -1,19 +1,63 @@
using System;
using System.Linq;
using Umbraco.Core.IO;
+using Umbraco.Core.Logging;
using Umbraco.Web.UI.Install.Steps.Skinning;
using Umbraco.Web.UI.Pages;
+using System.IO;
+using umbraco.cms.businesslogic.packager;
namespace Umbraco.Web.UI.Umbraco.Developer.Packages
{
- using System.IO;
+
public partial class StarterKits : UmbracoEnsuredPage
{
+ private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
protected void Page_Load(object sender, EventArgs e)
{
- ShowStarterKits();
+ //check if a starter kit is already isntalled
+
+ var installed = InstalledPackage.GetAllInstalledPackages();
+
+ if (installed.Count == 0)
+ {
+ ShowStarterKits();
+ return;
+ }
+
+ var repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
+ if (repo.HasConnection())
+ {
+ try
+ {
+ var kits = repo.Webservice.StarterKits();
+ var kitIds = kits.Select(x => x.RepoGuid).ToArray();
+
+ //if a starter kit is already installed show finish
+ if (installed.Any(x => kitIds.Contains(Guid.Parse(x.Data.PackageGuid))))
+ {
+ StarterKitNotInstalled.Visible = false;
+ installationCompleted.Visible = true;
+ }
+ else
+ {
+ ShowStarterKits();
+ }
+ }
+ catch (Exception ex)
+ {
+ LogHelper.Error("Cannot connect to package repository", ex);
+ InstallationDirectoryNotAvailable.Visible = true;
+ StarterKitNotInstalled.Visible = false;
+ }
+ }
+ else
+ {
+ InstallationDirectoryNotAvailable.Visible = true;
+ StarterKitNotInstalled.Visible = false;
+ }
}
private void ShowStarterKits()
@@ -22,30 +66,18 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages
{
InstallationDirectoryNotAvailable.Visible = true;
StarterKitNotInstalled.Visible = false;
- StarterKitInstalled.Visible = false;
return;
}
var starterkitsctrl = (LoadStarterKits)LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx");
- starterkitsctrl.StarterKitInstalled += StarterkitsctrlStarterKitInstalled;
-
+
ph_starterkits.Controls.Add(starterkitsctrl);
StarterKitNotInstalled.Visible = true;
- StarterKitInstalled.Visible = false;
}
- void StarterkitsctrlStarterKitInstalled()
- {
- StarterKitNotInstalled.Visible = false;
- StarterKitInstalled.Visible = false;
-
- installationCompleted.Visible = true;
-
- }
-
}
}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.designer.cs b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.designer.cs
index efc1a04906..105a8ff5df 100644
--- a/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.designer.cs
+++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/StarterKits.aspx.designer.cs
@@ -39,24 +39,6 @@ namespace Umbraco.Web.UI.Umbraco.Developer.Packages {
///
protected global::umbraco.uicontrols.Feedback fb;
- ///
- /// StarterKitInstalled control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane StarterKitInstalled;
-
- ///
- /// ph_skins control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.PlaceHolder ph_skins;
-
///
/// StarterKitNotInstalled control.
///