mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +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>
|
||||
}
|
Reference in New Issue
Block a user