mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-23 13:22:08 +08:00
Taking care of some (mainly cleanup) todos.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044524
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ 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) {
|
||||
@@ -11,7 +11,6 @@ string CssClassName(NotifyType type) {
|
||||
}
|
||||
return "info";
|
||||
}</script>
|
||||
|
||||
<% foreach (var item in Model) { %>
|
||||
<div class="<%=CssClassName(item.Type) %> message"><%=Html.Encode(item.Message) %></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
@@ -98,8 +98,6 @@
|
||||
<Content Include="Views\Account\Register.ascx" />
|
||||
<Content Include="Views\Home\About.ascx" />
|
||||
<Content Include="Views\Home\Index.ascx" />
|
||||
<Content Include="Views\Shared\Error.aspx" />
|
||||
<Content Include="Views\Shared\Site.Master" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -175,7 +173,6 @@
|
||||
<Content Include="Themes\TheAdmin\Theme.txt" />
|
||||
<Content Include="Themes\TheAdmin\Views\layout.ascx" />
|
||||
<Content Include="Themes\TheAdmin\Views\Shared\document.aspx" />
|
||||
<Content Include="Views\Shared\Messages.ascx" />
|
||||
<Content Include="Views\Templates\ThreeColumns.aspx" />
|
||||
<Content Include="Views\Templates\TwoColumns.aspx" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<div class="primary">
|
||||
<h3><%=_Encoded("Page Content") %></h3>
|
||||
<%-- todo: (heskew) change the editors to be self-contained (fieldset > editor) --%>
|
||||
<%=Html.EditorFor(m => m.Revision.Title, "inputTextLarge") %>
|
||||
<%=Html.EditorFor(m => m.Revision.Slug, "inputTextPermalink") %>
|
||||
<% foreach (ContentItem content in Model.Revision.Contents) {
|
||||
|
||||
@@ -88,8 +88,8 @@
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\Admin\Search.aspx" />
|
||||
<Content Include="Views\Home\Index.aspx" />
|
||||
<Content Include="Views\Home\Search.aspx" />
|
||||
<Content Include="Views\Home\Index.ascx" />
|
||||
<Content Include="Views\Home\Search.ascx" />
|
||||
<Content Include="Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Tags.EditTags.ascx" />
|
||||
<Content Include="Views\EditorTemplates\Parts\Tags.SiteSettings.ascx" />
|
||||
|
||||
13
src/Orchard.Web/Packages/Orchard.Tags/Views/Home/Index.ascx
Normal file
13
src/Orchard.Web/Packages/Orchard.Tags/Views/Home/Index.ascx
Normal file
@@ -0,0 +1,13 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagsIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<h2><%=Html.TitleForPage("Tags")%></h2>
|
||||
<%=Html.UnorderedList(
|
||||
Model.Tags,
|
||||
(t, i) => Html.ActionLink(
|
||||
t.TagName,
|
||||
"Search",
|
||||
new { tagName = t.TagName },
|
||||
new { @class = "" /* todo: (heskew) classify according to tag use */ }
|
||||
).ToHtmlString(),
|
||||
"tagCloud")
|
||||
%>
|
||||
@@ -1,16 +0,0 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TagsIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<%-- todo: (heskew) make master-less when we get into theming --%>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2>Tags</h2>
|
||||
<%=Html.UnorderedList(
|
||||
Model.Tags,
|
||||
(t, i) => Html.ActionLink(
|
||||
t.TagName,
|
||||
"Search",
|
||||
new { tagName = t.TagName },
|
||||
new { @class = "" /* todo: (heskew) classify according to tag use */ }
|
||||
).ToHtmlString(),
|
||||
"tagCloud")
|
||||
%>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagsSearchViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<% Html.AddTitleParts("Tags", string.Format("Contents tagged with {0}", Model.TagName)); %>
|
||||
<h2>Contents tagged with <span><%=Html.Encode(Model.TagName) %></span></h2>
|
||||
<%=Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "contentItems") %>
|
||||
@@ -1,8 +0,0 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TagsSearchViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.ContentManagement"%>
|
||||
<%@ Import Namespace="Orchard.Tags.ViewModels"%>
|
||||
<%-- todo: (heskew) make master-less when we get into theming --%>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2>List of contents tagged with <em><%= Model.TagName %></em></h2>
|
||||
<%=Html.UnorderedList(Model.Items, (c, i) => Html.DisplayForItem(c).ToHtmlString(), "contentItems") %>
|
||||
</asp:Content>
|
||||
@@ -10,6 +10,7 @@ Html.RegisterStyle("site.css"); %>
|
||||
Html.Zone("menu"); %>
|
||||
</div>
|
||||
<div id="main"><%
|
||||
Model.Zones.AddRenderPartial("content:-1", "messages", Model.Messages);
|
||||
Html.ZoneBody("content");
|
||||
%> <div id="footer"><%
|
||||
Html.Zone("footer");
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title><%=Html.Title() %></title><%
|
||||
Html.Zone("head", ":metas :styles :scripts"); %>
|
||||
<%-- todo: (heskew) this should come from the admin "page" (partial)
|
||||
todo: (heskew) should have at the minimum something like, say, includeScript(scriptName[, releaseScriptName], scriptPath[, releaseScriptPath])
|
||||
--%><script src="<%=Page.ResolveClientUrl("~/Scripts/jquery-1.3.2.js") %>" type="text/javascript"></script>
|
||||
</head>
|
||||
<body><%
|
||||
Html.ZoneBody("body"); %>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Web.Mvc.HandleErrorInfo>" %>
|
||||
<%-- todo: (heskew) use (and fix, of course) --%>
|
||||
<asp:Content ID="errorTitle" ContentPlaceHolderID="TitleContent" runat="server">
|
||||
Error
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="errorContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2>
|
||||
Sorry, an error occurred while processing your request.
|
||||
</h2>
|
||||
</asp:Content>
|
||||
@@ -1,6 +0,0 @@
|
||||
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
|
||||
<!-- note: this is bad, real bad, on purpose -->
|
||||
<h1><blink><font color=red>DON'T USE THE MASTER PAGE!</font></blink></h1>
|
||||
<h3>See the home and account "pages" in Orchard.Web for examples of the new hotness.</h3>
|
||||
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
|
||||
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
|
||||
Reference in New Issue
Block a user