Some minor post-mvc3 beta upgrade fixes

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-07 12:50:51 -07:00
parent 1e22892c71
commit 6dbbe6e1f0
9 changed files with 21 additions and 10 deletions

Binary file not shown.

View File

@@ -1,7 +1,7 @@
@model BodyDisplayViewModel
@using Orchard.Core.Common.ViewModels;
@/* begin: knowingly broken HTML (hence the ManageWrapperPre and ManageWrapperPost templates)
@* begin: knowingly broken HTML (hence the ManageWrapperPre and ManageWrapperPost templates)
we need "wrapper templates" (among other functionality) in the future of UI composition
please do not delete or the front end will be broken when the user is authenticated. */
please do not delete or the front end will be broken when the user is authenticated. *@
</div>
@/* begin: knowingly broken HTML */
@* begin: knowingly broken HTML *@

View File

@@ -1,8 +1,8 @@
@model BodyDisplayViewModel
@using Orchard.Core.Common.ViewModels;
@/*//doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data
//also, doing this here, inline, until we have a pluggable processing model (both in and out)
//also, ...this is ugly*/
@*doing excerpt generation on the way out for now so we don't stick ourselves with needing to regen excerpts for existing data
also, doing this here, inline, until we have a pluggable processing model (both in and out)
also, ...this is ugly *@
@{
var body = new HtmlString(Html.Excerpt(Model.Html.ToString(), 200).ToString().Replace(Environment.NewLine, "</p>" + Environment.NewLine + "<p>"));
}

View File

@@ -1,7 +1,7 @@
@model SettingsDictionary
@using Orchard.ContentManagement.MetaData.Models;
@if (Model.Any()) {
@/*<h4>@T("Global Settings")</h4>*/
@*<h4>@T("Global Settings")</h4>*@
<dl class="settings">@foreach (var setting in Model) {
<dt>@setting.Key</dt>
<dd>@setting.Value</dd>}

View File

@@ -24,7 +24,7 @@
<col id="Edit" />
</colgroup>
<thead>
<th scope="col">&nbsp;&darr;@/*todo: (heskew) something more appropriate for "this applies to the bulk actions*/</th>
<th scope="col">&nbsp;&darr;@*todo: (heskew) something more appropriate for "this applies to the bulk actions*@</th>
<th scope="col">@T("Name")</th>
<th scope="col"></th>
</thead>

View File

@@ -11,6 +11,7 @@
Html.AddPageClassNames(new[]{"icanhassidebar"});
}
}
@Model.TitleFromMenu
<div id="layout-wrapper">
@Display.User()
<header id="layout-header">

View File

@@ -1,4 +1,8 @@
<!-- Model is Model.Menu from the layout (Page.Menu) -->
@{
Layout.TitleFromMenu = "hi there!";
}
<nav>
@{
// these should move somewhere else

View File

@@ -16,13 +16,15 @@ namespace Orchard.Mvc.ViewEngines.Razor {
public abstract class WebViewPage<TModel> : System.Web.Mvc.WebViewPage<TModel>, IOrchardViewPage {
private ScriptRegister _scriptRegister;
private ResourceRegister _stylesheetRegister;
private object _display;
private object _new;
private Localizer _localizer = NullLocalizer.Instance;
private object _display;
private object _layout;
private WorkContext _workContext;
private object _new;
public Localizer T { get { return _localizer; } }
public dynamic Display { get { return _display; } }
public dynamic Layout { get { return _layout; } }
public WorkContext WorkContext { get { return _workContext; } }
public dynamic New { get { return _new; } }
@@ -73,6 +75,7 @@ namespace Orchard.Mvc.ViewEngines.Razor {
_localizer = LocalizationUtilities.Resolve(ViewContext, VirtualPath);
_display = DisplayHelperFactory.CreateHelper(ViewContext, this);
_layout = _workContext.Layout;
_new = ShapeHelperFactory.CreateHelper();
}

View File

@@ -102,6 +102,9 @@
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\lib\dlr\Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure">
<HintPath>..\..\lib\aspnetmvc\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>