mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
Some shape template cleanup (mainly in core shapes)
--HG-- branch : theming
This commit is contained in:
@@ -337,7 +337,6 @@
|
||||
<Content Include="Shapes\Styles\special.css" />
|
||||
<Content Include="Shapes\Views\DisplayTemplates\Items\ContentItem.ascx" />
|
||||
<Content Include="Shapes\Views\EditorTemplates\Items\ContentItem.ascx" />
|
||||
<Content Include="Shapes\Views\Header.ascx" />
|
||||
<Content Include="Shapes\Views\HeadPreload.ascx" />
|
||||
<Content Include="Shapes\Views\NotFound.ascx" />
|
||||
<Content Include="Shapes\Views\UI\Switchable.ascx" />
|
||||
@@ -402,15 +401,15 @@
|
||||
<None Include="Contents\Views\Content.cshtml" />
|
||||
<None Include="Contents\Views\Item\Display.cshtml" />
|
||||
<None Include="HomePage\Views\HomePage.cshtml" />
|
||||
<None Include="Shapes\Views\Item.cshtml" />
|
||||
<None Include="Shapes\Views\Document.aspx_" />
|
||||
<None Include="Shapes\Views\Document.cshtml" />
|
||||
<None Include="Shapes\Views\Layout.ascx_" />
|
||||
<None Include="Shapes\Views\User.cshtml" />
|
||||
<None Include="Shapes\Views\Header.cshtml" />
|
||||
<None Include="Shapes\Views\Item.cshtml" />
|
||||
<None Include="Shapes\Views\Layout.cshtml" />
|
||||
<None Include="Shapes\Views\Menu.ascx_" />
|
||||
<None Include="Shapes\Views\Menu.cshtml" />
|
||||
<None Include="Shapes\Views\MenuItem.cshtml" />
|
||||
<None Include="Shapes\Views\Messages.ascx_" />
|
||||
<None Include="Shapes\Views\User.ascx_" />
|
||||
<Content Include="Shapes\Views\Web.config" />
|
||||
<None Include="Shapes\Views\Zone.cshtml" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"
|
||||
%><!DOCTYPE html>
|
||||
<html lang="en" class="static">
|
||||
<head>
|
||||
<title><%: Html.Title(Html.SiteName()) %></title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<%=ResolveUrl("../Content/orchard.ico") %>" /><%
|
||||
//todo: (heskew) have resource modules that can be leaned on (like a jQuery module that knows about various CDNs and jQuery's version and min naming schemes)
|
||||
//todo: (heskew) this is an interim solution to inlude jQuery in every page and still allow that to be overriden in some theme by it containing a headScripts partial
|
||||
Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model);
|
||||
Html.Zone("head", ":metas :styles :scripts"); %>
|
||||
<script type="text/javascript">document.documentElement.className="dyn";</script>
|
||||
</head>
|
||||
<body class="<%: Html.ClassForPage() %>"><%
|
||||
Html.ZoneBody("body"); %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +1,21 @@
|
||||
@using Orchard.Mvc.Html
|
||||
@{
|
||||
Model.Body.Add(Model.Metadata.ChildContent, "5");
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
@//"en" needs to change to the current culture, btw
|
||||
@//all inline styles for tmp reference only
|
||||
<html lang="en" class="static" style="background:#000;color:#fff;padding:5px">
|
||||
<head>
|
||||
<title>Page Title@{/*View.Page.Title*/}</title>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="static @Html.ClassForPage()">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>@View.Page .Title</title>
|
||||
@//could be a resource - at least need to get at the right location and this is something
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/modules/orchard.themes/Content/orchard.ico" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/modules/orchard.themes/Content/orchard.ico" />
|
||||
@{
|
||||
//todo: (heskew) have resource modules that can be leaned on (like a jQuery module that knows about various CDNs and jQuery's version and min naming schemes)
|
||||
//todo: (heskew) this is an interim solution to inlude jQuery in every page and still allow that to be overriden in some theme by it containing a headScripts partial
|
||||
}
|
||||
@//Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model);
|
||||
@//Html.Zone("head", ":metas :styles :scripts"); %>
|
||||
<script type="text/javascript">document.documentElement.className="dyn";</script>
|
||||
</head>
|
||||
<body class="@Html.ClassForPage()">
|
||||
<section>
|
||||
<h1>document template</h1>
|
||||
@Display(Model.Body)
|
||||
</section>
|
||||
<script>(function(d){d.className="dyn "+d.className.substring(7,d.length);})(document.documentElement);</script>
|
||||
</head>
|
||||
<body>
|
||||
@{ Model.Body.Add(Model.Metadata.ChildContent, "5"); }
|
||||
@Display(Model.Body)
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,8 +1,3 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
<%
|
||||
// a CSS file for styling things (e.g. content item edit buttons) for users with elevated privileges (in this case, anyone who is authenticated)
|
||||
if (Request.IsAuthenticated) { Html.RegisterStyle("special.css"); }
|
||||
|
||||
Html.RegisterScript("jquery-1.4.2.js", "1"); // <- change to .min.js for use on a real site :)
|
||||
Html.RegisterFootScript("base.js", "1");
|
||||
%>
|
||||
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<div id="title"><%: Html.SiteName() %></div>
|
||||
4
src/Orchard.Web/Core/Shapes/Views/Header.cshtml
Normal file
4
src/Orchard.Web/Core/Shapes/Views/Header.cshtml
Normal file
@@ -0,0 +1,4 @@
|
||||
@using Orchard.Mvc.Html
|
||||
<header>
|
||||
<h1>@Html.SiteName()</h1>
|
||||
</header>
|
||||
@@ -1,32 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
||||
Html.RegisterStyle("site.css");
|
||||
Model.Zones.AddRenderPartial("header", "Header", Model);
|
||||
Model.Zones.AddRenderPartial("header:after", "User", Model);
|
||||
Model.Zones.AddRenderPartial("menu", "Menu", Model);
|
||||
%>
|
||||
<div id="page">
|
||||
<div id="header"><%
|
||||
Html.Zone("header");
|
||||
Html.Zone("menu"); %>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="contentwrapper">
|
||||
<div id="content"><%
|
||||
Html.ZoneBody("primary");
|
||||
%></div>
|
||||
</div>
|
||||
<div id="sidebarwrapper">
|
||||
<div id="sidebar"><%
|
||||
Html.Zone("secondary");
|
||||
%></div>
|
||||
</div>
|
||||
<%-- put outside of #main? --%>
|
||||
<div id="footerwrapper">
|
||||
<div id="footer"><%
|
||||
Html.Zone("footer");
|
||||
%></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
src/Orchard.Web/Core/Shapes/Views/Layout.cshtml
Normal file
32
src/Orchard.Web/Core/Shapes/Views/Layout.cshtml
Normal file
@@ -0,0 +1,32 @@
|
||||
@// Html.RegisterStyle("site.css");
|
||||
<div id="page">
|
||||
<div id="header">
|
||||
@{
|
||||
Model.Header.Add(Display.Header(), "5");
|
||||
Model.Header.Add(Display.User(), "10");
|
||||
Model.Menu.Add(Display.Menu(), "5");
|
||||
}
|
||||
@Display(Model.Header)
|
||||
@Display(Model.Menu)
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="content-wrapper">
|
||||
<div id="content">
|
||||
@Display(Model.Content)
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebar-wrapper">
|
||||
<div id="sidebar">
|
||||
@Display(Model.Sidebar)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer-wrapper">
|
||||
<div id="footer">
|
||||
@{
|
||||
Model.Footer.Add(Display.Footer(), "5");
|
||||
}
|
||||
@Display(Model.Footer)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||
<div id="logindisplay">
|
||||
<% if (Request.IsAuthenticated) { %>
|
||||
<%: T("Welcome, <strong>{0}</strong>!", Page.User.Identity.Name) %>
|
||||
<%: Html.ActionLink(T("Log Off").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })%>
|
||||
| <%: Html.ActionLink("Admin", "Index", new {Area = "Dashboard", Controller = "Admin"})%>
|
||||
<% } else { %>
|
||||
<%: Html.ActionLink(T("Log On").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
13
src/Orchard.Web/Core/Shapes/Views/User.cshtml
Normal file
13
src/Orchard.Web/Core/Shapes/Views/User.cshtml
Normal file
@@ -0,0 +1,13 @@
|
||||
@using System.Web.Mvc
|
||||
@using Orchard.Security
|
||||
@{ var user = Html.Resolve<IAuthenticationService>().GetAuthenticatedUser(); }
|
||||
|
||||
<div id="user-display">
|
||||
@if (Request.IsAuthenticated) {
|
||||
@T("Welcome, <strong>{0}</strong>!", user.UserName)
|
||||
@Html.ActionLink(T("Log Off").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })
|
||||
@:| @Html.ActionLink("Admin", "Index", new {Area = "Dashboard", Controller = "Admin"})
|
||||
} else {
|
||||
@Html.ActionLink(T("Log On").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })
|
||||
}
|
||||
</div>
|
||||
@@ -142,8 +142,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Config\Sample.Host.config" />
|
||||
<None Include="Themes\Contoso\Views\Header.ascx_" />
|
||||
<None Include="Themes\Contoso\Views\HomePage\Home\Index.cshtml" />
|
||||
<None Include="Themes\Contoso\Views\Layout-HomePage.cshtml" />
|
||||
<None Include="Themes\Contoso\Views\Layout.ascx_" />
|
||||
<None Include="Themes\Contoso\Views\Layout.HomePage.ascx_" />
|
||||
<None Include="Themes\TheAdmin\Styles\images\icons.psd" />
|
||||
<Content Include="Themes\ClassicDark\Content\Images\bodyBackgroundgrey.gif" />
|
||||
<Content Include="Themes\ClassicDark\Content\Images\sidebarBackground.gif" />
|
||||
@@ -208,17 +210,14 @@
|
||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Comments.Comments.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\DisplayTemplates\Parts\Tags.ShowTags.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\Header.ascx" />
|
||||
<Content Include="Themes\Contoso\Scripts\easySlider.js" />
|
||||
<Content Include="Themes\Contoso\Styles\site.css" />
|
||||
<Content Include="Themes\Contoso\Theme.png" />
|
||||
<Content Include="Themes\Contoso\Theme.txt" />
|
||||
<Content Include="Themes\Contoso\Views\Footer.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\Layout.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\_Layout.HomePage.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\ListOfComments.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\LogOn.ascx" />
|
||||
<Content Include="Themes\Contoso\Views\User.ascx" />
|
||||
<None Include="Themes\Contoso\Views\User.ascx_" />
|
||||
<Content Include="Themes\Corporate\Content\Images\bkg.jpg" />
|
||||
<Content Include="Themes\Corporate\Content\Images\consult-bkg.png" />
|
||||
<Content Include="Themes\Corporate\Content\Images\content-bkg.png" />
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
@using Orchard.Mvc.Html
|
||||
<section style="background:#333;color:#fff;padding:10px;">
|
||||
<h1>Contoso Layout.HomePage template</h1>
|
||||
@Html.RenderOrchardBody()
|
||||
</section>
|
||||
Reference in New Issue
Block a user