mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -4,6 +4,6 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<h1><%: Html.TitleForPage(Model.Item.Name) %></h1>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% Html.Zone("primary", ":manage");%>
|
@@ -1,8 +1,11 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
<%
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.RegisterStyle("blog.css", "1");
|
||||
// todo: this is verbose because this view does not inherit from an Orchard base view and so does not
|
||||
// benefit from Style.Require().
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Classic" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Classic_Blog" });
|
||||
%>
|
||||
|
||||
<%-- todo:(nheskew) this will need to be a generated menu --%>
|
||||
|
@@ -4,6 +4,6 @@
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
<h1><%: Html.TitleForPage(Model.Item.Name) %></h1>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% Html.Zone("primary", ":manage");%>
|
@@ -1,8 +1,11 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
<%
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.RegisterStyle("blog.css", "1");
|
||||
// todo: this is verbose because this view does not inherit from an Orchard base view and so does not
|
||||
// benefit from Style.Require().
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "ClassicDark" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "ClassicDark_Blog" });
|
||||
%>
|
||||
|
||||
<%-- todo:(nheskew) this will need to be a generated menu --%>
|
||||
|
@@ -0,0 +1,16 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchViewModel>" %>
|
||||
<% Style.Require("Contoso_Search"); %>
|
||||
<h1 class="page-title"><%:Html.TitleForPage(T("Search").Text)%></h1><%
|
||||
Html.Zone("search");
|
||||
if (!string.IsNullOrWhiteSpace(Model.Query)) {
|
||||
if (Model.PageOfResults.Count() == 0) { %>
|
||||
<p class="search-summary"><%=T.Plural("the <em>one</em> result", "<em>zero</em> results", Model.PageOfResults.Count()) %></p><%
|
||||
}
|
||||
else { %>
|
||||
<p class="search-summary"><%=T.Plural("the <em>one</em> result", "<em>{1} - {2}</em> of <em>{0}</em> results", Model.PageOfResults.TotalItemCount, Model.PageOfResults.StartPosition, Model.PageOfResults.EndPosition)%></p><%
|
||||
}
|
||||
}
|
||||
if (Model.PageOfResults != null && Model.PageOfResults.Count() > 0) { %>
|
||||
<%=Html.UnorderedList(Model.PageOfResults, (r, i) => Html.DisplayForItem(r.Content) , "search-results contentItems") %>
|
||||
<%=Html.Pager(Model.PageOfResults, Model.PageOfResults.PageNumber, Model.DefaultPageSize, new {q = Model.Query}) %><%
|
||||
} %>
|
6
src/Orchard.Web/Themes/Contoso/Zones/Footer.html
Normal file
6
src/Orchard.Web/Themes/Contoso/Zones/Footer.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<h3>
|
||||
MVC Area One</h3>
|
||||
<p>
|
||||
Perfect place to talk about your company. Contoso is a fictious company that provides
|
||||
technology sevices to a varierty of sectors.
|
||||
</p>
|
@@ -7,7 +7,7 @@
|
||||
<%-- todo: (heskew) selectively display to those who have access --%>
|
||||
<h1 class="page-title"><%: Html.TitleForPage(Model.Item.Name) %></h1>
|
||||
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
|
||||
<% Html.Zone("primary"); %>
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
|
||||
<%
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Corporate" });
|
||||
|
||||
Model.Zones.AddRenderPartial("header", "Header", Model);
|
||||
Model.Zones.AddRenderPartial("menu", "Menu", Model);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
|
||||
<%
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Corporate" });
|
||||
|
||||
Model.Zones.AddRenderPartial("header", "Header", Model);
|
||||
Model.Zones.AddRenderPartial("menu", "Menu", Model);
|
||||
|
@@ -1,8 +1,11 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" Inherits="Orchard.Mvc.ViewUserControl<BlogArchivesViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<% Html.RegisterStyle("archives.css"); %>
|
||||
<% Html.RegisterFootScript("archives.js"); %>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
<%
|
||||
Style.Require("Green_Archives");
|
||||
Script.Require(new RequireSettings {ResourceName = "archives.js", Location = ResourceLocation.Foot});
|
||||
%>
|
||||
<div class="archives">
|
||||
<h4 class="collapsible"><%: T("Archives") %></h4><%
|
||||
if (Model.Archives.Count() > 0) {
|
||||
|
@@ -4,8 +4,8 @@
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.Models"%>
|
||||
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% Html.RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
|
||||
<% RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
|
||||
<div class="bloginfo">
|
||||
<h1><%: Html.TitleForPage(Model.Item.Name) %></h1>
|
||||
</div>
|
||||
|
@@ -1,11 +1,12 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
|
||||
<%
|
||||
Html.RegisterStyle("yui.css", "1");
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.RegisterStyle("blog.css", "1");
|
||||
%>
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green_YUI" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green_Blog" });
|
||||
%>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
@@ -1,11 +1,12 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
|
||||
<%
|
||||
Html.RegisterStyle("yui.css", "1");
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.RegisterStyle("blog.css", "1");
|
||||
%>
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green_YUI" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green" });
|
||||
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Green_Blog" });
|
||||
%>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Search.ViewModels.SearchViewModel>" %>
|
||||
<% Html.RegisterStyle("search.css"); %>
|
||||
<% Style.Require("Green_Search"); %>
|
||||
<h1 class="page-title"><%:Html.TitleForPage(T("Search").Text)%></h1><%
|
||||
if (!string.IsNullOrWhiteSpace(Model.Query)) {
|
||||
if (Model.PageOfResults.Count() == 0) { %>
|
||||
|
@@ -1,21 +1,12 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<%-- //todo: (heskew) this should really be using the IResourceManager if it's to be a theme especially for the jquery dep (w/out needing to copy into this theme...)
|
||||
var jquery = ResolveUrl("~/Modules/Orchard.Themes/Scripts/jquery-1.4.2.js");
|
||||
Model.Zones.AddAction("head:scripts", html =>
|
||||
html.ViewContext.Writer.Write(@"<script type=""text/javascript"" src=""" + jquery + @"""></script>"));
|
||||
var basejs = ResolveUrl("~/Modules/Orchard.Themes/Scripts/base.js");
|
||||
Model.Zones.AddAction("content:after", html =>
|
||||
html.ViewContext.Writer.Write(@"<script type=""text/javascript"" src=""" + basejs + @"""></script>"));
|
||||
var setupjs = ResolveUrl("~/Modules/Orchard.Setup/Scripts/setup.js");
|
||||
Model.Zones.AddAction("content:after", html =>
|
||||
html.ViewContext.Writer.Write(@"<script type=""text/javascript"" src=""" + setupjs + @"""></script>"));
|
||||
var siteCss = ResolveUrl("../Styles/site.css");
|
||||
Model.Zones.AddAction("head:styles", html =>
|
||||
html.ViewContext.Writer.Write(@"<link rel=""stylesheet"" type=""text/css"" href=""" + siteCss + @"""/>"));
|
||||
var ie6Css = ResolveUrl("../Styles/ie6.css");
|
||||
Model.Zones.AddAction("head:styles", html =>
|
||||
html.ViewContext.Writer.Write(@"<!--[if lte IE 6]><link rel=""stylesheet"" type=""text/css"" media=""screen, projection"" href=""" + ie6Css + @"""/><![endif]-->"));
|
||||
--%>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
<%
|
||||
Script.Require("jQuery", "1.4.2");
|
||||
Script.Require("Theme_Base");
|
||||
Script.Require("Setup");
|
||||
Style.Require("SafeMode");
|
||||
RegisterLink(new LinkEntry { Condition = "lte IE 6", Rel = "stylesheet", Type="text/css", Href = ResolveUrl("../Styles/ie6.css")}.AddAttribute("media", "screen, projection"));
|
||||
%>
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
<h1>
|
||||
|
@@ -1,9 +1,14 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<%@ Import Namespace="Orchard.Security" %>
|
||||
<%@ Import Namespace="Orchard.DisplayManagement.Descriptors" %>
|
||||
<%@ Import Namespace="Orchard.UI.Resources" %>
|
||||
<%@ Import Namespace="Orchard" %>
|
||||
<%@ Import Namespace="Orchard.ContentManagement" %>
|
||||
<%
|
||||
Style.Require("TheAdmin");
|
||||
Script.Require("TheAdmin");
|
||||
RegisterLink(new LinkEntry { Condition = "lte IE 8", Rel = "stylesheet", Type = "text/css", Href = ResolveUrl("../Styles/ie.css") }.AddAttribute("media", "screen, projection"));
|
||||
RegisterLink(new LinkEntry { Condition = "lte IE 6", Rel = "stylesheet", Type = "text/css", Href = ResolveUrl("../Styles/ie6.css") }.AddAttribute("media", "screen, projection"));
|
||||
// these are just hacked together to fire existing partials... can change
|
||||
Model.Header.Add(Display.Header());
|
||||
|
||||
@@ -13,10 +18,6 @@
|
||||
|
||||
// </experimentation>
|
||||
|
||||
Html.RegisterStyle("site.css", "1");
|
||||
Html.RegisterStyle("ie.css", "1").WithCondition("if (lte IE 8)").ForMedia("screen, projection");
|
||||
Html.RegisterStyle("ie6.css", "1").WithCondition("if (lte IE 6)").ForMedia("screen, projection");
|
||||
Html.RegisterFootScript("admin.js", "1");
|
||||
|
||||
// these are just hacked together to fire existing partials... can change
|
||||
|
||||
@@ -29,6 +30,9 @@
|
||||
<div id="navshortcut">
|
||||
<a href="#Menu-admin">
|
||||
<%: T("Skip to navigation") %></a></div>
|
||||
<div id="messages">
|
||||
<%: Display(Model.Messages) %>
|
||||
</div>
|
||||
<div id="main" role="main">
|
||||
<%: Display(Model.Content) %></div>
|
||||
<div id="menu">
|
||||
|
43
src/Orchard.Web/Themes/ThemesResourceManifest.cs
Normal file
43
src/Orchard.Web/Themes/ThemesResourceManifest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Orchard.UI.Resources;
|
||||
|
||||
namespace Orchard.Themes {
|
||||
public class ThemesResourceManifest : ResourceManifest {
|
||||
public ThemesResourceManifest() {
|
||||
DefineStyle("Admin").SetUrl("~/modules/orchard.themes/styles/admin.css");
|
||||
|
||||
DefineScript("ThemeBase").SetUrl("~/modules/orchard.themes/scripts/base.js").SetDependencies("jQuery");
|
||||
DefineStyle("Theme").SetUrl("~/modules/orchard.themes/styles/site.css"); // todo: missing
|
||||
DefineStyle("ThemeSpecial").SetUrl("~/modules/orchard.themes/styles/special.css");
|
||||
|
||||
DefineStyle("Classic").SetUrl("~/themes/classic/styles/site.css");
|
||||
DefineStyle("Classic_Blog").SetUrl("~/themes/classic/styles/blog.css");
|
||||
|
||||
DefineStyle("ClassicDark").SetUrl("~/themes/classicdark/styles/site.css");
|
||||
DefineStyle("ClassicDark_Blog").SetUrl("~/themes/classicdark/styles/blog.css");
|
||||
|
||||
DefineStyle("Contoso").SetUrl("~/themes/contoso/styles/site.css");
|
||||
DefineStyle("Contoso_Search").SetUrl("~/themes/contoso/styles/search.css");
|
||||
|
||||
// todo: include and define the min.js version too
|
||||
// todo: move EasySlider to common location
|
||||
DefineScript("EasySlider").SetUrl("~/themes/contoso/scripts/easySlider.js").SetDependencies("jQuery");
|
||||
|
||||
DefineStyle("Corporate").SetUrl("~/themes/corporate/styles/site.css");
|
||||
|
||||
DefineStyle("Green").SetUrl("~/themes/green/styles/site.css");
|
||||
DefineStyle("Green_Blog").SetUrl("~/themes/green/styles/blog.css");
|
||||
DefineStyle("Green_YUI").SetUrl("~/themes/green/styles/yui.css");
|
||||
|
||||
DefineStyle("SafeMode").SetUrl("~/themes/green/styles/site.css");
|
||||
|
||||
DefineStyle("TheAdmin").SetUrl("~/themes/green/styles/site.css");
|
||||
DefineStyle("TheAdmin_IE").SetUrl("~/themes/green/styles/ie.css");
|
||||
DefineStyle("TheAdmin_IE6").SetUrl("~/themes/green/styles/ie6.css");
|
||||
DefineScript("TheAdmin").SetUrl("~/themes/theadmin/scripts/admin.js").SetDependencies("jQuery");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user