Added graceful installation completion option when no connection to repo exists

This commit is contained in:
psterling
2011-02-22 13:13:58 +08:00
parent 9d5c127c14
commit 970903eb2a
5 changed files with 48 additions and 3 deletions

View File

@@ -68,6 +68,12 @@ namespace umbraco.presentation.install
Response.Redirect("?installStep=" + _s.Alias);
}
public void GotoLastStep()
{
InstallerStep _s = InstallerSteps().Get("theend");
Response.Redirect("?installStep=" + _s.Alias);
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)

View File

@@ -52,4 +52,12 @@
</nav>
</FooterTemplate>
</asp:Repeater>
</asp:PlaceHolder>
<asp:PlaceHolder ID="pl_starterKitsConnectionError" runat="server" Visible="false">
<!-- btn box -->
<footer class="btn-box">
<div class="t">&nbsp;</div>
<asp:LinkButton ID="LinkButton1" class="btn-step btn btn-continue" runat="server" onclick="gotoLastStep"><span>Continue</span></asp:LinkButton>
</footer>
</asp:PlaceHolder>

View File

@@ -75,11 +75,17 @@ namespace umbraco.presentation.install.steps.Skinning
uicontrols.Feedback fb = new global::umbraco.uicontrols.Feedback();
fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
fb.Text = "<strong>No connection to repository.</strong> Starter Kits could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'";
pl_loadStarterKits.Controls.Clear();
pl_loadStarterKits.Controls.Add(fb);
pl_starterKitsConnectionError.Controls.Add(fb);
pl_starterKitsConnectionError.Visible = true;
}
protected void gotoLastStep(object sender, EventArgs e)
{
Helper.RedirectToLastStep(this.Page);
}
protected void SelectStarterKit(object sender, EventArgs e)
{

View File

@@ -29,5 +29,23 @@ namespace umbraco.presentation.install.steps.Skinning {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Repeater rep_starterKits;
/// <summary>
/// pl_starterKitsConnectionError control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder pl_starterKitsConnectionError;
/// <summary>
/// LinkButton1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton LinkButton1;
}
}

View File

@@ -12,6 +12,13 @@ namespace umbraco.presentation.install {
d.GotoNextStep(d.step.Value);
}
public static void RedirectToLastStep(Page page)
{
_default d = (_default)page;
d.GotoLastStep();
}
private static int m_Percentage = -1;
public static int Percentage { get { return m_Percentage; } set { m_Percentage = value; } }