mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
}
|
@@ -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)
|
@@ -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;
|
||||
}
|
@@ -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>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user