Fixed nonodes to now show version information and updated it so that it redirects to root if there
is actually content so the page is actually not accessible unless you actually have no nodes.
This commit is contained in:
@@ -269,6 +269,13 @@
|
||||
<Compile Include="..\SolutionInfo.cs">
|
||||
<Link>Properties\SolutionInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="config\splashes\NoNodes.aspx.cs">
|
||||
<DependentUpon>noNodes.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\splashes\NoNodes.aspx.designer.cs">
|
||||
<DependentUpon>noNodes.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="install\Default.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
|
||||
25
src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs
Normal file
25
src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.WebPages;
|
||||
|
||||
namespace Umbraco.Web.UI.Config.Splashes
|
||||
{
|
||||
public partial class NoNodes : System.Web.UI.Page
|
||||
{
|
||||
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
|
||||
var store = UmbracoContext.Current.RoutingContext.PublishedContentStore;
|
||||
if (store.HasContent(UmbracoContext.Current))
|
||||
{
|
||||
//if there is actually content, go to the root
|
||||
Response.Redirect("~/");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
24
src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs
generated
Normal file
24
src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Umbraco.Web.UI.Config.Splashes {
|
||||
|
||||
|
||||
public partial class NoNodes {
|
||||
|
||||
/// <summary>
|
||||
/// Form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm Form1;
|
||||
}
|
||||
}
|
||||
@@ -1,182 +1,148 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %>
|
||||
|
||||
<%@ Import Namespace="Umbraco.Core.IO" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head runat="server">
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Umbraco
|
||||
<%=umbraco.GlobalSettings.CurrentVersion%>
|
||||
- no pages found</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Umbraco - no pages found</title>
|
||||
|
||||
<link media="all" rel="stylesheet" href="../../umbraco_client/installer/css/jquery-ui-1.8.6.custom.css" />
|
||||
|
||||
|
||||
<link media="all" type="text/css" rel="stylesheet" href="../../umbraco_client/installer/css/reset.css" />
|
||||
|
||||
|
||||
<link media="all" rel="stylesheet" href="../../umbraco_client/installer/css/all.css" />
|
||||
|
||||
|
||||
<link media="all" type="text/css" rel="stylesheet" href="../../umbraco_client/installer/css/form.css" />
|
||||
|
||||
<script src="../../umbraco_client/installer/js/jquery.1.4.4.js" type="text/javascript"></script>
|
||||
<script src="../../umbraco_client/installer/js/jquery.ui.selectmenu.js" type="text/javascript"></script>
|
||||
<script src="../../umbraco_client/installer/js/jquery.main.js" type="text/javascript"></script>
|
||||
<script src="../../umbraco_client/installer/js/jquery.1.4.4.js" type="text/javascript"></script>
|
||||
<script src="../../umbraco_client/installer/js/jquery.ui.selectmenu.js" type="text/javascript"></script>
|
||||
<script src="../../umbraco_client/installer/js/jquery.main.js" type="text/javascript"></script>
|
||||
|
||||
<script src="../../umbraco_client/passwordStrength/passwordstrength.js" type="text/javascript"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<!--[if lt IE 9]>
|
||||
<link media="all" rel="stylesheet" href="../../umbraco_client/installer/css/lt7.css" />
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if lt IE 7]><script type="text/javascript" src="../../umbraco_client/installer/js/ie-png.js"></script><![endif]-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 7]><script type="text/javascript" src="../../umbraco_client/installer/js/ie-png.js"></script><![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="theend">
|
||||
<form id="Form1" method="post" runat="server">
|
||||
|
||||
<!-- all page -->
|
||||
<!-- all page -->
|
||||
|
||||
<section id="wrapper">
|
||||
<section id="wrapper">
|
||||
|
||||
<div class="wholder">
|
||||
<div class="wholder">
|
||||
|
||||
<!-- header -->
|
||||
<!-- header -->
|
||||
|
||||
<header id="header">
|
||||
<header id="header">
|
||||
<div class="holder">
|
||||
<strong class="logo"><a href="#">Umbraco</a></strong>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="holder">
|
||||
<!-- all content -->
|
||||
|
||||
<strong class="logo"><a href="#">Umbraco</a></strong>
|
||||
<section id="main">
|
||||
|
||||
<!-- content -->
|
||||
|
||||
</div>
|
||||
<section class="content">
|
||||
|
||||
</header>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
$.post("../../install/utills/p.aspx?feed=sitebuildervids",
|
||||
function(data) {
|
||||
jQuery("#ajax-sitebuildervids").html(data);
|
||||
});
|
||||
|
||||
<!-- all content -->
|
||||
$.post("../../install/utills/p.aspx?feed=developervids",
|
||||
function(data) {
|
||||
jQuery("#ajax-developervids").html(data);
|
||||
});
|
||||
});
|
||||
|
||||
<section id="main">
|
||||
</script>
|
||||
|
||||
|
||||
<!-- done box -->
|
||||
|
||||
<!-- content -->
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>Looks like there's still work to do</h1>
|
||||
<p>
|
||||
You're seeing the wonderful page because your website doesn't contain any <strong>published</strong> content yet.
|
||||
</p>
|
||||
<p>
|
||||
So get rid of this page by starting umbraco and publishing some content. You can do this by clicking the "set up your new website" button below.
|
||||
</p>
|
||||
<ul class="btn-web">
|
||||
<li class="btn-set"><a href="<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/umbraco.aspx"><span>Launch umbraco</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="threcol">
|
||||
<div class="t">
|
||||
|
||||
</div>
|
||||
<div class="hold">
|
||||
<aside class="col1">
|
||||
<h2>Useful links</h2>
|
||||
<p>We’ve put together some useful links to help you get started with Umbraco.</p>
|
||||
<nav class="links">
|
||||
<ul>
|
||||
<li><a href="http://our.umbraco.org?ref=ourFromInstaller">our.umbraco.org</a></li>
|
||||
</ul>
|
||||
|
||||
<section class="content">
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$.post("../../install/utills/p.aspx?feed=sitebuildervids",
|
||||
function (data) {
|
||||
jQuery("#ajax-sitebuildervids").html(data);
|
||||
});
|
||||
|
||||
$.post("../../install/utills/p.aspx?feed=developervids",
|
||||
function (data) {
|
||||
jQuery("#ajax-developervids").html(data);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- done box -->
|
||||
|
||||
<div class="tab main-tabinfo">
|
||||
<div class="container">
|
||||
<h1>
|
||||
Looks like there's still work to do</h1>
|
||||
<p>
|
||||
You're seeing the wonderful page because your website doesn't contain any
|
||||
<strong>published</strong> content yet.
|
||||
</p>
|
||||
<p>
|
||||
So get rid of this page by starting umbraco and publishing
|
||||
some content. You can do this by clicking the "set up your new website" button below.
|
||||
</p>
|
||||
<ul class="btn-web">
|
||||
|
||||
|
||||
<li class="btn-set"><a href="<%= umbraco.IO.IOHelper.ResolveUrl(umbraco.IO.SystemDirectories.Umbraco) %>/umbraco.aspx"><span>Launch umbraco</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="threcol">
|
||||
<div class="t">
|
||||
</div>
|
||||
<div class="hold">
|
||||
|
||||
<aside class="col1">
|
||||
<h2>Useful links</h2>
|
||||
<p>We’ve put together some useful links to help you get started with Umbraco.</p>
|
||||
<nav class="links">
|
||||
<ul>
|
||||
<li><a href="http://our.umbraco.org?ref=ourFromInstaller">our.umbraco.org</a></li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://our.umbraco.org/wiki?ref=LatestDocsFromInstaller">New documentation</a></li>
|
||||
<li><a href="http://our.umbraco.org/projects?ref=LatestProjectsFromInstaller">New Projects</a></li>
|
||||
<li><a href="http://our.umbraco.org/forum?ref=LatesTalkFromInstaller">Forum Talk</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<aside class="col2">
|
||||
<h2>Sitebuilder introduction</h2>
|
||||
<div id="ajax-sitebuildervids"><small>Loading...</small></div>
|
||||
</aside>
|
||||
<aside class="col3">
|
||||
<h2>Developer introduction</h2>
|
||||
<div id="ajax-developervids"><small>Loading...</small></div>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<!-- bg page -->
|
||||
<div class="bg-main">
|
||||
<div class="color2">
|
||||
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
|
||||
<div class="color3">
|
||||
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
|
||||
<div class="color1">
|
||||
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
|
||||
<div class="color4">
|
||||
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
|
||||
<div class="color5">
|
||||
|
||||
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://our.umbraco.org/wiki?ref=LatestDocsFromInstaller">New documentation</a></li>
|
||||
<li><a href="http://our.umbraco.org/projects?ref=LatestProjectsFromInstaller">New Projects</a></li>
|
||||
<li><a href="http://our.umbraco.org/forum?ref=LatesTalkFromInstaller">Forum Talk</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</aside>
|
||||
<aside class="col2">
|
||||
<h2>Sitebuilder introduction</h2>
|
||||
<div id="ajax-sitebuildervids"><small>Loading...</small></div>
|
||||
</aside>
|
||||
<aside class="col3">
|
||||
<h2>Developer introduction</h2>
|
||||
<div id="ajax-developervids"><small>Loading...</small></div>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- bg page -->
|
||||
<div class="bg-main">
|
||||
<div class="color2">
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
<div class="color3">
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
<div class="color1">
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
<div class="color4">
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
<div class="color5">
|
||||
<div class="bg-c"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,10 +3,10 @@ using System.Data;
|
||||
using System.Web;
|
||||
using System.Linq;
|
||||
using System.Web.Security;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.IO;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace umbraco.BasePages
|
||||
|
||||
Reference in New Issue
Block a user