Updated TheAdmin theme

- Overrided Menu.cshtml to comply with old css

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-09-17 13:18:19 -07:00
parent 67427b20c2
commit d3bc587e1d
12 changed files with 78 additions and 56 deletions

View File

@@ -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>

View 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>

View File

@@ -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() %>

View 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()

View 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>

View File

@@ -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><%
} %>

View 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>}