--HG--
branch : 1.x
This commit is contained in:
Renaud Paquay
2011-04-08 11:50:25 -07:00
25 changed files with 320 additions and 58 deletions

View File

@@ -4,6 +4,7 @@ using System.Web.Mvc;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Aspects;
using Orchard.ContentManagement.Drivers;
using Orchard.Core.Common.Models;
using Orchard.Core.Containers.Models;
using Orchard.Core.Containers.ViewModels;
using Orchard.Localization;
@@ -27,7 +28,7 @@ namespace Orchard.Core.Containers.Drivers {
return ContentShape(
"Parts_Containable_Edit",
() => {
var commonPart = part.As<ICommonPart>();
var commonPart = part.As<CommonPart>();
var model = new ContainableViewModel();
if (commonPart != null && commonPart.Container != null) {
@@ -37,10 +38,12 @@ namespace Orchard.Core.Containers.Drivers {
if (updater != null) {
var oldContainerId = model.ContainerId;
updater.TryUpdateModel(model, "Containable", null, null);
if (oldContainerId != model.ContainerId)
if (oldContainerId != model.ContainerId) {
if (commonPart != null) {
commonPart.Container = _contentManager.Get(model.ContainerId, VersionOptions.Latest);
var containerItem = _contentManager.Get(model.ContainerId, VersionOptions.Latest);
commonPart.Record.Container = containerItem == null ? null : containerItem.Record;
}
}
}
// note: string.isnullorempty not being recognized by linq-to-nhibernate hence the inline or

View File

@@ -1,4 +1,9 @@
@Display(Model.ContentItems)
@{
IEnumerable<object> items = Model.ContentItems;
Model.ContentItems.Classes.Add("content-items");
Model.ContentItems.Classes.Add("list-items");
}
@Display(items)
@if (Model.ShowPager) {
@Display(Model.Pager)
}

View File

@@ -1 +1,6 @@
@Display(Model.ContentItems)
@{
IEnumerable<object> items = Model.ContentItems;
Model.ContentItems.Classes.Add("content-items");
Model.ContentItems.Classes.Add("list-items");
}
@Display(items)

View File

@@ -8,9 +8,9 @@ background-position:0 -30px !important;
background-image:url(images/menu.content.png);
}
/* subnav */
#menu .menu-admin .selected .menuItems a {
#menu .menu-admin .section-new .menuItems a {
background-position:0 4px;
}
#menu .menu-admin .selected .menuItems a:hover, #menu .menu-admin .selected .menuItems .selected a {
#menu .menu-admin .section-new .menuItems a:hover, #menu .menu-admin .section-new .menuItems .selected a {
background-position:0 -28px;
}

View File

@@ -24,9 +24,13 @@
<h2 class="contribute">Contribute back.</h2>
<p>Help grow Orchard. We encourage contributions of all sorts, including code submissions, documentation, translations, feature recommendations, and more.Here are some ways to <a href="http://orchardproject.net/contribution" target="_blank">give back to the project</a>.</p>
</div>
</section>
<h2 class="advisory">@T("Advisory from <a href=\"{0}\">{0}</a>", "http://www.orchardproject.net/advisory")</h2>
<iframe id="advisory" src="http://www.orchardproject.net/advisory" frameborder="0" height="40" width="100%" scrolling="no">
<div class="help-item">
<h2 class="advisory">@T("Stay up to date.")</h2>
<iframe id="advisory" src="http://www.orchardproject.net/advisory" frameborder="0" height="100%" width="100%" scrolling="no">
<p>@T("Your browser does not support iframes. You can't see advisory messages.")</p>
</iframe>
</div>
</section>