From dcb08250abd8d242fa53e3f743f1a2ec2e6a03c6 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:23:38 +0200 Subject: [PATCH] Minor search visual tweaks --- build/Build.bat | 2 +- .../Configuration/UmbracoVersion.cs | 2 +- .../src/views/directives/umb-navigation.html | 30 +++++++++++++------ src/Umbraco.Web/Editors/EntityController.cs | 3 ++ src/Umbraco.Web/UmbracoContext.cs | 4 +-- 5 files changed, 28 insertions(+), 13 deletions(-) diff --git a/build/Build.bat b/build/Build.bat index ff11f0e7ab..27af8026d9 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,6 +1,6 @@ @ECHO OFF SET release=7.0.0 -SET comment= +SET comment=alpha SET version=%release% IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index e15e365ba4..3e3564f38f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration /// Gets the version comment (like beta or RC). /// /// The version comment. - public static string CurrentComment { get { return ""; } } + public static string CurrentComment { get { return "alpha"; } } // Get the version of the umbraco.dll by looking at a class in that dll // Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html index 8314ce4557..2b9740d07e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html @@ -54,16 +54,28 @@
-
Search results
-
diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 73208928ef..63782c4c55 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -36,6 +36,9 @@ namespace Umbraco.Web.Editors [HttpGet] public IEnumerable Search([FromUri] string query, UmbracoEntityTypes type) { + if (string.IsNullOrEmpty(query)) + return null; + switch (type) { case UmbracoEntityTypes.Document: diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index f479cc3ac6..35896c9358 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -412,8 +412,8 @@ namespace Umbraco.Web return //StateHelper.Cookies.Preview.HasValue // has preview cookie HttpContext.Request.HasPreviewCookie() - && UmbracoUser != null // has user - && currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false; // is not in admin UI + && currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false + && UmbracoUser != null; // has user } private HttpRequestBase GetRequestFromContext()