Taking care of some (mainly cleanup) todos.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044524
This commit is contained in:
skewed
2009-12-23 22:09:25 +00:00
parent e9ceff540f
commit b7f63c7131
14 changed files with 25 additions and 57 deletions

View File

@@ -143,6 +143,7 @@
<Content Include="Themes\Views\document.aspx" />
<Content Include="Themes\Views\EditorTemplates\Parts\Themes.SiteSettings.ascx" />
<Content Include="Themes\Views\layout.ascx" />
<Content Include="Themes\Views\messages.ascx" />
<Content Include="Themes\Views\user.ascx" />
<Content Include="Themes\Views\menu.ascx" />
<Content Include="Themes\Views\Web.config" />

View File

@@ -1,8 +1,6 @@
using System.Globalization;
using System.IO;
using System.Web.Routing;
using Orchard.ContentManagement;
using Orchard.Core.Settings.Models;
using Orchard.Settings;
using Orchard.Themes;
@@ -15,8 +13,7 @@ namespace Orchard.Core.Themes.Services {
}
public ThemeSelectorResult GetTheme(RequestContext context) {
//todo: (heskew) get at the SiteUrl the "right" way. or is this the right way :|
var siteUrl = _siteService.GetSiteSettings().ContentItem.As<SiteSettings>().Record.SiteUrl;
var siteUrl = _siteService.GetSiteSettings().SiteUrl;
//todo: (heskew) get at the admin path in a less hacky way
if (!context.HttpContext.Request.Path.StartsWith(Path.Combine(siteUrl, "admin").Replace("\\", "/"), true, CultureInfo.InvariantCulture))
return null;

View File

@@ -0,0 +1,16 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<NotifyEntry>>" %>
<%@ Import Namespace="Orchard.UI.Notify"%>
<%-- todo: (heskew) not this --%>
<script runat="server">
string CssClassName(NotifyType type) {
switch(type) {
case NotifyType.Error:
return "critical";
case NotifyType.Warning:
return "warning";
}
return "info";
}</script>
<% foreach (var item in Model) { %>
<div class="<%=CssClassName(item.Type) %> message"><%=Html.Encode(item.Message) %></div>
<% } %>