ContentType MetaData UI

--HG--
branch : dev
This commit is contained in:
khavas
2010-05-19 10:12:04 -07:00
parent 5667e6a999
commit 106eff8d3e
14 changed files with 688 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using System.Linq;
using Orchard.UI.Navigation;
namespace Orchard.MetaData {
public class AdminMenu : INavigationProvider {
//private readonly IBlogService _blogService;
public AdminMenu() {
//_blogService = blogService;
}
public string MenuName { get { return "admin"; } }
public void GetNavigation(NavigationBuilder builder)
{
builder.Add("Content Types", "5",
menu => menu
.Add("Content Types", "1.0", item => item.Action("ContentTypeList", "MetaData", new { area = "Orchard.MetaData" }).Permission(Permissions.ManageMetaData))
);
}
}
}

View File

@@ -0,0 +1,79 @@
using System.Web.Mvc;
using Orchard.ContentManagement.MetaData.Services;
using Orchard.Themes;
using Orchard.Data;
using Orchard.ContentManagement.Records;
using Orchard.ContentManagement.MetaData.Records;
using Orchard.MetaData.ViewModels;
namespace Orchard.MetaData.Controllers
{
[Themed]
public class MetaDataController : Controller
{
private readonly IRepository<ContentTypeRecord> _ctps;
private readonly IContentTypeService _contentTypeService;
public MetaDataController(IRepository<ContentTypeRecord> ctps, IContentTypeService contentTypeService){
_ctps = ctps;
_contentTypeService = contentTypeService;
}
//
// GET: /ContentTypeList/
public ActionResult ContentTypeList(string id) {
var contentTypes = _contentTypeService.GetContentTypes();
var contentTypePartNames = _contentTypeService.GetContentTypePartNames();
var model = new ContentTypesIndexViewModel();
foreach(ContentTypeRecord contentType in contentTypes) {
var contentTypeEntry = new ContentTypeEntry() {Name = contentType.Name,DisplayName = contentType.Name};
if (contentType.Name==id) {
foreach(ContentTypePartNameRecord contentTypePartNameRecord in contentTypePartNames) {
var contentTypePartEntry = new ContentTypePartEntry() { Name = contentTypePartNameRecord.PartName };
foreach(var contentTypePartEntryTest in contentType.ContentParts) {
if (contentTypePartEntryTest.PartName==contentTypePartEntry.Name) {
contentTypePartEntry.Selected = true;
}
}
model.ContentTypeParts.Add(contentTypePartEntry);
}
model.SelectedContentType = contentTypeEntry;
}
model.ContentTypes.Add(contentTypeEntry);
};
return View(model);
}
//
// POST: /ContentTypeList/Save
[HttpPost]
public ActionResult Save(string id, FormCollection collection)
{
ContentTypeRecord contentTypeRecord = _contentTypeService.GetContentTypeRecord(id);
while (contentTypeRecord.ContentParts.Count>0) {
_contentTypeService.UnMapContentTypeToContentPart(contentTypeRecord.Name, contentTypeRecord.ContentParts[0].PartName);
}
//foreach(var contentTypePartNameRecord in contentTypeRecord.ContentParts) {
// _contentTypeService.UnMapContentTypeToContentPart(contentTypeRecord.Name,contentTypePartNameRecord.PartName);
//}
foreach(var formKey in collection.AllKeys) {
if (formKey.Contains("part_")) {
var partName = formKey.Replace("part_", "");
_contentTypeService.MapContentTypeToContentPart(contentTypeRecord.Name,partName);
}
}
return RedirectToAction("ContentTypeList", new { id = id });
}
}
}

View File

@@ -0,0 +1,7 @@
name: MetaData
antiforgery: enabled
features:
Orchard.MetaData:
Description: Module for managing Orchard MetaData
Dependencies: Common, XmlRpc
Category: MetaData

View File

@@ -0,0 +1,124 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{23E04990-2A8D-41B8-9908-6DDB71EA3B23}</ProjectGuid>
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Orchard.MetaData</RootNamespace>
<AssemblyName>Orchard.MetaData</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
</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="System" />
<Reference Include="System.Data" />
<Reference Include="System.ComponentModel.DataAnnotations">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
</ItemGroup>
<ItemGroup>
<Compile Include="AdminMenu.cs" />
<Compile Include="Controllers\MetaDataController.cs" />
<Compile Include="Permissions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ViewModels\ContentTypesViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Site.css" />
<Content Include="Module.txt" />
<Content Include="Views\MetaData\Old_ContentTypeList.ascx" />
<Content Include="Web.config" />
<Content Include="Views\MetaData\ContentTypeList.ascx" />
</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>
<Content Include="Styles\ContentTypes.css" />
<Content Include="Views\Web.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
<Folder Include="Scripts\" />
<Folder Include="Services\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- 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" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>33002</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -0,0 +1,65 @@
using System.Collections.Generic;
using System.Linq;
using Orchard.Security.Permissions;
namespace Orchard.MetaData {
public class Permissions : IPermissionProvider {
public static readonly Permission ManageMetaData = new Permission { Description = "Manage MetaData", Name = "ManageMetaData" };//q: Should edit_MetaData be ManageMetaData?
public static readonly Permission PublishOthersMetaDataPost = new Permission { Description = "Publish or unpublish MetaData post for others", Name = "PublishOthersMetaDataPost", ImpliedBy = new[] { ManageMetaData } };
public static readonly Permission PublishMetaDataPost = new Permission { Description = "Publish or unpublish MetaData post", Name = "PublishMetaDataPost", ImpliedBy = new[] { PublishOthersMetaDataPost } };
public static readonly Permission EditOthersMetaDataPost = new Permission { Description = "Edit any MetaData posts", Name = "EditOthersMetaDataPost", ImpliedBy = new[] { PublishOthersMetaDataPost } };
public static readonly Permission EditMetaDataPost = new Permission { Description = "Edit own MetaData posts", Name = "EditMetaDataPost", ImpliedBy = new[] { EditOthersMetaDataPost, PublishMetaDataPost } };
public static readonly Permission DeleteOthersMetaDataPost = new Permission { Description = "Delete MetaData post for others", Name = "DeleteOthersMetaDataPost", ImpliedBy = new[] { ManageMetaData } };
public static readonly Permission DeleteMetaDataPost = new Permission { Description = "Delete MetaData post", Name = "DeleteMetaDataPost", ImpliedBy = new[] { DeleteOthersMetaDataPost } };
public static readonly Permission MetaListOthersMetaData = new Permission { ImpliedBy = new[] { EditOthersMetaDataPost, PublishOthersMetaDataPost, DeleteOthersMetaDataPost } };
public static readonly Permission MetaListMetaData = new Permission { ImpliedBy = new[] { EditMetaDataPost, PublishMetaDataPost, DeleteMetaDataPost } };
public string ModuleName {
get {
return "MetaData";
}
}
public IEnumerable<Permission> GetPermissions() {
return new Permission[] {
ManageMetaData,
EditMetaDataPost,
EditOthersMetaDataPost,
PublishMetaDataPost,
PublishOthersMetaDataPost,
DeleteMetaDataPost,
DeleteOthersMetaDataPost,
};
}
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
return new[] {
new PermissionStereotype {
Name = "Administrator",
Permissions = new[] {ManageMetaData}
},
new PermissionStereotype {
Name = "Editor",
Permissions = new[] {PublishOthersMetaDataPost,EditOthersMetaDataPost,DeleteOthersMetaDataPost}
},
new PermissionStereotype {
Name = "Moderator",
//Permissions = new[] {}
},
new PermissionStereotype {
Name = "Author",
Permissions = new[] {PublishMetaDataPost,EditMetaDataPost,DeleteMetaDataPost}
},
new PermissionStereotype {
Name = "Contributor",
Permissions = new[] {EditMetaDataPost}
},
};
}
}
}

View File

@@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 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.MetaData")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Orchard.MetaData")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[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("9b958fbe-1d0d-4975-9a1b-7e3ff5bed510")]
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,35 @@

.ContentTypeList
{
width: 100px;
float:left;
}
.ContentTypePartList
{
width: 200px;
float: left;
margin-left: 20px;
}
.ContentTypePartListRow
{
height:5px;
padding:0px;
}
.ContentTypePartListRowItem
{
background:#EAEAEA;
padding:0px;
vertical-align:top;
margin:1px;
padding-top: 5px;
}
.SelectedContentPart {
background:#D1F2A5;
border-color:#BCD994;
}
.UnSelectedContentPart {
background:#EAEAEA;
border-color:#CCC;
}

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
using Orchard.Mvc.ViewModels;
namespace Orchard.MetaData.ViewModels
{
public class ContentTypesIndexViewModel : BaseViewModel {
public IList<ContentTypeEntry> ContentTypes { get; set; }
public IList<ContentTypePartEntry> ContentTypeParts { get; set; }
public ContentTypesIndexViewModel() {
ContentTypes=new List<ContentTypeEntry>();
ContentTypeParts = new List<ContentTypePartEntry>();
}
public ContentTypeEntry SelectedContentType { get; set; }
}
public class ContentTypeEntry {
public string Name { get; set; }
public string DisplayName { get; set; }
public IList<ContentTypePartEntry> ContentTypeParts { get; set; }
public ContentTypeEntry(){
ContentTypeParts = new List<ContentTypePartEntry>();
}
}
public class ContentTypePartEntry {
public string Name { get; set; }
public bool Selected { get; set; }
}
}

View File

@@ -0,0 +1,79 @@

<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentTypesIndexViewModel>" %>
<%@ Import Namespace="Orchard.MetaData.ViewModels"%>
<% Html.RegisterStyle("ContentTypes.css"); %>
<div class="ContentTypeList">
<table>
<tr>
<th>
Content Types
</th>
</tr>
<% foreach (var item in Model.ContentTypes) { %>
<%
string contentTypeClass = "";
if (Model.SelectedContentType!=null && Model.SelectedContentType.Name == item.Name)
{
contentTypeClass = "SelectedContentPart";
}else{
contentTypeClass = "UnSelectedContentPart";
}
%>
<tr class="<%=contentTypeClass %>">
<td>
<%= Html.ActionLink(item.Name, "ContentTypeList", new {id=item.Name})%>
</td>
</tr>
<% } %>
</table>
</div>
<%if (Model.SelectedContentType!=null) {%>
<div class="ContentTypePartList">
<table>
<tr>
<th>
</th>
<th>
Included Content Part
</th>
</tr>
<%
using (Html.BeginFormAntiForgeryPost(Url.Action("Save",new {id=Model.SelectedContentType.Name}))) { %>
<% foreach (var item in Model.ContentTypeParts) { %>
<tr class="ContentTypePartListRow">
<td class="ContentTypePartListRowItem">
<%if (item.Selected)
{%>
<input name="<%="part_" + item.Name%>" type="checkbox" checked="checked" /><%}
else {%>
<input name="<%="part_" + item.Name%>" type="checkbox" /><%}%>
</td>
<td class="ContentTypePartListRowItem">
<%= Html.Encode(item.Name)%>
</td>
</tr>
<% } %>
</table>
<p>
<input type="submit" value="<%=_Encoded("Save") %>" />
</p>
<% } %>
</div>
<%} %>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<configuration>
<system.web>
<httpHandlers>
<add path="*" verb="*"
type="System.Web.HttpNotFoundHandler"/>
</httpHandlers>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
</handlers>
</system.webServer>
</configuration>

View File

@@ -0,0 +1,158 @@
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
<namespaces>
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespace="System.Web.Mvc.Html"/>
<add namespace="System.Web.Routing"/>
<add namespace="System.Linq"/>
<add namespace="System.Collections.Generic"/>
<add namespace="Orchard.Mvc.Html" />
<add namespace="Orchard.Mvc" />
</namespaces>
</pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<system.web.extensions/>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<remove name="ScriptModule" />
<remove name="UrlRoutingModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="MvcHttpHandler" />
<remove name="UrlRoutingHandler" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>