mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing widget filtering
--HG-- branch : 1.x
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Orchard.Widgets.Filters {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerable<WidgetPart> widgetParts = _widgetsService.GetWidgets(activeLayerIds.ToArray());
|
IEnumerable<WidgetPart> widgetParts = _widgetsService.GetWidgets(layerIds: activeLayerIds.ToArray());
|
||||||
|
|
||||||
// Build and add shape to zone.
|
// Build and add shape to zone.
|
||||||
var zones = workContext.Layout.Zones;
|
var zones = workContext.Layout.Zones;
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
<UpgradeBackupLocation>
|
<UpgradeBackupLocation>
|
||||||
</UpgradeBackupLocation>
|
</UpgradeBackupLocation>
|
||||||
<OldToolsVersion>4.0</OldToolsVersion>
|
<OldToolsVersion>4.0</OldToolsVersion>
|
||||||
|
<IISExpressSSLPort />
|
||||||
|
<IISExpressAnonymousAuthentication />
|
||||||
|
<IISExpressWindowsAuthentication />
|
||||||
|
<IISExpressUseClassicPipelineMode />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@@ -42,7 +46,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using NHibernate.Criterion;
|
|
||||||
using Orchard.ContentManagement;
|
using Orchard.ContentManagement;
|
||||||
using Orchard.ContentManagement.Aspects;
|
|
||||||
using Orchard.Environment.Extensions;
|
using Orchard.Environment.Extensions;
|
||||||
using Orchard.Environment.Extensions.Models;
|
using Orchard.Environment.Extensions.Models;
|
||||||
using Orchard.Environment.Features;
|
using Orchard.Environment.Features;
|
||||||
@@ -73,7 +71,7 @@ namespace Orchard.Widgets.Services {
|
|||||||
public IEnumerable<WidgetPart> GetWidgets(int[] layerIds) {
|
public IEnumerable<WidgetPart> GetWidgets(int[] layerIds) {
|
||||||
return _contentManager
|
return _contentManager
|
||||||
.Query<WidgetPart, WidgetPartRecord>()
|
.Query<WidgetPart, WidgetPartRecord>()
|
||||||
.Where<CommonPartRecord>(x => x.Container.Id.IsIn(layerIds))
|
.Where<CommonPartRecord>(x => layerIds.Contains(x.Container.Id))
|
||||||
.WithQueryHints(new QueryHints().ExpandRecords<CommonPartRecord>())
|
.WithQueryHints(new QueryHints().ExpandRecords<CommonPartRecord>())
|
||||||
.List();
|
.List();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user