mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Removing ContentQueries placeholder
This approach may return in the future, but is out of scope for v1 --HG-- branch : dev
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentQueries.Models;
|
||||
|
||||
namespace Orchard.ContentQueries.Drivers {
|
||||
public class ContentQueryPartDriver : ContentPartDriver<ContentQueryPart> {
|
||||
protected override DriverResult Display(ContentQueryPart part, string displayType, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_QueriedContents",
|
||||
list => {
|
||||
var contentItems = shapeHelper.List();
|
||||
//contentItems.AddRange(theContentItems);
|
||||
|
||||
list.ContentItems(contentItems);
|
||||
|
||||
if (true) // pager
|
||||
list.Pager(/* pager configuration */);
|
||||
|
||||
return list;
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentQueryPart part, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_ContentQueries_Configuration",
|
||||
() => shapeHelper.EditorTemplate(TemplateName: "Parts/ContentQueries.Configuration", Model: part, Prefix: Prefix));
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentQueryPart part, ContentManagement.IUpdateModel updater, dynamic shapeHelper) {
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.ContentQueries {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
public int Create() {
|
||||
//SchemaBuilder.CreateTable("ContentQueryPartRecord",
|
||||
// table => table
|
||||
// .ContentPartRecord()
|
||||
// );
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("ContentQuery",
|
||||
cfg => cfg
|
||||
.WithPart("ContentQueryPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("RoutePart")
|
||||
.WithPart("MenuPart")
|
||||
.Creatable()
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("ContentQueryWidget",
|
||||
cfg => cfg
|
||||
.WithPart("ContentQueryPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("WidgetPart")
|
||||
.WithSetting("Stereotype", "Widget")
|
||||
);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.ContentQueries.Models {
|
||||
public class ContentQueryPart : ContentPart<ContentQueryPartRecord> {}
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.ContentQueries.Models {
|
||||
public class ContentQueryPartRecord : ContentPartRecord {}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
Name: Content Queries
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 0.8.0
|
||||
OrchardVersion: 0.8.0
|
||||
Features:
|
||||
Orchard.ContentQueries:
|
||||
Name: Queried Content Lists
|
||||
Description: Use simple queries to create orderd lists of content items with optional paging support.
|
||||
Dependencies: Contents, Common
|
||||
Category: Content
|
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{848126A0-9C88-415A-868F-F5F03449D0B6}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.ContentQueries</RootNamespace>
|
||||
<AssemblyName>Orchard.ContentQueries</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Mvc">
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Drivers\ContentQueryPartDriver.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\ContentQueryPart.cs" />
|
||||
<Compile Include="Models\ContentQueryPartRecord.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<None Include="Views\EditorTemplates\Parts\ContentQueries.Configuration.cshtml" />
|
||||
<None Include="Views\Parts\QueriedContents.cshtml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>57372</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@@ -1,19 +0,0 @@
|
||||
<Placement>
|
||||
<!-- available display shapes -->
|
||||
<!--
|
||||
Parts_QueriedContents
|
||||
-->
|
||||
<!-- edit "shape" -->
|
||||
<Place Parts_ContentQueries_Configuration="Content:2"/>
|
||||
<!-- default positioning -->
|
||||
<Match ContentType="ContentQuery">
|
||||
<Match DisplayType="Detail">
|
||||
<Place Parts_QueriedContents="Content"/>
|
||||
</Match>
|
||||
</Match>
|
||||
<Match ContentType="ContentQueryWidget">
|
||||
<Match DisplayType="Detail">
|
||||
<Place Parts_QueriedContents="Content"/>
|
||||
</Match>
|
||||
</Match>
|
||||
</Placement>
|
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Orchard.ContentQueries")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0003600f-7634-43b0-9a63-68ee7c247db3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.8.0")]
|
||||
[assembly: SecurityTransparent]
|
@@ -1 +0,0 @@
|
||||
<p>content query config here -> x</p>
|
@@ -1,14 +0,0 @@
|
||||
@{
|
||||
IEnumerable<object> queriedContents = Model.ContentItems;
|
||||
Model.ContentItems.Classes.Add("content-items");
|
||||
Model.ContentItems.Classes.Add("queried-contents");
|
||||
}
|
||||
@if (queriedContents != null && queriedContents.Count() > 0) {
|
||||
@Display(Model.ContentItems)
|
||||
if (Model.Pager != null) {
|
||||
@Display(Model.Pager)
|
||||
}
|
||||
}
|
||||
else {
|
||||
<p>@T("There are no contents.")</p>
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}"
|
||||
@@ -93,8 +92,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Themes", "Orchard.Web\Theme
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.PublishLater", "Orchard.Web\Modules\Orchard.PublishLater\Orchard.PublishLater.csproj", "{C889167C-E52C-4A65-A419-224B3D1B957D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.ContentQueries", "Orchard.Web\Modules\Orchard.ContentQueries\Orchard.ContentQueries.csproj", "{848126A0-9C88-415A-868F-F5F03449D0B6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Lists", "Orchard.Web\Modules\Orchard.Lists\Orchard.Lists.csproj", "{137906EA-15FE-4AD8-A6A0-27528F0477D6}"
|
||||
EndProject
|
||||
Global
|
||||
@@ -106,10 +103,6 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{50B779EA-EC00-4699-84C0-03B395C365D2}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -500,16 +493,13 @@ Global
|
||||
{C889167C-E52C-4A65-A419-224B3D1B957D}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{C889167C-E52C-4A65-A419-224B3D1B957D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C889167C-E52C-4A65-A419-224B3D1B957D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Coverage|Any CPU.Build.0 = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.FxCop|Any CPU.Build.0 = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -539,7 +529,7 @@ Global
|
||||
{AB3C207C-0126-4143-8D62-1119DF80D366} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{C889167C-E52C-4A65-A419-224B3D1B957D} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{848126A0-9C88-415A-868F-F5F03449D0B6} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
@@ -552,6 +542,5 @@ Global
|
||||
{8A4E42CE-79F8-4BE2-8B1E-A6B83432123B} = {383DBA32-4A3E-48D1-AAC3-75377A694452}
|
||||
{0DFA2E10-96C8-4E05-BC10-B710B97ECCDE} = {383DBA32-4A3E-48D1-AAC3-75377A694452}
|
||||
{CB70A642-8CEC-4DDE-8C9F-AD08900EC98D} = {74492CBC-7201-417E-BC29-28B4C25A58B0}
|
||||
{137906EA-15FE-4AD8-A6A0-27528F0477D6} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Reference in New Issue
Block a user