mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Updated TheAdmin theme
- Overrided Menu.cshtml to comply with old css --HG-- branch : dev
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<div id="app"><%: Html.ActionLink(T("Project Orchard").ToString(), "Index", new { Area = "", Controller = "Home" })%></div>
|
||||
<div id="site"><%: Html.ActionLink(T("Your Site").ToString(), "Index", new { Area = "", Controller = "Home" })%></div>
|
3
src/Orchard.Web/Themes/TheAdmin/Views/Header.cshtml
Normal file
3
src/Orchard.Web/Themes/TheAdmin/Views/Header.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@model dynamic
|
||||
<div id="app">@Html.ActionLink(T("Project Orchard").ToString(), "Index", new { Area = "", Controller = "Home" })</div>
|
||||
<div id="site">@Html.ActionLink(T("Your Site").ToString(), "Index", new { Area = "", Controller = "Home" })</div>
|
@@ -1,44 +0,0 @@
|
||||
<%@ 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());
|
||||
|
||||
// <experimentation>
|
||||
var thisUser = Html.Resolve<IAuthenticationService>().GetAuthenticatedUser();
|
||||
Model.Header.Add(Display.User(CurrentUser: thisUser), "after");
|
||||
|
||||
// </experimentation>
|
||||
|
||||
|
||||
// these are just hacked together to fire existing partials... can change
|
||||
|
||||
//Model.Zones.AddRenderPartial("header", "Header", Model);
|
||||
//Model.Zones.AddRenderPartial("header:after", "User", Model); // todo: (heskew) should be a user display or widget
|
||||
%>
|
||||
<div id="header" role="banner">
|
||||
<%: Display(Model.Header) %></div>
|
||||
<div id="content">
|
||||
<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">
|
||||
<%: Display(Model.Navigation) %></div>
|
||||
</div>
|
||||
<div id="footer" role="contentinfo">
|
||||
<%: Display(Model.Footer) %></div>
|
||||
|
||||
<%: Display.DumpShapeTable() %>
|
42
src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml
Normal file
42
src/Orchard.Web/Themes/TheAdmin/Views/Layout.cshtml
Normal file
@@ -0,0 +1,42 @@
|
||||
@model dynamic
|
||||
@using Orchard.Security
|
||||
@using Orchard.DisplayManagement.Descriptors
|
||||
@using Orchard.UI.Resources
|
||||
@using Orchard
|
||||
@using Orchard.ContentManagement
|
||||
|
||||
@{
|
||||
Style.Require("TheAdmin");
|
||||
Script.Require("TheAdmin");
|
||||
RegisterLink(new LinkEntry { Condition = "lte IE 8", Rel = "stylesheet", Type = "text/css", Href = Url.Content("../Styles/ie.css") }.AddAttribute("media", "screen, projection"));
|
||||
RegisterLink(new LinkEntry { Condition = "lte IE 6", Rel = "stylesheet", Type = "text/css", Href = Url.Content("../Styles/ie6.css") }.AddAttribute("media", "screen, projection"));
|
||||
// these are just hacked together to fire existing partials... can change
|
||||
Model.Header.Add(Display.Header());
|
||||
|
||||
// experimentation
|
||||
var thisUser = Html.Resolve<IAuthenticationService>().GetAuthenticatedUser();
|
||||
Model.Header.Add(Display.User(CurrentUser: thisUser), "after");
|
||||
|
||||
// these are just hacked together to fire existing partials... can change
|
||||
|
||||
//Model.Zones.AddRenderPartial("header", "Header", Model);
|
||||
//Model.Zones.AddRenderPartial("header:after", "User", Model); // todo: (heskew) should be a user display or widget
|
||||
}
|
||||
<div id="header" role="banner">
|
||||
@Display(Model.Header)</div>
|
||||
<div id="content">
|
||||
<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">
|
||||
@Display(Model.Navigation)</div>
|
||||
</div>
|
||||
<div id="footer" role="contentinfo">
|
||||
@Display(Model.Footer)</div>
|
||||
|
||||
@Display.DumpShapeTable()
|
14
src/Orchard.Web/Themes/TheAdmin/Views/Menu.cshtml
Normal file
14
src/Orchard.Web/Themes/TheAdmin/Views/Menu.cshtml
Normal file
@@ -0,0 +1,14 @@
|
||||
<ul id="navigation">
|
||||
@foreach(var firstLevelMenuItem in Model) {
|
||||
<li>
|
||||
<h3><a href="#">@firstLevelMenuItem.Text</a></h3>
|
||||
<ul class="menuItems">
|
||||
@foreach(var secondLevelMenuItem in firstLevelMenuItem) {
|
||||
<li>
|
||||
<a href="@secondLevelMenuItem.Href">@secondLevelMenuItem.Text</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
@@ -1,4 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<% if (Model.CurrentUser != null) {
|
||||
%><div id="login"><%: T("User:")%> <%: Model.CurrentUser.UserName %> | <%: Html.ActionLink(T("Logout").ToString(), "LogOff", new { Area = "Orchard.Users", Controller = "Account" }) %></div><%
|
||||
} %>
|
2
src/Orchard.Web/Themes/TheAdmin/Views/User.cshtml
Normal file
2
src/Orchard.Web/Themes/TheAdmin/Views/User.cshtml
Normal file
@@ -0,0 +1,2 @@
|
||||
@model dynamic
|
||||
@if (Model.CurrentUser != null) {<div id="login">@T("User:") @Model.CurrentUser.UserName | @Html.ActionLink(T("Logout").ToString(), "LogOff", new { Area = "Orchard.Users", Controller = "Account" })</div>}
|
Reference in New Issue
Block a user