mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Merge branch 'refs/heads/1.9.x' into dev
Conflicts: ClickToBuild.cmd Orchard.proj lib/msbuild/MSBuild.Community.Tasks.Targets lib/newtonsoft.json/Newtonsoft.Json.xml lib/windowsazure/Microsoft.WindowsAzure.Diagnostics.xml src/Orchard.Azure.Tests/Orchard.Azure.Tests.csproj src/Orchard.Azure/Orchard.Azure.Web/Config/Host.config src/Orchard.Azure/Orchard.Azure.Web/Config/HostComponents.config src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj src/Orchard.Azure/Orchard.Azure.Web/Web.config src/Orchard.Azure/Orchard.Azure.sln src/Orchard.Core.Tests/Body/BodyPartTests.cs src/Orchard.Core.Tests/Common/Providers/CommonPartProviderTests.cs src/Orchard.Core.Tests/Orchard.Core.Tests.csproj src/Orchard.Profile/profiling-setup-commands.txt src/Orchard.Specs/Bindings/OrchardSiteFactory.cs src/Orchard.Specs/Blogs.feature src/Orchard.Specs/Blogs.feature.cs src/Orchard.Specs/Comments.feature src/Orchard.Specs/Comments.feature.cs src/Orchard.Specs/Hosting/Orchard.Web/Config/Host.config src/Orchard.Specs/Hosting/Orchard.Web/Web.config src/Orchard.Specs/Hosting/Simple.Web/Web.config src/Orchard.Specs/Lists.feature src/Orchard.Specs/Lists.feature.cs src/Orchard.Specs/Media.feature src/Orchard.Specs/Media.feature.cs src/Orchard.Specs/MultiTenancy.feature src/Orchard.Specs/MultiTenancy.feature.cs src/Orchard.Specs/Orchard.Specs.csproj src/Orchard.Specs/Pages.feature src/Orchard.Specs/Pages.feature.cs src/Orchard.Specs/PermissionModel.feature src/Orchard.Specs/PermissionModel.feature.cs src/Orchard.Specs/Setup.feature src/Orchard.Specs/Setup.feature.cs src/Orchard.Specs/Tags.feature src/Orchard.Specs/Tags.feature.cs src/Orchard.Specs/Users.feature src/Orchard.Specs/Users.feature.cs src/Orchard.Tests.Modules/Comments/Services/CommentServiceTests.cs src/Orchard.Tests.Modules/Conditions/Providers/UrlRuleConditionTest.cs src/Orchard.Tests.Modules/DatabaseEnabledTestsBase.cs src/Orchard.Tests.Modules/ImportExport/Services/ImportExportServiceTests.cs src/Orchard.Tests.Modules/Media/Services/MediaServiceTests.cs src/Orchard.Tests.Modules/Orchard.Tests.Modules.csproj src/Orchard.Tests.Modules/Recipes/RecipeHandlers/ModuleStepTest.cs src/Orchard.Tests.Modules/Recipes/RecipeHandlers/ThemeStepTest.cs src/Orchard.Tests.Modules/Recipes/Services/RecipeManagerTests.cs src/Orchard.Tests.Modules/Users/Controllers/AccountControllerTests.cs src/Orchard.Tests.Modules/Users/Services/MembershipServiceTests.cs src/Orchard.Tests.Modules/Widgets/WidgetsTests.cs src/Orchard.Tests/App.config src/Orchard.Tests/ContainerTestBase.cs src/Orchard.Tests/ContentManagement/ContentQueryTests.cs src/Orchard.Tests/ContentManagement/DefaultContentManagerTests.cs src/Orchard.Tests/ContentManagement/DynamicContentQueryTests.cs src/Orchard.Tests/ContentManagement/HqlExpressionTests.cs src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs src/Orchard.Tests/DataMigration/Utilities/NullInterpreter.cs src/Orchard.Tests/DatabaseEnabledTestsBase.cs src/Orchard.Tests/DisplayManagement/DefaultDisplayManagerTests.cs src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs src/Orchard.Tests/Environment/DefaultOrchardHostTests.cs src/Orchard.Tests/Environment/Extensions/ExtensionLoaderCoordinatorTests.cs src/Orchard.Tests/Environment/Extensions/ExtensionManagerTests.cs src/Orchard.Tests/Environment/Loaders/DynamicExtensionLoaderTests.cs src/Orchard.Tests/Orchard.Framework.Tests.csproj src/Orchard.Tests/Stubs/StubReportsCoordinator.cs src/Orchard.Tests/Stubs/StubWorkContextAccessor.cs src/Orchard.Tests/Time/TimeZoneSelectorTests.cs src/Orchard.Web.Tests/Orchard.Web.Tests.csproj src/Orchard.Web/Config/Host.config src/Orchard.Web/Config/HostComponents.config src/Orchard.Web/Config/log4net.config src/Orchard.Web/Core/Common/DateEditor/DateEditorHandler.cs src/Orchard.Web/Core/Common/Drivers/BodyPartDriver.cs src/Orchard.Web/Core/Common/Drivers/IdentityPartDriver.cs src/Orchard.Web/Core/Common/Drivers/TextFieldDriver.cs src/Orchard.Web/Core/Common/Handlers/BodyPartHandler.cs src/Orchard.Web/Core/Common/Handlers/CommonPartHandler.cs src/Orchard.Web/Core/Common/Handlers/IdentityPartHandler.cs src/Orchard.Web/Core/Common/Migrations.cs src/Orchard.Web/Core/Common/Models/CommonPart.cs src/Orchard.Web/Core/Common/Models/CommonPartVersionRecord.cs src/Orchard.Web/Core/Common/Services/IdentifierResolverSelector.cs src/Orchard.Web/Core/Common/Utilities/LazyField.cs src/Orchard.Web/Core/Common/Views/CommonMetadataOwner.cshtml src/Orchard.Web/Core/Common/Views/Parts.Common.Metadata.SummaryAdmin.cshtml src/Orchard.Web/Core/Containers/Models/ContainerPart.cs src/Orchard.Web/Core/Containers/ViewModels/ContainerViewModel.cs src/Orchard.Web/Core/Containers/Views/EditorTemplates/ContainerWidget.cshtml src/Orchard.Web/Core/Contents/Controllers/ItemController.cs src/Orchard.Web/Core/Contents/Security/AuthorizationEventHandler.cs src/Orchard.Web/Core/Contents/Views/Admin/List.cshtml src/Orchard.Web/Core/Contents/Views/Content.Edit.cshtml src/Orchard.Web/Core/Dashboard/Views/Admin/Index.cshtml src/Orchard.Web/Core/Feeds/Rss/RssFeedBuilder.cs src/Orchard.Web/Core/Feeds/Services/FeedFilter.cs src/Orchard.Web/Core/Feeds/Services/FeedManager.cs src/Orchard.Web/Core/Feeds/StandardBuilders/CorePartsFeedItemBuilder.cs src/Orchard.Web/Core/Feeds/StandardQueries/ContainerFeedQuery.cs src/Orchard.Web/Core/Navigation/Controllers/AdminController.cs src/Orchard.Web/Core/Navigation/Drivers/AdminMenuPartDriver.cs src/Orchard.Web/Core/Navigation/Drivers/MenuItemPartDriver.cs src/Orchard.Web/Core/Navigation/Drivers/MenuPartDriver.cs src/Orchard.Web/Core/Navigation/Handlers/AdminMenuPartHandler.cs src/Orchard.Web/Core/Navigation/Handlers/MenuHandler.cs src/Orchard.Web/Core/Navigation/Handlers/MenuPartHandler.cs src/Orchard.Web/Core/Navigation/Scripts/navigation-admin.js src/Orchard.Web/Core/Navigation/Services/AdminMenuNavigationProvider.cs src/Orchard.Web/Core/Navigation/Services/MainMenuService.cs src/Orchard.Web/Core/Navigation/Services/NavigationManager.cs src/Orchard.Web/Core/Navigation/Styles/navigation-admin.css src/Orchard.Web/Core/Navigation/Views/Admin/Index.cshtml src/Orchard.Web/Core/Navigation/Views/MenuItem.Edit.cshtml src/Orchard.Web/Core/Orchard.Core.csproj src/Orchard.Web/Core/Scheduling/Services/ScheduledTaskExecutor.cs src/Orchard.Web/Core/Scheduling/Services/ScheduledTaskManager.cs src/Orchard.Web/Core/Settings/Drivers/SiteSettingsPartDriver.cs src/Orchard.Web/Core/Settings/Handlers/SiteSettingsPartHandler.cs src/Orchard.Web/Core/Settings/Migrations.cs src/Orchard.Web/Core/Settings/Services/SiteService.cs src/Orchard.Web/Core/Settings/State/ShellStateManager.cs src/Orchard.Web/Core/Shapes/CoreShapes.cs src/Orchard.Web/Core/Shapes/DateTimeShapes.cs src/Orchard.Web/Core/Shapes/ResourceManifest.cs src/Orchard.Web/Core/Shapes/Scripts/base.js src/Orchard.Web/Modules/Lucene/Lucene.csproj src/Orchard.Web/Modules/Markdown/Markdown.csproj src/Orchard.Web/Modules/Orchard.Alias/AdminMenu.cs src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Alias/IAliasService.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/AliasRoute.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/DefaultAliasService.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/Holder/AliasInfo.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/Holder/IAliasHolder.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/Map/AliasMap.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/Storage/AliasStorage.cs src/Orchard.Web/Modules/Orchard.Alias/Implementation/Utils.cs src/Orchard.Web/Modules/Orchard.Alias/Migrations.cs src/Orchard.Web/Modules/Orchard.Alias/Orchard.Alias.csproj src/Orchard.Web/Modules/Orchard.Alias/Records/AliasRecord.cs src/Orchard.Web/Modules/Orchard.Alias/Routes.cs src/Orchard.Web/Modules/Orchard.Alias/ViewModels/AdminIndexViewModel.cs src/Orchard.Web/Modules/Orchard.Alias/Views/Admin/Add.cshtml src/Orchard.Web/Modules/Orchard.Alias/Views/Admin/Delete.cshtml src/Orchard.Web/Modules/Orchard.Alias/Views/Admin/Edit.cshtml src/Orchard.Web/Modules/Orchard.Alias/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.Alias/Web.config src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/ReCaptchaPartDriver.cs src/Orchard.Web/Modules/Orchard.AntiSpam/Handlers/AkismetSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.AntiSpam/Handlers/ReCaptchaSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.AntiSpam/Handlers/TypePadSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.AntiSpam/Module.txt src/Orchard.Web/Modules/Orchard.AntiSpam/Orchard.AntiSpam.csproj src/Orchard.Web/Modules/Orchard.AntiSpam/ViewModels/ReCaptchaPartEditViewModel.cs src/Orchard.Web/Modules/Orchard.AntiSpam/Views/EditorTemplates/Parts.ReCaptcha.Fields.cshtml src/Orchard.Web/Modules/Orchard.AntiSpam/Web.config src/Orchard.Web/Modules/Orchard.ArchiveLater/Handlers/ArchiveLaterPartHandler.cs src/Orchard.Web/Modules/Orchard.ArchiveLater/Handlers/UnpublishingTaskHandler.cs src/Orchard.Web/Modules/Orchard.ArchiveLater/Orchard.ArchiveLater.csproj src/Orchard.Web/Modules/Orchard.Autoroute/Drivers/AutoroutePartDriver.cs src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs src/Orchard.Web/Modules/Orchard.Autoroute/Migrations.cs src/Orchard.Web/Modules/Orchard.Autoroute/Models/AutoroutePart.cs src/Orchard.Web/Modules/Orchard.Autoroute/Models/AutoroutePartRecord.cs src/Orchard.Web/Modules/Orchard.Autoroute/Orchard.Autoroute.csproj src/Orchard.Web/Modules/Orchard.Autoroute/Providers/SlugTokens.cs src/Orchard.Web/Modules/Orchard.Autoroute/ResourceManifest.cs src/Orchard.Web/Modules/Orchard.Autoroute/Services/AliasResolverSelector.cs src/Orchard.Web/Modules/Orchard.Autoroute/Services/AutorouteService.cs src/Orchard.Web/Modules/Orchard.Autoroute/Services/DefaultSlugService.cs src/Orchard.Web/Modules/Orchard.Autoroute/Services/IAutorouteService.cs src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettings.cs src/Orchard.Web/Modules/Orchard.Autoroute/Settings/AutorouteSettingsEvents.cs src/Orchard.Web/Modules/Orchard.Autoroute/Settings/RoutePattern.cs src/Orchard.Web/Modules/Orchard.Autoroute/Styles/orchard-autoroute-settings.css src/Orchard.Web/Modules/Orchard.Autoroute/ViewModels/AutoroutePartEditViewModel.cs src/Orchard.Web/Modules/Orchard.Autoroute/Views/DefinitionTemplates/AutorouteSettings.cshtml src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml src/Orchard.Web/Modules/Orchard.Autoroute/Web.config src/Orchard.Web/Modules/Orchard.Azure/Constants.cs src/Orchard.Web/Modules/Orchard.Azure/Orchard.Azure.csproj src/Orchard.Web/Modules/Orchard.Azure/Services/Environment/Configuration/AzureBlobShellSettingsManager.cs src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/Media/AzureBlobStorageProvider.cs src/Orchard.Web/Modules/Orchard.Azure/Web.config src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPartDriver.cs src/Orchard.Web/Modules/Orchard.Blogs/Drivers/BlogPostPartDriver.cs src/Orchard.Web/Modules/Orchard.Blogs/Drivers/RemoteBlogPublishingDriver.cs src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogArchivesPartHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPostPartHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Handlers/RecentBlogPostsPartHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Migrations.cs src/Orchard.Web/Modules/Orchard.Blogs/Module.txt src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj src/Orchard.Web/Modules/Orchard.Blogs/Routing/ArchiveConstraint.CS src/Orchard.Web/Modules/Orchard.Blogs/Routing/RsdConstraint.CS src/Orchard.Web/Modules/Orchard.Blogs/Security/BlogAuthorizationEventHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogPostService.cs src/Orchard.Web/Modules/Orchard.Blogs/Services/BlogService.cs src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs src/Orchard.Web/Modules/Orchard.Blogs/Views/BlogAdmin/List.cshtml src/Orchard.Web/Modules/Orchard.Blogs/Views/Parts.Blogs.BlogPost.ListAdmin.cshtml src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleRootWebConfig.txt src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs src/Orchard.Web/Modules/Orchard.CodeGeneration/Orchard.CodeGeneration.csproj src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentPartDriver.cs src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentsContainerPartDriver.cs src/Orchard.Web/Modules/Orchard.Comments/Drivers/CommentsPartDriver.cs src/Orchard.Web/Modules/Orchard.Comments/Feeds/CommentFeedItemBuilder.cs src/Orchard.Web/Modules/Orchard.Comments/Feeds/CommentedOnContainerFeedQuery.cs src/Orchard.Web/Modules/Orchard.Comments/Feeds/CommentedOnFeedQuery.cs src/Orchard.Web/Modules/Orchard.Comments/Handlers/CommentPartHandler.cs src/Orchard.Web/Modules/Orchard.Comments/Handlers/CommentSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Comments/Handlers/CommentsPartHandler.cs src/Orchard.Web/Modules/Orchard.Comments/Orchard.Comments.csproj src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs src/Orchard.Web/Modules/Orchard.Comments/Views/Parts.Comment.cshtml src/Orchard.Web/Modules/Orchard.Conditions/Providers/UrlCondition.cs src/Orchard.Web/Modules/Orchard.ContentPermissions/Drivers/ContentPermissionsPartDriver.cs src/Orchard.Web/Modules/Orchard.ContentPermissions/Orchard.ContentPermissions.csproj src/Orchard.Web/Modules/Orchard.ContentPermissions/Web.config src/Orchard.Web/Modules/Orchard.ContentPicker/Drivers/ContentMenuItemPartDriver.cs src/Orchard.Web/Modules/Orchard.ContentPicker/Handlers/ContentMenuItemPartHandler.cs src/Orchard.Web/Modules/Orchard.ContentPicker/Handlers/ContentPickerFieldHandler.cs src/Orchard.Web/Modules/Orchard.ContentPicker/Handlers/NavigationPartHandler.cs src/Orchard.Web/Modules/Orchard.ContentPicker/Orchard.ContentPicker.csproj src/Orchard.Web/Modules/Orchard.ContentPicker/Web.config src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.csproj src/Orchard.Web/Modules/Orchard.ContentTypes/Orchard.ContentTypes.sln src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs src/Orchard.Web/Modules/Orchard.CustomForms/Module.txt src/Orchard.Web/Modules/Orchard.CustomForms/Orchard.CustomForms.csproj src/Orchard.Web/Modules/Orchard.CustomForms/Security/AuthorizationEventHandler.cs src/Orchard.Web/Modules/Orchard.CustomForms/Web.config src/Orchard.Web/Modules/Orchard.DesignerTools/Module.txt src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj src/Orchard.Web/Modules/Orchard.DesignerTools/Services/UrlAlternatesFactory.cs src/Orchard.Web/Modules/Orchard.DesignerTools/Web.config src/Orchard.Web/Modules/Orchard.Email/Handlers/SmtpSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Email/Models/SmtpSettingsPart.cs src/Orchard.Web/Modules/Orchard.Email/Orchard.Email.csproj src/Orchard.Web/Modules/Orchard.Email/Views/EditorTemplates/Parts/SmtpSettings.cshtml src/Orchard.Web/Modules/Orchard.Fields/Drivers/BooleanFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Drivers/DateTimeFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Drivers/EnumerationFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Drivers/InputFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Drivers/LinkFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Drivers/NumericFieldDriver.cs src/Orchard.Web/Modules/Orchard.Fields/Module.txt src/Orchard.Web/Modules/Orchard.Fields/Orchard.Fields.csproj src/Orchard.Web/Modules/Orchard.Fields/Web.config src/Orchard.Web/Modules/Orchard.Forms/Orchard.Forms.csproj src/Orchard.Web/Modules/Orchard.Forms/Web.config src/Orchard.Web/Modules/Orchard.ImageEditor/Orchard.ImageEditor.csproj src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config src/Orchard.Web/Modules/Orchard.ImportExport/Commands/ImportExportCommands.cs src/Orchard.Web/Modules/Orchard.ImportExport/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.ImportExport/Models/ExportOptions.cs src/Orchard.Web/Modules/Orchard.ImportExport/Module.txt src/Orchard.Web/Modules/Orchard.ImportExport/Orchard.ImportExport.csproj src/Orchard.Web/Modules/Orchard.ImportExport/Services/ICustomExportStep.cs src/Orchard.Web/Modules/Orchard.ImportExport/Services/IExportEventHandler.cs src/Orchard.Web/Modules/Orchard.ImportExport/Services/IImportExportService.cs src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs src/Orchard.Web/Modules/Orchard.ImportExport/ViewModels/ExportViewModel.cs src/Orchard.Web/Modules/Orchard.ImportExport/ViewModels/ImportViewModel.cs src/Orchard.Web/Modules/Orchard.ImportExport/Views/Admin/Export.cshtml src/Orchard.Web/Modules/Orchard.ImportExport/Views/Admin/Import.cshtml src/Orchard.Web/Modules/Orchard.ImportExport/Views/Admin/ImportResult.cshtml src/Orchard.Web/Modules/Orchard.Indexing/Commands/IndexingCommands.cs src/Orchard.Web/Modules/Orchard.Indexing/Migrations.cs src/Orchard.Web/Modules/Orchard.Indexing/Module.txt src/Orchard.Web/Modules/Orchard.Indexing/Orchard.Indexing.csproj src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingBackgroundTask.cs src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskManager.cs src/Orchard.Web/Modules/Orchard.Indexing/Settings/EditorEvents.cs src/Orchard.Web/Modules/Orchard.Indexing/Views/Admin/Create.cshtml src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj src/Orchard.Web/Modules/Orchard.Lists/Migrations.cs src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj src/Orchard.Web/Modules/Orchard.Lists/Web.config src/Orchard.Web/Modules/Orchard.Localization/Drivers/LocalizationPartDriver.cs src/Orchard.Web/Modules/Orchard.Localization/Handlers/LocalizationPartHandler.cs src/Orchard.Web/Modules/Orchard.Localization/Orchard.Localization.csproj src/Orchard.Web/Modules/Orchard.Media/Handlers/MediaSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Media/Module.txt src/Orchard.Web/Modules/Orchard.Media/Orchard.Media.csproj src/Orchard.Web/Modules/Orchard.Media/Services/MediaService.cs src/Orchard.Web/Modules/Orchard.Media/Services/XmlRpcHandler.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Controllers/ClientStorageController.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Factories/ImageFactory.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Handlers/MediaPartHandler.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Handlers/WebSearchSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Module.txt src/Orchard.Web/Modules/Orchard.MediaLibrary/ResourceManifest.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Services/MediaLibraryService.cs src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Import.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/ClientStorage/Index.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/EditorTemplates/Parts/WebSearch.WebSearchSettings.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Fields/MediaLibraryPicker.SummaryAdmin.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/Fields/MediaLibraryPicker.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Views/WebSearch/Index.cshtml src/Orchard.Web/Modules/Orchard.MediaLibrary/Web.config src/Orchard.Web/Modules/Orchard.MediaPicker/Handlers/MediaGalleryFieldHandler.cs src/Orchard.Web/Modules/Orchard.MediaPicker/Module.txt src/Orchard.Web/Modules/Orchard.MediaPicker/Orchard.MediaPicker.csproj src/Orchard.Web/Modules/Orchard.MediaProcessing/Handlers/ImageProfilePartHandler.cs src/Orchard.Web/Modules/Orchard.MediaProcessing/Orchard.MediaProcessing.csproj src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/IImageProfileManager.cs src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileManager.cs src/Orchard.Web/Modules/Orchard.MediaProcessing/Services/ImageProfileService.cs src/Orchard.Web/Modules/Orchard.MediaProcessing/Web.config src/Orchard.Web/Modules/Orchard.Migrations/Orchard.Migrations.csproj src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Modules/Module.txt src/Orchard.Web/Modules/Orchard.Modules/Orchard.Modules.csproj src/Orchard.Web/Modules/Orchard.Modules/Recipes/Executors/FeatureStep.cs src/Orchard.Web/Modules/Orchard.Modules/Views/Admin/Features.cshtml src/Orchard.Web/Modules/Orchard.Modules/styles/orchard-modules-admin.css src/Orchard.Web/Modules/Orchard.MultiTenancy/Commands/TenantCommand.cs src/Orchard.Web/Modules/Orchard.MultiTenancy/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.MultiTenancy/Extensions/UrlHelperExtensions.cs src/Orchard.Web/Modules/Orchard.MultiTenancy/Module.txt src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj src/Orchard.Web/Modules/Orchard.MultiTenancy/Services/ITenantService.cs src/Orchard.Web/Modules/Orchard.MultiTenancy/Services/TenantService.cs src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForDisabled.cshtml src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/DisplayTemplates/ActionsForRunning.cshtml src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs src/Orchard.Web/Modules/Orchard.OutputCache/Handlers/CacheSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.OutputCache/Orchard.OutputCache.csproj src/Orchard.Web/Modules/Orchard.OutputCache/Services/DefaultCacheStorageProvider.cs src/Orchard.Web/Modules/Orchard.OutputCache/Web.config src/Orchard.Web/Modules/Orchard.Packaging/Controllers/GalleryUpdatesController.cs src/Orchard.Web/Modules/Orchard.Packaging/Controllers/PackagingServicesController.cs src/Orchard.Web/Modules/Orchard.Packaging/Orchard.Packaging.csproj src/Orchard.Web/Modules/Orchard.Pages/Commands/PageCommands.cs src/Orchard.Web/Modules/Orchard.Pages/Migrations.cs src/Orchard.Web/Modules/Orchard.Pages/Module.txt src/Orchard.Web/Modules/Orchard.Pages/Orchard.Pages.csproj src/Orchard.Web/Modules/Orchard.Projections/Controllers/LayoutController.cs src/Orchard.Web/Modules/Orchard.Projections/Drivers/ProjectionPartDriver.cs src/Orchard.Web/Modules/Orchard.Projections/Drivers/QueryPartDriver.cs src/Orchard.Web/Modules/Orchard.Projections/Migrations.cs src/Orchard.Web/Modules/Orchard.Projections/Orchard.Projections.csproj src/Orchard.Web/Modules/Orchard.Projections/Providers/Layouts/GridLayout.cs src/Orchard.Web/Modules/Orchard.Projections/Providers/Layouts/ListLayout.cs src/Orchard.Web/Modules/Orchard.Projections/Providers/Layouts/RawLayout.cs src/Orchard.Web/Modules/Orchard.Projections/Tests/Orchard.Projections.Tests.csproj src/Orchard.Web/Modules/Orchard.Projections/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.Projections/Web.config src/Orchard.Web/Modules/Orchard.PublishLater/Drivers/PublishLaterPartDriver.cs src/Orchard.Web/Modules/Orchard.PublishLater/Handlers/PublishLaterPartHandler.cs src/Orchard.Web/Modules/Orchard.PublishLater/Handlers/PublishingTaskHandler.cs src/Orchard.Web/Modules/Orchard.PublishLater/Orchard.PublishLater.csproj src/Orchard.Web/Modules/Orchard.PublishLater/Services/PublishingTaskManager.cs src/Orchard.Web/Modules/Orchard.Recipes/Commands/RecipesCommands.cs src/Orchard.Web/Modules/Orchard.Recipes/Orchard.Recipes.csproj src/Orchard.Web/Modules/Orchard.Recipes/Providers/Executors/CommandStep.cs src/Orchard.Web/Modules/Orchard.Recipes/Providers/Executors/ModuleStep.cs src/Orchard.Web/Modules/Orchard.Recipes/Providers/Executors/SettingsStep.cs src/Orchard.Web/Modules/Orchard.Recipes/RecipeHandlers/DataRecipeHandler.cs src/Orchard.Web/Modules/Orchard.Recipes/RecipeHandlers/MetaDataRecipeHandler.cs src/Orchard.Web/Modules/Orchard.Recipes/RecipeHandlers/MigrationRecipeHandler.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeHarvester.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeJournalManager.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeManager.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeParser.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeScheduler.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeStepExecutor.cs src/Orchard.Web/Modules/Orchard.Recipes/Services/RecipeStepQueue.cs src/Orchard.Web/Modules/Orchard.Roles/DefaultRoleUpdater.cs src/Orchard.Web/Modules/Orchard.Roles/Drivers/UserRolesPartDriver.cs src/Orchard.Web/Modules/Orchard.Roles/Handlers/UserRolesPartHandler.cs src/Orchard.Web/Modules/Orchard.Roles/Module.txt src/Orchard.Web/Modules/Orchard.Roles/Orchard.Roles.csproj src/Orchard.Web/Modules/Orchard.Roles/Services/RoleService.cs src/Orchard.Web/Modules/Orchard.Roles/Services/RolesBasedAuthorizationService.cs src/Orchard.Web/Modules/Orchard.Rules/Handlers/ScheduledActionTaskHandler.cs src/Orchard.Web/Modules/Orchard.Rules/Handlers/ScheduledActionTaskPartHandler.cs src/Orchard.Web/Modules/Orchard.Rules/ImportExport/RulesCustomExportStep.cs src/Orchard.Web/Modules/Orchard.Rules/ImportExport/RulesRecipeHandler.cs src/Orchard.Web/Modules/Orchard.Rules/Module.txt src/Orchard.Web/Modules/Orchard.Rules/Orchard.Rules.csproj src/Orchard.Web/Modules/Orchard.Rules/Recipes/Builders/RulesStep.cs src/Orchard.Web/Modules/Orchard.Rules/Web.config src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Orchard.Scripting.CSharp.csproj src/Orchard.Web/Modules/Orchard.Scripting.CSharp/Web.config src/Orchard.Web/Modules/Orchard.Search/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Search/Controllers/ContentPickerController.cs src/Orchard.Web/Modules/Orchard.Search/Controllers/SearchController.cs src/Orchard.Web/Modules/Orchard.Search/Drivers/SearchFormPartDriver.cs src/Orchard.Web/Modules/Orchard.Search/Drivers/SearchSettingsPartDriver.cs src/Orchard.Web/Modules/Orchard.Search/Handlers/SearchSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Search/Models/SearchFormPart.cs src/Orchard.Web/Modules/Orchard.Search/Orchard.Search.csproj src/Orchard.Web/Modules/Orchard.Search/Placement.info src/Orchard.Web/Modules/Orchard.Search/ResourceManifest.cs src/Orchard.Web/Modules/Orchard.Search/Routes.cs src/Orchard.Web/Modules/Orchard.Search/Styles/orchard-search-admin.css src/Orchard.Web/Modules/Orchard.Search/Styles/orchard-search-search.css src/Orchard.Web/Modules/Orchard.Search/ViewModels/SearchSettingsIndexViewModel.cs src/Orchard.Web/Modules/Orchard.Search/Views/EditorTemplates/Parts/Search.SiteSettings.cshtml src/Orchard.Web/Modules/Orchard.Search/Views/Parts/Search.SearchForm.cshtml src/Orchard.Web/Modules/Orchard.Setup/Commands/SetupCommand.cs src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupDatabaseType.cs src/Orchard.Web/Modules/Orchard.Setup/Module.txt src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj src/Orchard.Web/Modules/Orchard.Setup/Recipes/blog.recipe.xml src/Orchard.Web/Modules/Orchard.Setup/Recipes/core.recipe.xml src/Orchard.Web/Modules/Orchard.Setup/Recipes/default.recipe.xml src/Orchard.Web/Modules/Orchard.Setup/Routes.cs src/Orchard.Web/Modules/Orchard.Setup/Scripts/setup.js src/Orchard.Web/Modules/Orchard.Setup/Services/SetupContext.cs src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.cshtml src/Orchard.Web/Modules/Orchard.Tags/Drivers/TagsPartDriver.cs src/Orchard.Web/Modules/Orchard.Tags/Module.txt src/Orchard.Web/Modules/Orchard.Tags/Orchard.Tags.csproj src/Orchard.Web/Modules/Orchard.Tags/ResourceManifest.cs src/Orchard.Web/Modules/Orchard.Tags/Services/TagService.cs src/Orchard.Web/Modules/Orchard.TaskLease/Migrations.cs src/Orchard.Web/Modules/Orchard.TaskLease/Models/TaskLeaseRecord.cs src/Orchard.Web/Modules/Orchard.TaskLease/Module.txt src/Orchard.Web/Modules/Orchard.TaskLease/Orchard.TaskLease.csproj src/Orchard.Web/Modules/Orchard.TaskLease/Services/ITaskLeaseService.cs src/Orchard.Web/Modules/Orchard.TaskLease/Services/TaskLeaseService.cs src/Orchard.Web/Modules/Orchard.TaskLease/Tests/Orchard.TaskLease.Tests/Orchard.TaskLease.Tests.csproj src/Orchard.Web/Modules/Orchard.TaskLease/Web.config src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Controllers/TermAdminController.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyPartDriver.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TaxonomyPartHandler.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Handlers/TermsPartHandler.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Helpers/PathExtensions.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Migrations.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Models/TermContentItem.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Models/TermPart.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Models/TermsPart.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Navigation/TaxonomyNavigationProvider.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Projections/TermsFilter.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Projections/TermsFilterForms.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Scripts/admin-taxonomy-tags.js src/Orchard.Web/Modules/Orchard.Taxonomies/Services/ITaxonomyService.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Services/TaxonomyService.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Shapes.cs src/Orchard.Web/Modules/Orchard.Taxonomies/StandardQueries/TermFeedQuery.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Styles/admin-taxonomy-tags.css src/Orchard.Web/Modules/Orchard.Taxonomies/ViewModels/TaxonomyAdminIndexViewModel.cs src/Orchard.Web/Modules/Orchard.Taxonomies/ViewModels/TaxonomyFieldViewModel.cs src/Orchard.Web/Modules/Orchard.Taxonomies/ViewModels/TermAdminIndexViewModel.cs src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Import.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/DefinitionTemplates/TaxonomyFieldSettings.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.Autocomplete.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Fields/TaxonomyField.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/EditorTemplates/Parts/Navigation.Taxonomy.Edit.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Fields/TaxonomyField.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/Taxonomy.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TaxonomyItem.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TermAdmin/Index.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TermAdmin/Merge.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TermAdmin/MoveTerm.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TermAdmin/RenderTermSelect.cshtml src/Orchard.Web/Modules/Orchard.Taxonomies/Views/TermAdmin/SelectTerm.cshtml src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Themes/Handlers/ThemeSiteSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Themes/Module.txt src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj src/Orchard.Web/Modules/Orchard.Themes/Recipes/Executors/ThemeStep.cs src/Orchard.Web/Modules/Orchard.Themes/Services/IThemeService.cs src/Orchard.Web/Modules/Orchard.Themes/Services/SafeModeThemeSelector.cs src/Orchard.Web/Modules/Orchard.Themes/Services/SiteThemeSelector.cs src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs src/Orchard.Web/Modules/Orchard.Tokens/Orchard.Tokens.csproj src/Orchard.Web/Modules/Orchard.Tokens/Styles/orchard-tokens-admin.css src/Orchard.Web/Modules/Orchard.Tokens/Tests/Orchard.Tokens.Tests.csproj src/Orchard.Web/Modules/Orchard.Tokens/Tests/StubWorkContextAccessor.cs src/Orchard.Web/Modules/Orchard.Tokens/Tests/TestTokenProvider.cs src/Orchard.Web/Modules/Orchard.Tokens/Views/TokenHint.cshtml src/Orchard.Web/Modules/Orchard.Tokens/Web.config src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs src/Orchard.Web/Modules/Orchard.Users/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Users/Handlers/RegistrationSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Users/Handlers/UserPartHandler.cs src/Orchard.Web/Modules/Orchard.Users/Migrations.cs src/Orchard.Web/Modules/Orchard.Users/Models/UserPart.cs src/Orchard.Web/Modules/Orchard.Users/Models/UserPartRecord.cs src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs src/Orchard.Web/Modules/Orchard.Users/Services/UserResolverSelector.cs src/Orchard.Web/Modules/Orchard.Users/Services/UserService.cs src/Orchard.Web/Modules/Orchard.Users/ViewModels/UsersIndexViewModel.cs src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChallengeEmailSent.cshtml src/Orchard.Web/Modules/Orchard.Users/Views/Account/RegistrationPending.cshtml src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.Warmup/Handlers/WarmupSettingsPartHandler.cs src/Orchard.Web/Modules/Orchard.Warmup/Orchard.Warmup.csproj src/Orchard.Web/Modules/Orchard.Warmup/Web.config src/Orchard.Web/Modules/Orchard.Widgets/Drivers/LayerPartDriver.cs src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetPartDriver.cs src/Orchard.Web/Modules/Orchard.Widgets/Filters/WidgetFilter.cs src/Orchard.Web/Modules/Orchard.Widgets/Handlers/LayerPartHandler.cs src/Orchard.Web/Modules/Orchard.Widgets/Handlers/WidgetPartHandler.cs src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetPart.cs src/Orchard.Web/Modules/Orchard.Widgets/Module.txt src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/AuthenticatedRuleProvider.cs src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/BuiltinRuleProvider.cs src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/ContentDisplayedRuleProvider.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleManager.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleProvider.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/LayerResolverSelector.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleContext.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleManager.cs src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs src/Orchard.Web/Modules/Orchard.Widgets/Shapes.cs src/Orchard.Web/Modules/Orchard.Widgets/Views/EditorTemplates/Parts.Widgets.WidgetPart.cshtml src/Orchard.Web/Modules/Orchard.Widgets/Views/WidgetPlacement.Orphans.cshtml src/Orchard.Web/Modules/Orchard.Workflows/Controllers/AdminController.cs src/Orchard.Web/Modules/Orchard.Workflows/ImportExport/WorkflowsCustomExportStep.cs src/Orchard.Web/Modules/Orchard.Workflows/ImportExport/WorkflowsRecipeHandler.cs src/Orchard.Web/Modules/Orchard.Workflows/Module.txt src/Orchard.Web/Modules/Orchard.Workflows/Recipes/Builders/WorkflowsStep.cs src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows-serialize.js src/Orchard.Web/Modules/Orchard.Workflows/Scripts/orchard-workflows.js src/Orchard.Web/Modules/Orchard.Workflows/Styles/orchard-workflows-admin.css src/Orchard.Web/Modules/Orchard.Workflows/Views/ActivityToolbox.cshtml src/Orchard.Web/Modules/Orchard.Workflows/Views/Admin/Index.cshtml src/Orchard.Web/Modules/Orchard.Workflows/Web.config src/Orchard.Web/Modules/Orchard.jQuery/Module.txt src/Orchard.Web/Modules/Orchard.jQuery/Orchard.jQuery.csproj src/Orchard.Web/Modules/SysCache/SysCache.csproj src/Orchard.Web/Modules/SysCache/Web.config src/Orchard.Web/Modules/TinyMce/Module.txt src/Orchard.Web/Modules/TinyMce/TinyMce.csproj src/Orchard.Web/Modules/Upgrade/Controllers/RouteController.cs src/Orchard.Web/Modules/Upgrade/Upgrade.csproj src/Orchard.Web/Modules/Upgrade/Web.config src/Orchard.Web/Orchard.Web.csproj src/Orchard.Web/Themes/TheAdmin/Scripts/admin.js src/Orchard.Web/Themes/TheAdmin/Styles/site.css src/Orchard.Web/Themes/TheAdmin/Views/User.cshtml src/Orchard.Web/Themes/Themes.csproj src/Orchard.Web/Themes/Web.config src/Orchard.Web/Web.config src/Orchard.sln src/Orchard/Commands/Builtin/HelpCommand.cs src/Orchard/Commands/CommandBackgroundService.cs.rej src/Orchard/Commands/CommandHostAgent.cs src/Orchard/ContentManagement/Aspects/ICommonPart.cs src/Orchard/ContentManagement/DataMigrations/FrameworkDataMigration.cs src/Orchard/ContentManagement/DefaultContentManager.cs src/Orchard/ContentManagement/Drivers/ContentFieldDriver.cs src/Orchard/ContentManagement/Drivers/ContentPartDriver.cs src/Orchard/ContentManagement/Drivers/ContentShapeResult.cs src/Orchard/ContentManagement/Drivers/Coordinators/ContentFieldDriverCoordinator.cs src/Orchard/ContentManagement/Drivers/Coordinators/ContentPartDriverCoordinator.cs src/Orchard/ContentManagement/Drivers/IContentFieldDriver.cs src/Orchard/ContentManagement/Drivers/IContentPartDriver.cs src/Orchard/ContentManagement/Handlers/ContentHandler.cs src/Orchard/ContentManagement/Handlers/ContentHandlerBase.cs src/Orchard/ContentManagement/Handlers/IContentHandler.cs src/Orchard/ContentManagement/Handlers/IContentStorageFilter.cs src/Orchard/ContentManagement/Handlers/StorageFilter.cs src/Orchard/ContentManagement/Handlers/StorageFilterBase.cs src/Orchard/ContentManagement/Handlers/StorageVersionFilter.cs src/Orchard/ContentManagement/IContentManager.cs src/Orchard/ContentManagement/MetaData/Services/ContentDefinitionWriter.cs src/Orchard/ContentManagement/Utilities/LazyField.cs src/Orchard/Data/Migration/AutomaticDataMigrations.cs src/Orchard/Data/Migration/Interpreters/DefaultDataMigrationInterpreter.cs src/Orchard/Data/Migration/Interpreters/IDataMigrationInterpreter.cs src/Orchard/Data/Migration/Interpreters/MySqlCommandInterpreter.cs src/Orchard/Data/Migration/Schema/AlterTableCommand.cs src/Orchard/Data/Migration/Schema/SchemaBuilder.cs src/Orchard/Data/Migration/Schema/SchemaCommand.cs src/Orchard/DisplayManagement/Descriptors/ResourceBindingStrategy/StylesheetBindingStrategy.cs src/Orchard/DisplayManagement/Shapes/ShapeMetadata.cs src/Orchard/Environment/Configuration/ShellSettingsManager.cs src/Orchard/Environment/Configuration/TenantState.cs src/Orchard/Environment/DefaultOrchardHost.cs src/Orchard/Environment/DefaultOrchardShell.cs src/Orchard/Environment/Descriptor/IShellDescriptorManager.cs src/Orchard/Environment/Extensions/ExtensionMonitoringCoordinator.cs src/Orchard/Environment/Extensions/Folders/ExtensionHarvester.cs src/Orchard/Environment/Extensions/IExtensionManager.cs src/Orchard/Environment/Extensions/Loaders/DynamicExtensionLoader.cs src/Orchard/Environment/Extensions/Loaders/RawThemeExtensionLoader.cs src/Orchard/Environment/Extensions/Models/ExtensionDescriptor.cs src/Orchard/Environment/Features/FeatureManager.cs src/Orchard/Environment/Features/IFeatureManager.cs src/Orchard/Environment/IOrchardHost.cs src/Orchard/Environment/OrchardServices.cs src/Orchard/Environment/OrchardStarter.cs src/Orchard/Environment/ShellBuilders/CompositionStrategy.cs src/Orchard/Environment/ShellBuilders/ShellContainerFactory.cs src/Orchard/Environment/ShellBuilders/ShellContextFactory.cs src/Orchard/Environment/State/DefaultProcessingEngine.cs src/Orchard/Environment/ViewsBackgroundCompilation.cs src/Orchard/Environment/WorkContextAccessor.cs src/Orchard/Environment/WorkContextImplementation.cs src/Orchard/Events/DelegateHelper.cs src/Orchard/FileSystems/Dependencies/DynamicModuleVirtualPathProvider.cs src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs src/Orchard/Localization/Services/DefaultLocalizedStringManager.cs src/Orchard/Localization/Text.cs src/Orchard/Logging/OrchardLog4netLogger.cs src/Orchard/Mvc/AntiForgery/AntiForgeryAuthorizationFilter.cs src/Orchard/Mvc/Html/ContentItemExtensions.cs
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public Localizer T { get; set; }
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder
|
||||
.AddImageSet("customforms")
|
||||
.Add(T("Custom Forms"), "4",
|
||||
menu => menu
|
||||
.Add(T("Manage Forms"), "1.0",
|
||||
item => item.Action("Index", "Admin", new { area = "Orchard.CustomForms" }).Permission(Permissions.ManageForms))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public Localizer T { get; set; }
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder
|
||||
.AddImageSet("customforms")
|
||||
.Add(T("Custom Forms"), "4",
|
||||
menu => menu
|
||||
.Add(T("Manage Forms"), "1.0",
|
||||
item => item.Action("Index", "Admin", new { area = "Orchard.CustomForms" }).Permission(Permissions.ManageForms))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,146 +1,146 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.ViewModels;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.CustomForms.Controllers {
|
||||
[ValidateInput(false)]
|
||||
public class AdminController : Controller {
|
||||
private readonly ISiteService _siteService;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices services,
|
||||
IShapeFactory shapeFactory,
|
||||
ISiteService siteService) {
|
||||
_siteService = siteService;
|
||||
Services = services;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
Shape = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index(CustomFormIndexOptions options, PagerParameters pagerParameters) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to list custom forms")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);
|
||||
|
||||
// default options
|
||||
if (options == null)
|
||||
options = new CustomFormIndexOptions();
|
||||
|
||||
var query = Services.ContentManager.Query().ForType("CustomForm", "CustomFormWidget").ForVersion(VersionOptions.Latest);
|
||||
|
||||
switch (options.Filter) {
|
||||
case CustomFormFilter.All:
|
||||
break;
|
||||
}
|
||||
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(query.Count());
|
||||
|
||||
switch (options.Order) {
|
||||
case CustomFormOrder.Creation:
|
||||
query = query.Join<CommonPartRecord>().OrderByDescending(u => u.CreatedUtc);
|
||||
break;
|
||||
}
|
||||
|
||||
var results = query
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize);
|
||||
|
||||
var model = new CustomFormIndexViewModel {
|
||||
CustomForms = results.Select(x => new CustomFormEntry { CustomForm = x.As<CustomFormPart>() }).ToList(),
|
||||
Options = options,
|
||||
Pager = pagerShape
|
||||
};
|
||||
|
||||
// maintain previous route data when generating page links
|
||||
var routeData = new RouteData();
|
||||
routeData.Values.Add("Options.Filter", options.Filter);
|
||||
routeData.Values.Add("Options.Search", options.Search);
|
||||
routeData.Values.Add("Options.Order", options.Order);
|
||||
|
||||
pagerShape.RouteData(routeData);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[FormValueRequired("submit.BulkEdit")]
|
||||
public ActionResult Index(FormCollection input) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to manage customForm")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var viewModel = new CustomFormIndexViewModel { CustomForms = new List<CustomFormEntry>(), Options = new CustomFormIndexOptions() };
|
||||
UpdateModel(viewModel);
|
||||
|
||||
var checkedEntries = viewModel.CustomForms.Where(c => c.IsChecked);
|
||||
switch (viewModel.Options.BulkAction) {
|
||||
case CustomFormBulkAction.None:
|
||||
break;
|
||||
case CustomFormBulkAction.Publish:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Publish(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
case CustomFormBulkAction.Unpublish:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Unpublish(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
case CustomFormBulkAction.Delete:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Remove(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return Index(viewModel.Options, new PagerParameters());
|
||||
}
|
||||
|
||||
public ActionResult Item(int id, PagerParameters pagerParameters) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to manage customForm")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
Pager pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);
|
||||
|
||||
var formPart = Services.ContentManager.Get(id, VersionOptions.Published).As<CustomFormPart>();
|
||||
if (formPart == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var submissions = Services.ContentManager
|
||||
.Query<CommonPart, CommonPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.Where(x => x.Container.Id == id)
|
||||
.OrderByDescending(x => x.CreatedUtc)
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize)
|
||||
.Select(b => Services.ContentManager.BuildDisplay(b, "SummaryAdmin"));
|
||||
|
||||
var shape = Services.New.CustomFormList();
|
||||
|
||||
var list = Shape.List();
|
||||
list.AddRange(submissions);
|
||||
|
||||
var totalItemCount = Services.ContentManager
|
||||
.Query<CommonPart, CommonPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.Where(x => x.Container.Id == id)
|
||||
.Count();
|
||||
shape.Pager(Services.New.Pager(pager).TotalItemCount(totalItemCount));
|
||||
shape.List(list);
|
||||
return View(shape);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.ViewModels;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.CustomForms.Controllers {
|
||||
[ValidateInput(false)]
|
||||
public class AdminController : Controller {
|
||||
private readonly ISiteService _siteService;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices services,
|
||||
IShapeFactory shapeFactory,
|
||||
ISiteService siteService) {
|
||||
_siteService = siteService;
|
||||
Services = services;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
Shape = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index(CustomFormIndexOptions options, PagerParameters pagerParameters) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to list custom forms")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);
|
||||
|
||||
// default options
|
||||
if (options == null)
|
||||
options = new CustomFormIndexOptions();
|
||||
|
||||
var query = Services.ContentManager.Query().ForType("CustomForm", "CustomFormWidget").ForVersion(VersionOptions.Latest);
|
||||
|
||||
switch (options.Filter) {
|
||||
case CustomFormFilter.All:
|
||||
break;
|
||||
}
|
||||
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(query.Count());
|
||||
|
||||
switch (options.Order) {
|
||||
case CustomFormOrder.Creation:
|
||||
query = query.Join<CommonPartRecord>().OrderByDescending(u => u.CreatedUtc);
|
||||
break;
|
||||
}
|
||||
|
||||
var results = query
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize);
|
||||
|
||||
var model = new CustomFormIndexViewModel {
|
||||
CustomForms = results.Select(x => new CustomFormEntry { CustomForm = x.As<CustomFormPart>() }).ToList(),
|
||||
Options = options,
|
||||
Pager = pagerShape
|
||||
};
|
||||
|
||||
// maintain previous route data when generating page links
|
||||
var routeData = new RouteData();
|
||||
routeData.Values.Add("Options.Filter", options.Filter);
|
||||
routeData.Values.Add("Options.Search", options.Search);
|
||||
routeData.Values.Add("Options.Order", options.Order);
|
||||
|
||||
pagerShape.RouteData(routeData);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[FormValueRequired("submit.BulkEdit")]
|
||||
public ActionResult Index(FormCollection input) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to manage customForm")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var viewModel = new CustomFormIndexViewModel { CustomForms = new List<CustomFormEntry>(), Options = new CustomFormIndexOptions() };
|
||||
UpdateModel(viewModel);
|
||||
|
||||
var checkedEntries = viewModel.CustomForms.Where(c => c.IsChecked);
|
||||
switch (viewModel.Options.BulkAction) {
|
||||
case CustomFormBulkAction.None:
|
||||
break;
|
||||
case CustomFormBulkAction.Publish:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Publish(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
case CustomFormBulkAction.Unpublish:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Unpublish(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
case CustomFormBulkAction.Delete:
|
||||
foreach (var entry in checkedEntries) {
|
||||
Services.ContentManager.Remove(Services.ContentManager.Get(entry.CustomForm.Id));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return Index(viewModel.Options, new PagerParameters());
|
||||
}
|
||||
|
||||
public ActionResult Item(int id, PagerParameters pagerParameters) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageForms, T("Not authorized to manage customForm")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
Pager pager = new Pager(_siteService.GetSiteSettings(), pagerParameters);
|
||||
|
||||
var formPart = Services.ContentManager.Get(id, VersionOptions.Published).As<CustomFormPart>();
|
||||
if (formPart == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var submissions = Services.ContentManager
|
||||
.Query<CommonPart, CommonPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.Where(x => x.Container.Id == id)
|
||||
.OrderByDescending(x => x.CreatedUtc)
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize)
|
||||
.Select(b => Services.ContentManager.BuildDisplay(b, "SummaryAdmin"));
|
||||
|
||||
var shape = Services.New.CustomFormList();
|
||||
|
||||
var list = Shape.List();
|
||||
list.AddRange(submissions);
|
||||
|
||||
var totalItemCount = Services.ContentManager
|
||||
.Query<CommonPart, CommonPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.Where(x => x.Container.Id == id)
|
||||
.Count();
|
||||
shape.Pager(Services.New.Pager(pager).TotalItemCount(totalItemCount));
|
||||
shape.List(list);
|
||||
return View(shape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,189 +1,189 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.CustomForms.Activities;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.Rules;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Themes;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.CustomForms.Controllers {
|
||||
[Themed(true)]
|
||||
[ValidateInput(false)]
|
||||
public class ItemController : Controller, IUpdateModel {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ITransactionManager _transactionManager;
|
||||
private readonly IRulesManager _rulesManager;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
private readonly IWorkflowManager _workflowManager;
|
||||
|
||||
public ItemController(
|
||||
IOrchardServices orchardServices,
|
||||
IContentManager contentManager,
|
||||
ITransactionManager transactionManager,
|
||||
IShapeFactory shapeFactory,
|
||||
IRulesManager rulesManager,
|
||||
ITokenizer tokenizer,
|
||||
IWorkflowManager workflowManager) {
|
||||
Services = orchardServices;
|
||||
_contentManager = contentManager;
|
||||
_transactionManager = transactionManager;
|
||||
_rulesManager = rulesManager;
|
||||
_tokenizer = tokenizer;
|
||||
_workflowManager = workflowManager;
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
Shape = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; private set; }
|
||||
public Localizer T { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ActionResult Create(int id) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if(form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
|
||||
var contentItem = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if(!contentItem.Has<ICommonPart>()) {
|
||||
throw new OrchardException(T("The content type must have CommonPart attached"));
|
||||
}
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), contentItem, T("Cannot create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = _contentManager.BuildEditor(contentItem);
|
||||
|
||||
model
|
||||
.ContentItem(form)
|
||||
.ReturnUrl(Url.RouteUrl(_contentManager.GetItemMetadata(form).DisplayRouteValues));
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Create")]
|
||||
[FormValueRequired("submit.Save")]
|
||||
public ActionResult CreatePOST(int id, string returnUrl) {
|
||||
return CreatePOST(id, returnUrl, contentItem => {
|
||||
if (!contentItem.Has<IPublishingControlAspect>() && !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
|
||||
_contentManager.Publish(contentItem);
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Create")]
|
||||
[FormValueRequired("submit.Publish")]
|
||||
public ActionResult CreateAndPublishPOST(int id, string returnUrl) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if (form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
|
||||
// pass a dummy content to the authorization check to check for "own" variations
|
||||
var dummyContent = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), dummyContent, T("Couldn't create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
return CreatePOST(id, returnUrl, contentItem => _contentManager.Publish(contentItem));
|
||||
}
|
||||
|
||||
private ActionResult CreatePOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if (form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
var contentItem = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), contentItem, T("Couldn't create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if(customForm.SaveContentItem)
|
||||
_contentManager.Create(contentItem, VersionOptions.Draft);
|
||||
|
||||
var model = _contentManager.UpdateEditor(contentItem, this);
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
_transactionManager.Cancel();
|
||||
|
||||
// if custom form is inside a widget, we display the form itself
|
||||
if (form.ContentType == "CustomFormWidget") {
|
||||
foreach (var error in ModelState.Values.SelectMany(m => m.Errors).Select(e => e.ErrorMessage)) {
|
||||
Services.Notifier.Error(T(error));
|
||||
}
|
||||
|
||||
// save the updated editor shape into TempData to survive a redirection and keep the edited values
|
||||
TempData["CustomFormWidget.InvalidCustomFormState"] = model;
|
||||
|
||||
if (returnUrl != null) {
|
||||
return this.RedirectLocal(returnUrl);
|
||||
}
|
||||
}
|
||||
|
||||
model.ContentItem(form);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
contentItem.As<ICommonPart>().Container = customForm.ContentItem;
|
||||
|
||||
// triggers any event
|
||||
_rulesManager.TriggerEvent("CustomForm", "Submitted",
|
||||
() => new Dictionary<string, object> { { "Content", contentItem } });
|
||||
|
||||
// trigger any workflow
|
||||
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, contentItem,
|
||||
() => new Dictionary<string, object> { { "Content", contentItem} , { "CustomForm", customForm.ContentItem } });
|
||||
|
||||
if (customForm.Redirect) {
|
||||
returnUrl = _tokenizer.Replace(customForm.RedirectUrl, new Dictionary<string, object> { { "Content", contentItem } });
|
||||
}
|
||||
|
||||
// save the submitted form
|
||||
if (customForm.SaveContentItem) {
|
||||
conditionallyPublish(contentItem);
|
||||
}
|
||||
|
||||
// writes a confirmation message
|
||||
if (customForm.CustomMessage) {
|
||||
if (!String.IsNullOrWhiteSpace(customForm.Message)) {
|
||||
Services.Notifier.Information(T(customForm.Message));
|
||||
}
|
||||
}
|
||||
|
||||
var referrer = Request.UrlReferrer != null ? Request.UrlReferrer.ToString() : null;
|
||||
return this.RedirectLocal(returnUrl, () => this.RedirectLocal(referrer, () => Redirect(Request.RawUrl)));
|
||||
}
|
||||
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||
}
|
||||
|
||||
void IUpdateModel.AddModelError(string key, LocalizedString errorMessage) {
|
||||
ModelState.AddModelError(key, errorMessage.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.CustomForms.Activities;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.Rules;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Themes;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.CustomForms.Controllers {
|
||||
[Themed(true)]
|
||||
[ValidateInput(false)]
|
||||
public class ItemController : Controller, IUpdateModel {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ITransactionManager _transactionManager;
|
||||
private readonly IRulesManager _rulesManager;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
private readonly IWorkflowManager _workflowManager;
|
||||
|
||||
public ItemController(
|
||||
IOrchardServices orchardServices,
|
||||
IContentManager contentManager,
|
||||
ITransactionManager transactionManager,
|
||||
IShapeFactory shapeFactory,
|
||||
IRulesManager rulesManager,
|
||||
ITokenizer tokenizer,
|
||||
IWorkflowManager workflowManager) {
|
||||
Services = orchardServices;
|
||||
_contentManager = contentManager;
|
||||
_transactionManager = transactionManager;
|
||||
_rulesManager = rulesManager;
|
||||
_tokenizer = tokenizer;
|
||||
_workflowManager = workflowManager;
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
Shape = shapeFactory;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; private set; }
|
||||
public Localizer T { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ActionResult Create(int id) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if(form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
|
||||
var contentItem = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if(!contentItem.Has<ICommonPart>()) {
|
||||
throw new OrchardException(T("The content type must have CommonPart attached"));
|
||||
}
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), contentItem, T("Cannot create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = _contentManager.BuildEditor(contentItem);
|
||||
|
||||
model
|
||||
.ContentItem(form)
|
||||
.ReturnUrl(Url.RouteUrl(_contentManager.GetItemMetadata(form).DisplayRouteValues));
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Create")]
|
||||
[FormValueRequired("submit.Save")]
|
||||
public ActionResult CreatePOST(int id, string returnUrl) {
|
||||
return CreatePOST(id, returnUrl, contentItem => {
|
||||
if (!contentItem.Has<IPublishingControlAspect>() && !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
|
||||
_contentManager.Publish(contentItem);
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Create")]
|
||||
[FormValueRequired("submit.Publish")]
|
||||
public ActionResult CreateAndPublishPOST(int id, string returnUrl) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if (form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
|
||||
// pass a dummy content to the authorization check to check for "own" variations
|
||||
var dummyContent = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), dummyContent, T("Couldn't create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
return CreatePOST(id, returnUrl, contentItem => _contentManager.Publish(contentItem));
|
||||
}
|
||||
|
||||
private ActionResult CreatePOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var form = _contentManager.Get(id);
|
||||
|
||||
if (form == null || !form.Has<CustomFormPart>()) {
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
var contentItem = _contentManager.New(customForm.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateSubmitPermission(customForm.ContentType), contentItem, T("Couldn't create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if(customForm.SaveContentItem)
|
||||
_contentManager.Create(contentItem, VersionOptions.Draft);
|
||||
|
||||
var model = _contentManager.UpdateEditor(contentItem, this);
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
_transactionManager.Cancel();
|
||||
|
||||
// if custom form is inside a widget, we display the form itself
|
||||
if (form.ContentType == "CustomFormWidget") {
|
||||
foreach (var error in ModelState.Values.SelectMany(m => m.Errors).Select(e => e.ErrorMessage)) {
|
||||
Services.Notifier.Error(T(error));
|
||||
}
|
||||
|
||||
// save the updated editor shape into TempData to survive a redirection and keep the edited values
|
||||
TempData["CustomFormWidget.InvalidCustomFormState"] = model;
|
||||
|
||||
if (returnUrl != null) {
|
||||
return this.RedirectLocal(returnUrl);
|
||||
}
|
||||
}
|
||||
|
||||
model.ContentItem(form);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
contentItem.As<ICommonPart>().Container = customForm.ContentItem;
|
||||
|
||||
// triggers any event
|
||||
_rulesManager.TriggerEvent("CustomForm", "Submitted",
|
||||
() => new Dictionary<string, object> { { "Content", contentItem } });
|
||||
|
||||
// trigger any workflow
|
||||
_workflowManager.TriggerEvent(FormSubmittedActivity.EventName, contentItem,
|
||||
() => new Dictionary<string, object> { { "Content", contentItem} , { "CustomForm", customForm.ContentItem } });
|
||||
|
||||
if (customForm.Redirect) {
|
||||
returnUrl = _tokenizer.Replace(customForm.RedirectUrl, new Dictionary<string, object> { { "Content", contentItem } });
|
||||
}
|
||||
|
||||
// save the submitted form
|
||||
if (customForm.SaveContentItem) {
|
||||
conditionallyPublish(contentItem);
|
||||
}
|
||||
|
||||
// writes a confirmation message
|
||||
if (customForm.CustomMessage) {
|
||||
if (!String.IsNullOrWhiteSpace(customForm.Message)) {
|
||||
Services.Notifier.Information(T(customForm.Message));
|
||||
}
|
||||
}
|
||||
|
||||
var referrer = Request.UrlReferrer != null ? Request.UrlReferrer.ToString() : null;
|
||||
return this.RedirectLocal(returnUrl, () => this.RedirectLocal(referrer, () => Redirect(Request.RawUrl)));
|
||||
}
|
||||
|
||||
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {
|
||||
return TryUpdateModel(model, prefix, includeProperties, excludeProperties);
|
||||
}
|
||||
|
||||
void IUpdateModel.AddModelError(string key, LocalizedString errorMessage) {
|
||||
ModelState.AddModelError(key, errorMessage.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,108 +1,108 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.ViewModels;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using System;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Security;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.CustomForms.Drivers {
|
||||
public class CustomFormPartDriver : ContentPartDriver<CustomFormPart> {
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
private readonly IAuthorizationService _authService;
|
||||
|
||||
public CustomFormPartDriver(
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
IAuthorizationService authService) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_orchardServices = orchardServices;
|
||||
_authService = authService;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
protected override DriverResult Display(CustomFormPart part, string displayType, dynamic shapeHelper) {
|
||||
// this method is used by the widget to render the form when it is displayed
|
||||
|
||||
var contentItem = _orchardServices.ContentManager.New(part.ContentType);
|
||||
|
||||
if (!contentItem.Has<ICommonPart>()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ContentShape("Parts_CustomForm_Wrapper", () => {
|
||||
return shapeHelper.Parts_CustomForm_Wrapper()
|
||||
.Editor(_orchardServices.ContentManager.BuildEditor(contentItem))
|
||||
.ContentPart(part);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(CustomFormPart part, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_CustomForm_Fields", () => {
|
||||
var contentTypes = _contentDefinitionManager.ListTypeDefinitions().Select(x => x.Name).OrderBy(x => x);
|
||||
var viewModel = new CustomFormPartEditViewModel {
|
||||
ContentTypes = contentTypes,
|
||||
CustomFormPart = part
|
||||
};
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts.CustomForm.Fields", Model: viewModel, Prefix: Prefix);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(CustomFormPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var viewModel = new CustomFormPartEditViewModel {
|
||||
CustomFormPart = part
|
||||
};
|
||||
|
||||
updater.TryUpdateModel(viewModel, Prefix, null, null);
|
||||
|
||||
// Warn if the custom form is set to save a content item that is viewable by anonymous users (publicly accessible)
|
||||
if (viewModel.CustomFormPart.SaveContentItem) {
|
||||
// If it's draftable then don't display the warning because the generated content items won't be publicly accessible
|
||||
var typeDefinition = _contentDefinitionManager.ListTypeDefinitions().Where(x => String.Equals(x.Name, viewModel.CustomFormPart.ContentType, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||
if (typeDefinition != null && !typeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable) {
|
||||
// Create a dummy content item of the specified type to check permissions against
|
||||
if (_authService.TryCheckAccess(Orchard.Core.Contents.Permissions.ViewContent, null, _orchardServices.ContentManager.New(viewModel.CustomFormPart.ContentType))) {
|
||||
_orchardServices.Notifier.Add(UI.Notify.NotifyType.Warning, T("Your custom form will save data to content items that are publicly accessible."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
||||
protected override void Importing(CustomFormPart part, ImportContentContext context) {
|
||||
// Don't do anything if the tag is not specified.
|
||||
if (context.Data.Element(part.PartDefinition.Name) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.ImportAttribute(part.PartDefinition.Name, "ContentType", x => part.Record.ContentType = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "SaveContentItem", x => part.Record.SaveContentItem = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "CustomMessage", x => part.Record.CustomMessage = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "Message", x => part.Record.Message = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "Redirect", x => part.Record.Redirect = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "RedirectUrl", x => part.Record.RedirectUrl = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "SubmitButtonText", x => part.Record.SubmitButtonText = x);
|
||||
}
|
||||
|
||||
protected override void Exporting(CustomFormPart part, ExportContentContext context) {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("ContentType", part.Record.ContentType);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("SaveContentItem", part.Record.SaveContentItem);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("CustomMessage", part.Record.CustomMessage);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Message", part.Record.Message);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Redirect", part.Record.Redirect);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("RedirectUrl", part.Record.RedirectUrl);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("SubmitButtonText", part.Record.SubmitButtonText);
|
||||
}
|
||||
}
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.CustomForms.ViewModels;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using System;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Security;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.CustomForms.Drivers {
|
||||
public class CustomFormPartDriver : ContentPartDriver<CustomFormPart> {
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
private readonly IOrchardServices _orchardServices;
|
||||
private readonly IAuthorizationService _authService;
|
||||
|
||||
public CustomFormPartDriver(
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IOrchardServices orchardServices,
|
||||
IAuthorizationService authService) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_orchardServices = orchardServices;
|
||||
_authService = authService;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
protected override DriverResult Display(CustomFormPart part, string displayType, dynamic shapeHelper) {
|
||||
// this method is used by the widget to render the form when it is displayed
|
||||
|
||||
var contentItem = _orchardServices.ContentManager.New(part.ContentType);
|
||||
|
||||
if (!contentItem.Has<ICommonPart>()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ContentShape("Parts_CustomForm_Wrapper", () => {
|
||||
return shapeHelper.Parts_CustomForm_Wrapper()
|
||||
.Editor(_orchardServices.ContentManager.BuildEditor(contentItem))
|
||||
.ContentPart(part);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(CustomFormPart part, dynamic shapeHelper) {
|
||||
return ContentShape("Parts_CustomForm_Fields", () => {
|
||||
var contentTypes = _contentDefinitionManager.ListTypeDefinitions().Select(x => x.Name).OrderBy(x => x);
|
||||
var viewModel = new CustomFormPartEditViewModel {
|
||||
ContentTypes = contentTypes,
|
||||
CustomFormPart = part
|
||||
};
|
||||
|
||||
return shapeHelper.EditorTemplate(TemplateName: "Parts.CustomForm.Fields", Model: viewModel, Prefix: Prefix);
|
||||
});
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(CustomFormPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var viewModel = new CustomFormPartEditViewModel {
|
||||
CustomFormPart = part
|
||||
};
|
||||
|
||||
updater.TryUpdateModel(viewModel, Prefix, null, null);
|
||||
|
||||
// Warn if the custom form is set to save a content item that is viewable by anonymous users (publicly accessible)
|
||||
if (viewModel.CustomFormPart.SaveContentItem) {
|
||||
// If it's draftable then don't display the warning because the generated content items won't be publicly accessible
|
||||
var typeDefinition = _contentDefinitionManager.ListTypeDefinitions().Where(x => String.Equals(x.Name, viewModel.CustomFormPart.ContentType, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||
if (typeDefinition != null && !typeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable) {
|
||||
// Create a dummy content item of the specified type to check permissions against
|
||||
if (_authService.TryCheckAccess(Orchard.Core.Contents.Permissions.ViewContent, null, _orchardServices.ContentManager.New(viewModel.CustomFormPart.ContentType))) {
|
||||
_orchardServices.Notifier.Add(UI.Notify.NotifyType.Warning, T("Your custom form will save data to content items that are publicly accessible."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
||||
protected override void Importing(CustomFormPart part, ImportContentContext context) {
|
||||
// Don't do anything if the tag is not specified.
|
||||
if (context.Data.Element(part.PartDefinition.Name) == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.ImportAttribute(part.PartDefinition.Name, "ContentType", x => part.Record.ContentType = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "SaveContentItem", x => part.Record.SaveContentItem = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "CustomMessage", x => part.Record.CustomMessage = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "Message", x => part.Record.Message = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "Redirect", x => part.Record.Redirect = Boolean.Parse(x));
|
||||
context.ImportAttribute(part.PartDefinition.Name, "RedirectUrl", x => part.Record.RedirectUrl = x);
|
||||
context.ImportAttribute(part.PartDefinition.Name, "SubmitButtonText", x => part.Record.SubmitButtonText = x);
|
||||
}
|
||||
|
||||
protected override void Exporting(CustomFormPart part, ExportContentContext context) {
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("ContentType", part.Record.ContentType);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("SaveContentItem", part.Record.SaveContentItem);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("CustomMessage", part.Record.CustomMessage);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Message", part.Record.Message);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("Redirect", part.Record.Redirect);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("RedirectUrl", part.Record.RedirectUrl);
|
||||
context.Element(part.PartDefinition.Name).SetAttributeValue("SubmitButtonText", part.Record.SubmitButtonText);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
using System.Web.Routing;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.CustomForms.Handlers {
|
||||
public class CustomFormPartHandler : ContentHandler {
|
||||
public CustomFormPartHandler(IRepository<CustomFormPartRecord> customFormRepository) {
|
||||
Filters.Add(StorageFilter.For(customFormRepository));
|
||||
}
|
||||
|
||||
protected override void GetItemMetadata(GetContentItemMetadataContext context) {
|
||||
if(context.ContentItem.ContentType != "CustomForm") {
|
||||
return;
|
||||
}
|
||||
|
||||
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Orchard.CustomForms"},
|
||||
{"Controller", "Item"},
|
||||
{"Action", "Create"},
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
}
|
||||
}
|
||||
using System.Web.Routing;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.CustomForms.Handlers {
|
||||
public class CustomFormPartHandler : ContentHandler {
|
||||
public CustomFormPartHandler(IRepository<CustomFormPartRecord> customFormRepository) {
|
||||
Filters.Add(StorageFilter.For(customFormRepository));
|
||||
}
|
||||
|
||||
protected override void GetItemMetadata(GetContentItemMetadataContext context) {
|
||||
if(context.ContentItem.ContentType != "CustomForm") {
|
||||
return;
|
||||
}
|
||||
|
||||
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Orchard.CustomForms"},
|
||||
{"Controller", "Item"},
|
||||
{"Action", "Create"},
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,66 +1,66 @@
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
public int Create() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomForm",
|
||||
cfg => cfg
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("TitlePart")
|
||||
.WithPart("AutoroutePart", builder => builder
|
||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\"}]")
|
||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
||||
.WithPart("MenuPart")
|
||||
.WithPart("CustomFormPart")
|
||||
.DisplayedAs("Custom Form")
|
||||
.Draftable()
|
||||
);
|
||||
|
||||
SchemaBuilder.CreateTable("CustomFormPartRecord", table => table.ContentPartVersionRecord()
|
||||
.Column<string>("ContentType", c => c.WithLength(255))
|
||||
.Column<bool>("CustomMessage")
|
||||
.Column<string>("Message", c => c.Unlimited())
|
||||
.Column<bool>("Redirect")
|
||||
.Column<string>("RedirectUrl", c => c.Unlimited())
|
||||
.Column<bool>("SaveContentItem")
|
||||
);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomFormWidget",
|
||||
cfg => cfg
|
||||
.WithPart("WidgetPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("IdentityPart")
|
||||
.WithPart("CustomFormPart")
|
||||
.WithSetting("Stereotype", "Widget")
|
||||
);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomForm", cfg =>
|
||||
cfg.Draftable(false)
|
||||
);
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int UpdateFrom3() {
|
||||
SchemaBuilder.AlterTable("CustomFormPartRecord", table => table.AddColumn<string>("SubmitButtonText"));
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
public void Uninstall() {
|
||||
ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
|
||||
}
|
||||
}
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Contents.Extensions;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class Migrations : DataMigrationImpl {
|
||||
public int Create() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomForm",
|
||||
cfg => cfg
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("TitlePart")
|
||||
.WithPart("AutoroutePart", builder => builder
|
||||
.WithSetting("AutorouteSettings.AllowCustomPattern", "True")
|
||||
.WithSetting("AutorouteSettings.AutomaticAdjustmentOnEdit", "False")
|
||||
.WithSetting("AutorouteSettings.PatternDefinitions", "[{\"Name\":\"Title\",\"Pattern\":\"{Content.Slug}\",\"Description\":\"my-form\"}]")
|
||||
.WithSetting("AutorouteSettings.DefaultPatternIndex", "0"))
|
||||
.WithPart("MenuPart")
|
||||
.WithPart("CustomFormPart")
|
||||
.DisplayedAs("Custom Form")
|
||||
.Draftable()
|
||||
);
|
||||
|
||||
SchemaBuilder.CreateTable("CustomFormPartRecord", table => table.ContentPartVersionRecord()
|
||||
.Column<string>("ContentType", c => c.WithLength(255))
|
||||
.Column<bool>("CustomMessage")
|
||||
.Column<string>("Message", c => c.Unlimited())
|
||||
.Column<bool>("Redirect")
|
||||
.Column<string>("RedirectUrl", c => c.Unlimited())
|
||||
.Column<bool>("SaveContentItem")
|
||||
);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomFormWidget",
|
||||
cfg => cfg
|
||||
.WithPart("WidgetPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithPart("IdentityPart")
|
||||
.WithPart("CustomFormPart")
|
||||
.WithSetting("Stereotype", "Widget")
|
||||
);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("CustomForm", cfg =>
|
||||
cfg.Draftable(false)
|
||||
);
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int UpdateFrom3() {
|
||||
SchemaBuilder.AlterTable("CustomFormPartRecord", table => table.AddColumn<string>("SubmitButtonText"));
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
public void Uninstall() {
|
||||
ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +1,48 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
|
||||
namespace Orchard.CustomForms.Models {
|
||||
public class CustomFormPart : ContentPart<CustomFormPartRecord> {
|
||||
[Required]
|
||||
public string ContentType {
|
||||
get { return Record.ContentType; }
|
||||
set { Record.ContentType = value; }
|
||||
}
|
||||
|
||||
public bool SaveContentItem {
|
||||
get { return Record.SaveContentItem; }
|
||||
set { Record.SaveContentItem = value; }
|
||||
}
|
||||
|
||||
public bool CustomMessage {
|
||||
get { return Record.CustomMessage; }
|
||||
set { Record.CustomMessage = value; }
|
||||
}
|
||||
|
||||
public string Message {
|
||||
get { return Record.Message; }
|
||||
set { Record.Message = value; }
|
||||
}
|
||||
|
||||
public bool Redirect {
|
||||
get { return Record.Redirect; }
|
||||
set { Record.Redirect = value; }
|
||||
}
|
||||
|
||||
public string RedirectUrl {
|
||||
get { return Record.RedirectUrl; }
|
||||
set { Record.RedirectUrl = value; }
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string SubmitButtonText {
|
||||
get { return Record.SubmitButtonText; }
|
||||
set { Record.SubmitButtonText = value; }
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get { return this.As<ITitleAspect>().Title; }
|
||||
}
|
||||
}
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
|
||||
namespace Orchard.CustomForms.Models {
|
||||
public class CustomFormPart : ContentPart<CustomFormPartRecord> {
|
||||
[Required]
|
||||
public string ContentType {
|
||||
get { return Record.ContentType; }
|
||||
set { Record.ContentType = value; }
|
||||
}
|
||||
|
||||
public bool SaveContentItem {
|
||||
get { return Record.SaveContentItem; }
|
||||
set { Record.SaveContentItem = value; }
|
||||
}
|
||||
|
||||
public bool CustomMessage {
|
||||
get { return Record.CustomMessage; }
|
||||
set { Record.CustomMessage = value; }
|
||||
}
|
||||
|
||||
public string Message {
|
||||
get { return Record.Message; }
|
||||
set { Record.Message = value; }
|
||||
}
|
||||
|
||||
public bool Redirect {
|
||||
get { return Record.Redirect; }
|
||||
set { Record.Redirect = value; }
|
||||
}
|
||||
|
||||
public string RedirectUrl {
|
||||
get { return Record.RedirectUrl; }
|
||||
set { Record.RedirectUrl = value; }
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string SubmitButtonText {
|
||||
get { return Record.SubmitButtonText; }
|
||||
set { Record.SubmitButtonText = value; }
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get { return this.As<ITitleAspect>().Title; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
namespace Orchard.CustomForms.Models {
|
||||
public class CustomFormPartRecord : ContentPartRecord {
|
||||
[StringLength(255)]
|
||||
public virtual string ContentType { get; set; }
|
||||
|
||||
[StringLengthMax]
|
||||
public virtual string Message { get; set; }
|
||||
public virtual bool CustomMessage { get; set; }
|
||||
public virtual bool SaveContentItem { get; set; }
|
||||
[StringLengthMax]
|
||||
public virtual string RedirectUrl { get; set; }
|
||||
public virtual bool Redirect { get; set; }
|
||||
|
||||
public virtual string SubmitButtonText { get; set; }
|
||||
}
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
namespace Orchard.CustomForms.Models {
|
||||
public class CustomFormPartRecord : ContentPartRecord {
|
||||
[StringLength(255)]
|
||||
public virtual string ContentType { get; set; }
|
||||
|
||||
[StringLengthMax]
|
||||
public virtual string Message { get; set; }
|
||||
public virtual bool CustomMessage { get; set; }
|
||||
public virtual bool SaveContentItem { get; set; }
|
||||
[StringLengthMax]
|
||||
public virtual string RedirectUrl { get; set; }
|
||||
public virtual bool Redirect { get; set; }
|
||||
|
||||
public virtual string SubmitButtonText { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
Name: Custom Forms
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardcustomforms.codeplex.com
|
||||
Version: 1.9.2
|
||||
OrchardVersion: 1.9
|
||||
LifecycleStatus: Deprecated
|
||||
Description: Create custom forms like contact forms or content contributions.
|
||||
Features:
|
||||
Orchard.CustomForms:
|
||||
Name: Custom Forms
|
||||
Description: Create custom forms like contact forms or content contributions.
|
||||
Category: Forms
|
||||
Dependencies: Contents, Orchard.Tokens, Orchard.Workflows
|
||||
Name: Custom Forms
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardcustomforms.codeplex.com
|
||||
Version: 1.9.2
|
||||
OrchardVersion: 1.9
|
||||
LifecycleStatus: Deprecated
|
||||
Description: Create custom forms like contact forms or content contributions.
|
||||
Features:
|
||||
Orchard.CustomForms:
|
||||
Name: Custom Forms
|
||||
Description: Create custom forms like contact forms or content contributions.
|
||||
Category: Forms
|
||||
Dependencies: Contents, Orchard.Tokens, Orchard.Workflows
|
||||
|
||||
@@ -1,199 +1,199 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2CF067CA-064B-43C6-8B88-5E3B99A65F1D}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.CustomForms</RootNamespace>
|
||||
<AssemblyName>Orchard.CustomForms</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Styles\images\menu.customforms.png" />
|
||||
<Content Include="Styles\menu.customforms-admin.css" />
|
||||
<Content Include="Styles\workflows-activity-form-submitted.css" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Compile Include="Activities\SelectCustomForm.cs" />
|
||||
<Compile Include="Activities\FormSubmittedActivity.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Forms\Orchard.Forms.csproj">
|
||||
<Project>{642a49d7-8752-4177-80d6-bfbbcfad3de0}</Project>
|
||||
<Name>Orchard.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Tokens\Orchard.Tokens.csproj">
|
||||
<Project>{6F759635-13D7-4E94-BCC9-80445D63F117}</Project>
|
||||
<Name>Orchard.Tokens</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Workflows\Orchard.Workflows.csproj">
|
||||
<Project>{7059493c-8251-4764-9c1e-2368b8b485bc}</Project>
|
||||
<Name>Orchard.Workflows</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Controllers\ItemController.cs" />
|
||||
<Compile Include="Drivers\CustomFormPartDriver.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
<Compile Include="Handlers\CustomFormPartHandler.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\CustomFormPart.cs" />
|
||||
<Compile Include="Models\CustomFormPartRecord.cs" />
|
||||
<Compile Include="Rules\CustomFormEvents.cs" />
|
||||
<Compile Include="Rules\IRulesManager.cs" />
|
||||
<Compile Include="Security\AuthorizationEventHandler.cs" />
|
||||
<Compile Include="ViewModels\CustomFormIndexViewModel.cs" />
|
||||
<Compile Include="ViewModels\CustomFormPartEditViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Item.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts.CustomForm.Fields.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Item\Create.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.Wrapper.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- 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" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>51352</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{2CF067CA-064B-43C6-8B88-5E3B99A65F1D}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.CustomForms</RootNamespace>
|
||||
<AssemblyName>Orchard.CustomForms</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</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>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Styles\images\menu.customforms.png" />
|
||||
<Content Include="Styles\menu.customforms-admin.css" />
|
||||
<Content Include="Styles\workflows-activity-form-submitted.css" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
<Content Include="Styles\Web.config" />
|
||||
<Compile Include="Activities\SelectCustomForm.cs" />
|
||||
<Compile Include="Activities\FormSubmittedActivity.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Content Include="Module.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Forms\Orchard.Forms.csproj">
|
||||
<Project>{642a49d7-8752-4177-80d6-bfbbcfad3de0}</Project>
|
||||
<Name>Orchard.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Tokens\Orchard.Tokens.csproj">
|
||||
<Project>{6F759635-13D7-4E94-BCC9-80445D63F117}</Project>
|
||||
<Name>Orchard.Tokens</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Workflows\Orchard.Workflows.csproj">
|
||||
<Project>{7059493c-8251-4764-9c1e-2368b8b485bc}</Project>
|
||||
<Name>Orchard.Workflows</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Controllers\ItemController.cs" />
|
||||
<Compile Include="Drivers\CustomFormPartDriver.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
<Compile Include="Handlers\CustomFormPartHandler.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Models\CustomFormPart.cs" />
|
||||
<Compile Include="Models\CustomFormPartRecord.cs" />
|
||||
<Compile Include="Rules\CustomFormEvents.cs" />
|
||||
<Compile Include="Rules\IRulesManager.cs" />
|
||||
<Compile Include="Security\AuthorizationEventHandler.cs" />
|
||||
<Compile Include="ViewModels\CustomFormIndexViewModel.cs" />
|
||||
<Compile Include="ViewModels\CustomFormPartEditViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Admin\Item.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\EditorTemplates\Parts.CustomForm.Fields.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Item\Create.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Placement.info">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Parts.CustomForm.Wrapper.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- 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" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\$(ProjectName)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>51352</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@@ -1,97 +1,97 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class Permissions : IPermissionProvider {
|
||||
private static readonly Permission SubmitAnyForm = new Permission { Description = "Submit any forms", Name = "Submit" };
|
||||
private static readonly Permission SubmitForm = new Permission { Description = "Submit {0} forms", Name = "Submit_{0}", ImpliedBy = new[] { SubmitAnyForm } };
|
||||
public static readonly Permission ManageForms = new Permission { Description = "Manage custom forms", Name = "ManageForms" };
|
||||
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
private readonly IRepository<CustomFormPartRecord> _customFormPartRepository;
|
||||
|
||||
public virtual Feature Feature { get; set; }
|
||||
|
||||
public Permissions(IContentDefinitionManager contentDefinitionManager, IRepository<CustomFormPartRecord> customFormPartRepository) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_customFormPartRepository = customFormPartRepository;
|
||||
}
|
||||
|
||||
public IEnumerable<Permission> GetPermissions() {
|
||||
var formContentTypes = _customFormPartRepository.Table
|
||||
.Select(r => r.ContentType)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
foreach (var contentType in formContentTypes) {
|
||||
var typeDefinition = _contentDefinitionManager.GetTypeDefinition(contentType);
|
||||
if (typeDefinition == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
yield return CreateSubmitPermission(typeDefinition);
|
||||
}
|
||||
|
||||
yield return SubmitAnyForm;
|
||||
yield return ManageForms;
|
||||
}
|
||||
|
||||
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
||||
return new[] {
|
||||
new PermissionStereotype {
|
||||
Name = "Administrator",
|
||||
Permissions = new[] { SubmitAnyForm, ManageForms }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Editor",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Moderator",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Author",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Contributor",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a permission dynamically for a content type
|
||||
/// </summary>
|
||||
public static Permission CreateSubmitPermission(ContentTypeDefinition typeDefinition) {
|
||||
return new Permission {
|
||||
Name = String.Format(SubmitForm.Name, typeDefinition.Name),
|
||||
Description = String.Format(SubmitForm.Description, typeDefinition.DisplayName),
|
||||
Category = "Custom Forms",
|
||||
ImpliedBy = new [] { SubmitForm }
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a permission dynamically for a content type
|
||||
/// </summary>
|
||||
public static Permission CreateSubmitPermission(string contentType) {
|
||||
return new Permission {
|
||||
Name = String.Format(SubmitForm.Name, contentType),
|
||||
Description = String.Format(SubmitForm.Description, contentType),
|
||||
Category = "Custom Forms",
|
||||
ImpliedBy = new[] { SubmitForm }
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.CustomForms {
|
||||
public class Permissions : IPermissionProvider {
|
||||
private static readonly Permission SubmitAnyForm = new Permission { Description = "Submit any forms", Name = "Submit" };
|
||||
private static readonly Permission SubmitForm = new Permission { Description = "Submit {0} forms", Name = "Submit_{0}", ImpliedBy = new[] { SubmitAnyForm } };
|
||||
public static readonly Permission ManageForms = new Permission { Description = "Manage custom forms", Name = "ManageForms" };
|
||||
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
private readonly IRepository<CustomFormPartRecord> _customFormPartRepository;
|
||||
|
||||
public virtual Feature Feature { get; set; }
|
||||
|
||||
public Permissions(IContentDefinitionManager contentDefinitionManager, IRepository<CustomFormPartRecord> customFormPartRepository) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_customFormPartRepository = customFormPartRepository;
|
||||
}
|
||||
|
||||
public IEnumerable<Permission> GetPermissions() {
|
||||
var formContentTypes = _customFormPartRepository.Table
|
||||
.Select(r => r.ContentType)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
|
||||
foreach (var contentType in formContentTypes) {
|
||||
var typeDefinition = _contentDefinitionManager.GetTypeDefinition(contentType);
|
||||
if (typeDefinition == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
yield return CreateSubmitPermission(typeDefinition);
|
||||
}
|
||||
|
||||
yield return SubmitAnyForm;
|
||||
yield return ManageForms;
|
||||
}
|
||||
|
||||
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
|
||||
return new[] {
|
||||
new PermissionStereotype {
|
||||
Name = "Administrator",
|
||||
Permissions = new[] { SubmitAnyForm, ManageForms }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Editor",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Moderator",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Author",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Contributor",
|
||||
Permissions = new[] { SubmitAnyForm }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a permission dynamically for a content type
|
||||
/// </summary>
|
||||
public static Permission CreateSubmitPermission(ContentTypeDefinition typeDefinition) {
|
||||
return new Permission {
|
||||
Name = String.Format(SubmitForm.Name, typeDefinition.Name),
|
||||
Description = String.Format(SubmitForm.Description, typeDefinition.DisplayName),
|
||||
Category = "Custom Forms",
|
||||
ImpliedBy = new [] { SubmitForm }
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a permission dynamically for a content type
|
||||
/// </summary>
|
||||
public static Permission CreateSubmitPermission(string contentType) {
|
||||
return new Permission {
|
||||
Name = String.Format(SubmitForm.Name, contentType),
|
||||
Description = String.Format(SubmitForm.Description, contentType),
|
||||
Category = "Custom Forms",
|
||||
ImpliedBy = new[] { SubmitForm }
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Placement>
|
||||
<Place Parts_CustomForm_Wrapper="Content:1"/>
|
||||
<Place Parts_CustomForm_Fields="Content:5"/>
|
||||
</Placement>
|
||||
<Placement>
|
||||
<Place Parts_CustomForm_Wrapper="Content:1"/>
|
||||
<Place Parts_CustomForm_Fields="Content:5"/>
|
||||
</Placement>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
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.CustomForms")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("Copyright <20> .NET Foundation")]
|
||||
[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("e7ce3952-50fa-4887-9cf5-10ec8fd6f930")]
|
||||
|
||||
// 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.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
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.CustomForms")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("Copyright <20> .NET Foundation")]
|
||||
[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("e7ce3952-50fa-4887-9cf5-10ec8fd6f930")]
|
||||
|
||||
// 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.9.2")]
|
||||
[assembly: AssemblyFileVersion("1.9.2")]
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Events;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.CustomForms.Rules {
|
||||
public interface IEventProvider : IEventHandler {
|
||||
void Describe(dynamic describe);
|
||||
}
|
||||
|
||||
public class CustomFormEvents : IEventProvider {
|
||||
public CustomFormEvents() {
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public void Describe(dynamic describe) {
|
||||
Func<dynamic, bool> contentHasPart = ContentHasPart;
|
||||
|
||||
describe.For("CustomForm", T("Custom Forms"), T("Custom Forms"))
|
||||
.Element("Submitted", T("Custom Form Submitted"), T("Custom Form is submitted."), contentHasPart, (Func<dynamic, LocalizedString>)(context => T("When a custom form for types ({0}) is submitted.", FormatPartsList(context))), "SelectContentTypes")
|
||||
;
|
||||
}
|
||||
|
||||
private string FormatPartsList(dynamic context) {
|
||||
var contenttypes = context.Properties["ContentTypes"];
|
||||
|
||||
if (String.IsNullOrEmpty(contenttypes)) {
|
||||
return T("Any").Text;
|
||||
}
|
||||
|
||||
return contenttypes;
|
||||
}
|
||||
|
||||
private static bool ContentHasPart(dynamic context) {
|
||||
string contenttypes = context.Properties["ContentTypes"];
|
||||
var content = context.Tokens["Content"] as IContent;
|
||||
|
||||
// "" means 'any'
|
||||
if (String.IsNullOrEmpty(contenttypes)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var contentTypes = contenttypes.Split(new[] { ',' });
|
||||
|
||||
return contentTypes.Any(contentType => content.ContentItem.TypeDefinition.Name == contentType);
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Events;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.CustomForms.Rules {
|
||||
public interface IEventProvider : IEventHandler {
|
||||
void Describe(dynamic describe);
|
||||
}
|
||||
|
||||
public class CustomFormEvents : IEventProvider {
|
||||
public CustomFormEvents() {
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public void Describe(dynamic describe) {
|
||||
Func<dynamic, bool> contentHasPart = ContentHasPart;
|
||||
|
||||
describe.For("CustomForm", T("Custom Forms"), T("Custom Forms"))
|
||||
.Element("Submitted", T("Custom Form Submitted"), T("Custom Form is submitted."), contentHasPart, (Func<dynamic, LocalizedString>)(context => T("When a custom form for types ({0}) is submitted.", FormatPartsList(context))), "SelectContentTypes")
|
||||
;
|
||||
}
|
||||
|
||||
private string FormatPartsList(dynamic context) {
|
||||
var contenttypes = context.Properties["ContentTypes"];
|
||||
|
||||
if (String.IsNullOrEmpty(contenttypes)) {
|
||||
return T("Any").Text;
|
||||
}
|
||||
|
||||
return contenttypes;
|
||||
}
|
||||
|
||||
private static bool ContentHasPart(dynamic context) {
|
||||
string contenttypes = context.Properties["ContentTypes"];
|
||||
var content = context.Tokens["Content"] as IContent;
|
||||
|
||||
// "" means 'any'
|
||||
if (String.IsNullOrEmpty(contenttypes)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (content == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var contentTypes = contenttypes.Split(new[] { ',' });
|
||||
|
||||
return contentTypes.Any(contentType => content.ContentItem.TypeDefinition.Name == contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Events;
|
||||
|
||||
namespace Orchard.CustomForms.Rules {
|
||||
public interface IRulesManager : IEventHandler {
|
||||
void TriggerEvent(string category, string type, Func<Dictionary<string, object>> tokensContext);
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Events;
|
||||
|
||||
namespace Orchard.CustomForms.Rules {
|
||||
public interface IRulesManager : IEventHandler {
|
||||
void TriggerEvent(string category, string type, Func<Dictionary<string, object>> tokensContext);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.CustomForms.Security {
|
||||
/// <summary>
|
||||
/// Alters the Edit permission requested by the Contents module before editing a form. Returns a Submit permission instead.
|
||||
/// </summary>
|
||||
public class AuthorizationEventHandler : IAuthorizationServiceEventHandler {
|
||||
public void Checking(CheckAccessContext context) { }
|
||||
public void Complete(CheckAccessContext context) { }
|
||||
|
||||
public void Adjust(CheckAccessContext context) {
|
||||
if (!context.Granted
|
||||
&& context.Permission.Name == Orchard.Core.Contents.Permissions.EditContent.Name
|
||||
&& context.Content != null
|
||||
&& context.Content.ContentItem.ContentType == "CustomForm") {
|
||||
|
||||
context.Adjusted = true;
|
||||
context.Permission = Permissions.CreateSubmitPermission(context.Content.ContentItem.As<CustomFormPart>().ContentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.CustomForms.Models;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.CustomForms.Security {
|
||||
/// <summary>
|
||||
/// Alters the Edit permission requested by the Contents module before editing a form. Returns a Submit permission instead.
|
||||
/// </summary>
|
||||
public class AuthorizationEventHandler : IAuthorizationServiceEventHandler {
|
||||
public void Checking(CheckAccessContext context) { }
|
||||
public void Complete(CheckAccessContext context) { }
|
||||
|
||||
public void Adjust(CheckAccessContext context) {
|
||||
if (!context.Granted
|
||||
&& context.Permission.Name == Orchard.Core.Contents.Permissions.EditContent.Name
|
||||
&& context.Content != null
|
||||
&& context.Content.ContentItem.ContentType == "CustomForm") {
|
||||
|
||||
context.Adjusted = true;
|
||||
context.Permission = Permissions.CreateSubmitPermission(context.Content.ContentItem.As<CustomFormPart>().ContentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CustomForms.Models;
|
||||
|
||||
namespace Orchard.CustomForms.ViewModels {
|
||||
|
||||
public class CustomFormIndexViewModel {
|
||||
public IList<CustomFormEntry> CustomForms { get; set; }
|
||||
public CustomFormIndexOptions Options { get; set; }
|
||||
public dynamic Pager { get; set; }
|
||||
}
|
||||
|
||||
public class CustomFormEntry {
|
||||
public CustomFormPart CustomForm { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
}
|
||||
|
||||
public class CustomFormIndexOptions {
|
||||
public string Search { get; set; }
|
||||
public CustomFormOrder Order { get; set; }
|
||||
public CustomFormFilter Filter { get; set; }
|
||||
public CustomFormBulkAction BulkAction { get; set; }
|
||||
}
|
||||
|
||||
public enum CustomFormOrder {
|
||||
Name,
|
||||
Creation
|
||||
}
|
||||
|
||||
public enum CustomFormFilter {
|
||||
All,
|
||||
}
|
||||
|
||||
public enum CustomFormBulkAction {
|
||||
None,
|
||||
Publish,
|
||||
Unpublish,
|
||||
Delete
|
||||
}
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CustomForms.Models;
|
||||
|
||||
namespace Orchard.CustomForms.ViewModels {
|
||||
|
||||
public class CustomFormIndexViewModel {
|
||||
public IList<CustomFormEntry> CustomForms { get; set; }
|
||||
public CustomFormIndexOptions Options { get; set; }
|
||||
public dynamic Pager { get; set; }
|
||||
}
|
||||
|
||||
public class CustomFormEntry {
|
||||
public CustomFormPart CustomForm { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
}
|
||||
|
||||
public class CustomFormIndexOptions {
|
||||
public string Search { get; set; }
|
||||
public CustomFormOrder Order { get; set; }
|
||||
public CustomFormFilter Filter { get; set; }
|
||||
public CustomFormBulkAction BulkAction { get; set; }
|
||||
}
|
||||
|
||||
public enum CustomFormOrder {
|
||||
Name,
|
||||
Creation
|
||||
}
|
||||
|
||||
public enum CustomFormFilter {
|
||||
All,
|
||||
}
|
||||
|
||||
public enum CustomFormBulkAction {
|
||||
None,
|
||||
Publish,
|
||||
Unpublish,
|
||||
Delete
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CustomForms.Models;
|
||||
|
||||
namespace Orchard.CustomForms.ViewModels {
|
||||
public class CustomFormPartEditViewModel {
|
||||
public IEnumerable<string> ContentTypes { get; set; }
|
||||
public CustomFormPart CustomFormPart { get; set; }
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CustomForms.Models;
|
||||
|
||||
namespace Orchard.CustomForms.ViewModels {
|
||||
public class CustomFormPartEditViewModel {
|
||||
public IEnumerable<string> ContentTypes { get; set; }
|
||||
public CustomFormPart CustomFormPart { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,81 +1,81 @@
|
||||
@using Orchard.CustomForms.ViewModels
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.CustomForms.ViewModels.CustomFormIndexViewModel
|
||||
|
||||
@{
|
||||
var formIndex = 0;
|
||||
|
||||
var pageSizes = new List<int?>() { 10, 50, 100 };
|
||||
var defaultPageSize = WorkContext.CurrentSite.PageSize;
|
||||
if(!pageSizes.Contains(defaultPageSize)) {
|
||||
pageSizes.Add(defaultPageSize);
|
||||
}
|
||||
}
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Custom Forms").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<div class="manage">@Html.ActionLink(T("Add a new Custom Form").ToString(), "Create", "Admin", new { area = "Contents", id = "CustomForm", returUrl = Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
||||
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.None, T("Choose action...").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Publish, T("Publish").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Unpublish, T("Unpublish").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Delete, T("Delete").ToString())
|
||||
</select>
|
||||
<button type="submit" name="submit.BulkEdit" value="@T("Apply")">@T("Apply")</button>
|
||||
</fieldset>
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="filterResults">@T("Sort by:")</label>
|
||||
<select id="filterResults" name="@Html.NameOf(m => m.Options.Order)">
|
||||
@Html.SelectOption(Model.Options.Order, CustomFormOrder.Creation, T("Creation date").ToString())
|
||||
</select>
|
||||
<input type="hidden" name="Page" value="1" />
|
||||
<label for="pageSize">@T("Show:")</label>
|
||||
<select id="pageSize" name="PageSize">
|
||||
@Html.SelectOption((int)Model.Pager.PageSize, 0, T("All").ToString())
|
||||
@foreach(int size in pageSizes.OrderBy(p => p)) {
|
||||
@Html.SelectOption((int)Model.Pager.PageSize, size, size.ToString())
|
||||
}
|
||||
</select>
|
||||
<button type="submit" name="submit.Filter" value="@T("Filter")">@T("Filter")</button>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<table class="items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" class="check-all"/></th>
|
||||
<th scope="col">@T("Title")</th>
|
||||
<th scope="col">@T("Content Type")</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var entry in Model.CustomForms) {
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" value="@Model.CustomForms[formIndex].CustomForm.Id" name="@Html.NameOf(m => m.CustomForms[formIndex].CustomForm.Id)"/>
|
||||
<input type="checkbox" value="true" name="@Html.NameOf(m => m.CustomForms[formIndex].IsChecked)"/>
|
||||
</td>
|
||||
<td>
|
||||
@Html.ItemEditLink(entry.CustomForm.Title, entry.CustomForm.ContentItem)
|
||||
@if (entry.CustomForm.ContentItem.ContentType == "CustomFormWidget") {
|
||||
@T("-")<text> </text>@T("Widget")
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@entry.CustomForm.ContentType.CamelFriendly()
|
||||
</td>
|
||||
<td>
|
||||
@Html.ItemEditLink(T("Edit").Text, entry.CustomForm.ContentItem) @T(" | ")
|
||||
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(entry.CustomForm.ContentItem, new { returnUrl = Request.RawUrl }), new { itemprop = "RemoveUrl UnsafeUrl" }) @T(" | ")
|
||||
@Html.ActionLink(T("Submissions").Text, "Item", "Admin", new { area = "Orchard.CustomForms", id = entry.CustomForm.Id }, new { })
|
||||
</td>
|
||||
</tr>
|
||||
formIndex++;
|
||||
}
|
||||
</table>
|
||||
@Display(Model.Pager)
|
||||
</fieldset>
|
||||
@using Orchard.CustomForms.ViewModels
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.CustomForms.ViewModels.CustomFormIndexViewModel
|
||||
|
||||
@{
|
||||
var formIndex = 0;
|
||||
|
||||
var pageSizes = new List<int?>() { 10, 50, 100 };
|
||||
var defaultPageSize = WorkContext.CurrentSite.PageSize;
|
||||
if(!pageSizes.Contains(defaultPageSize)) {
|
||||
pageSizes.Add(defaultPageSize);
|
||||
}
|
||||
}
|
||||
|
||||
<h1>@Html.TitleForPage(T("Manage Custom Forms").ToString()) </h1>
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<div class="manage">@Html.ActionLink(T("Add a new Custom Form").ToString(), "Create", "Admin", new { area = "Contents", id = "CustomForm", returUrl = Request.RawUrl }, new { @class = "button primaryAction" })</div>
|
||||
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="@Html.NameOf(m => m.Options.BulkAction)">
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.None, T("Choose action...").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Publish, T("Publish").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Unpublish, T("Unpublish").ToString())
|
||||
@Html.SelectOption(Model.Options.BulkAction, CustomFormBulkAction.Delete, T("Delete").ToString())
|
||||
</select>
|
||||
<button type="submit" name="submit.BulkEdit" value="@T("Apply")">@T("Apply")</button>
|
||||
</fieldset>
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="filterResults">@T("Sort by:")</label>
|
||||
<select id="filterResults" name="@Html.NameOf(m => m.Options.Order)">
|
||||
@Html.SelectOption(Model.Options.Order, CustomFormOrder.Creation, T("Creation date").ToString())
|
||||
</select>
|
||||
<input type="hidden" name="Page" value="1" />
|
||||
<label for="pageSize">@T("Show:")</label>
|
||||
<select id="pageSize" name="PageSize">
|
||||
@Html.SelectOption((int)Model.Pager.PageSize, 0, T("All").ToString())
|
||||
@foreach(int size in pageSizes.OrderBy(p => p)) {
|
||||
@Html.SelectOption((int)Model.Pager.PageSize, size, size.ToString())
|
||||
}
|
||||
</select>
|
||||
<button type="submit" name="submit.Filter" value="@T("Filter")">@T("Filter")</button>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<table class="items">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><input type="checkbox" class="check-all"/></th>
|
||||
<th scope="col">@T("Title")</th>
|
||||
<th scope="col">@T("Content Type")</th>
|
||||
<th scope="col"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var entry in Model.CustomForms) {
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" value="@Model.CustomForms[formIndex].CustomForm.Id" name="@Html.NameOf(m => m.CustomForms[formIndex].CustomForm.Id)"/>
|
||||
<input type="checkbox" value="true" name="@Html.NameOf(m => m.CustomForms[formIndex].IsChecked)"/>
|
||||
</td>
|
||||
<td>
|
||||
@Html.ItemEditLink(entry.CustomForm.Title, entry.CustomForm.ContentItem)
|
||||
@if (entry.CustomForm.ContentItem.ContentType == "CustomFormWidget") {
|
||||
@T("-")<text> </text>@T("Widget")
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@entry.CustomForm.ContentType.CamelFriendly()
|
||||
</td>
|
||||
<td>
|
||||
@Html.ItemEditLink(T("Edit").Text, entry.CustomForm.ContentItem) @T(" | ")
|
||||
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(entry.CustomForm.ContentItem, new { returnUrl = Request.RawUrl }), new { itemprop = "RemoveUrl UnsafeUrl" }) @T(" | ")
|
||||
@Html.ActionLink(T("Submissions").Text, "Item", "Admin", new { area = "Orchard.CustomForms", id = entry.CustomForm.Id }, new { })
|
||||
</td>
|
||||
</tr>
|
||||
formIndex++;
|
||||
}
|
||||
</table>
|
||||
@Display(Model.Pager)
|
||||
</fieldset>
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
@using Orchard.Core.Contents.ViewModels;
|
||||
@using Orchard.Utility.Extensions;
|
||||
|
||||
@{
|
||||
Model.List.Classes.Add("content-items");
|
||||
}
|
||||
|
||||
@if (Model.List.Items.Count > 0) {
|
||||
using (Html.BeginFormAntiForgeryPost(Url.Action("List", "Admin", new { area = "Contents", id = "" }))) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="Options.BulkAction">
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.None, T("Choose action...").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.PublishNow, T("Publish Now").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Unpublish, T("Unpublish").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
|
||||
</select>
|
||||
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
|
||||
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
|
||||
</fieldset>
|
||||
<fieldset class="contentItems bulk-items">
|
||||
@Display(Model.List)
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
else {
|
||||
<div class="info message">@T("There are no submissions for this form.")</div>
|
||||
}
|
||||
|
||||
@using Orchard.Core.Contents.ViewModels;
|
||||
@using Orchard.Utility.Extensions;
|
||||
|
||||
@{
|
||||
Model.List.Classes.Add("content-items");
|
||||
}
|
||||
|
||||
@if (Model.List.Items.Count > 0) {
|
||||
using (Html.BeginFormAntiForgeryPost(Url.Action("List", "Admin", new { area = "Contents", id = "" }))) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="Options.BulkAction">
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.None, T("Choose action...").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.PublishNow, T("Publish Now").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Unpublish, T("Unpublish").ToString())
|
||||
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
|
||||
</select>
|
||||
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
|
||||
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
|
||||
</fieldset>
|
||||
<fieldset class="contentItems bulk-items">
|
||||
@Display(Model.List)
|
||||
</fieldset>
|
||||
}
|
||||
}
|
||||
else {
|
||||
<div class="info message">@T("There are no submissions for this form.")</div>
|
||||
}
|
||||
|
||||
@Display(Model.Pager)
|
||||
@@ -1,49 +1,49 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.CustomForms.ViewModels.CustomFormPartEditViewModel
|
||||
|
||||
@Display.TokenHint()
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.ContentType)">@T("Content Type")</label>
|
||||
<select id="@Html.FieldIdFor(m => m.CustomFormPart.ContentType)" name="@Html.FieldNameFor(m => m.CustomFormPart.ContentType)">
|
||||
@foreach(string contentType in Model.ContentTypes) {
|
||||
@Html.SelectOption(contentType, contentType.Equals(Model.CustomFormPart.ContentType, StringComparison.OrdinalIgnoreCase), contentType.CamelFriendly())
|
||||
}
|
||||
</select>
|
||||
<span class="hint">@T("Select the content type which will be used to render the custom form.")</span>
|
||||
@Html.ValidationMessageFor(m => m.CustomFormPart.ContentType)
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.SaveContentItem)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.SaveContentItem)" class="forcheckbox">@T("Save the content item once the form is submitted")</label>
|
||||
<span class="hint">@T("Check if you want to save the content item associated to the form. Leave empty if you just want to trigger an action on the event.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.CustomMessage)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.CustomMessage)" class="forcheckbox">@T("Specify a custom message when the form is submitted")</label>
|
||||
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.CustomFormPart.CustomMessage)">
|
||||
@Html.LabelFor(m => m.CustomFormPart.Message)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.Message, new { @class = "text large"})
|
||||
<span class="hint">@T("The custom message to display to the user when the form is submitted. Leave empty if no messages should be displayed.")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.CustomFormPart.SubmitButtonText)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.SubmitButtonText, new { @class = "text large", @Value = (Model.CustomFormPart.SubmitButtonText ?? @T("Submit").Text) })
|
||||
<span class="hint">@T("The text of the submit button.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.Redirect)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.Redirect)" class="forcheckbox">@T("Redirect the user once the form is submitted")</label>
|
||||
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.CustomFormPart.Redirect)">
|
||||
@Html.LabelFor(m => m.CustomFormPart.RedirectUrl)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.RedirectUrl, new { @class = "text large tokenized" })
|
||||
<span class="hint">@T("The url the user should be redirected to once the form is successfully submitted. e.g.: ~/About")</span>
|
||||
</div>
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.CustomForms.ViewModels.CustomFormPartEditViewModel
|
||||
|
||||
@Display.TokenHint()
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.ContentType)">@T("Content Type")</label>
|
||||
<select id="@Html.FieldIdFor(m => m.CustomFormPart.ContentType)" name="@Html.FieldNameFor(m => m.CustomFormPart.ContentType)">
|
||||
@foreach(string contentType in Model.ContentTypes) {
|
||||
@Html.SelectOption(contentType, contentType.Equals(Model.CustomFormPart.ContentType, StringComparison.OrdinalIgnoreCase), contentType.CamelFriendly())
|
||||
}
|
||||
</select>
|
||||
<span class="hint">@T("Select the content type which will be used to render the custom form.")</span>
|
||||
@Html.ValidationMessageFor(m => m.CustomFormPart.ContentType)
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.SaveContentItem)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.SaveContentItem)" class="forcheckbox">@T("Save the content item once the form is submitted")</label>
|
||||
<span class="hint">@T("Check if you want to save the content item associated to the form. Leave empty if you just want to trigger an action on the event.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.CustomMessage)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.CustomMessage)" class="forcheckbox">@T("Specify a custom message when the form is submitted")</label>
|
||||
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.CustomFormPart.CustomMessage)">
|
||||
@Html.LabelFor(m => m.CustomFormPart.Message)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.Message, new { @class = "text large"})
|
||||
<span class="hint">@T("The custom message to display to the user when the form is submitted. Leave empty if no messages should be displayed.")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.CustomFormPart.SubmitButtonText)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.SubmitButtonText, new { @class = "text large", @Value = (Model.CustomFormPart.SubmitButtonText ?? @T("Submit").Text) })
|
||||
<span class="hint">@T("The text of the submit button.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.CustomFormPart.Redirect)
|
||||
<label for="@Html.FieldIdFor(m => m.CustomFormPart.Redirect)" class="forcheckbox">@T("Redirect the user once the form is submitted")</label>
|
||||
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.CustomFormPart.Redirect)">
|
||||
@Html.LabelFor(m => m.CustomFormPart.RedirectUrl)
|
||||
@Html.TextBoxFor(m => m.CustomFormPart.RedirectUrl, new { @class = "text large tokenized" })
|
||||
<span class="hint">@T("The url the user should be redirected to once the form is successfully submitted. e.g.: ~/About")</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -1,26 +1,26 @@
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Utility.Extensions
|
||||
@{
|
||||
ContentItem customForm = Model.ContentItem;
|
||||
string returnUrl = Model.ReturnUrl;
|
||||
|
||||
Html.AddPageClassNames("edit-" + customForm.ContentType.HtmlClassify());
|
||||
|
||||
// remove default Save/Publish buttons
|
||||
Model.Zones["Sidebar"].Items.Clear();
|
||||
|
||||
var submitButtonText = String.IsNullOrEmpty(Model.ContentItem.CustomFormPart.SubmitButtonText) ? T("Submit").Text : Model.ContentItem.CustomFormPart.SubmitButtonText;
|
||||
}
|
||||
|
||||
@Display(New.Parts_Title().Title(Html.ItemDisplayText(customForm)))
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(returnUrl)) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
<fieldset class="submit-button">
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@submitButtonText</button>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Utility.Extensions
|
||||
@{
|
||||
ContentItem customForm = Model.ContentItem;
|
||||
string returnUrl = Model.ReturnUrl;
|
||||
|
||||
Html.AddPageClassNames("edit-" + customForm.ContentType.HtmlClassify());
|
||||
|
||||
// remove default Save/Publish buttons
|
||||
Model.Zones["Sidebar"].Items.Clear();
|
||||
|
||||
var submitButtonText = String.IsNullOrEmpty(Model.ContentItem.CustomFormPart.SubmitButtonText) ? T("Submit").Text : Model.ContentItem.CustomFormPart.SubmitButtonText;
|
||||
}
|
||||
|
||||
@Display(New.Parts_Title().Title(Html.ItemDisplayText(customForm)))
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(returnUrl)) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
|
||||
<fieldset class="submit-button">
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@submitButtonText</button>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@using Orchard.ContentManagement;
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Item", new { area = "Orchard.CustomForms", id = Model.ContentPart.ContentType }))) {
|
||||
@Html.ValidationSummary()
|
||||
@Display(Model.Editor)
|
||||
}
|
||||
@using Orchard.ContentManagement;
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Item", new { area = "Orchard.CustomForms", id = Model.ContentPart.ContentType }))) {
|
||||
@Html.ValidationSummary()
|
||||
@Display(Model.Editor)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@using Orchard.ContentManagement;
|
||||
@{
|
||||
ContentItem contentItem = Model.ContentItem;
|
||||
}
|
||||
|
||||
<div>
|
||||
@T("Renders a form for {0}", Model.ContentPart.ContentType)
|
||||
@using Orchard.ContentManagement;
|
||||
@{
|
||||
ContentItem contentItem = Model.ContentItem;
|
||||
}
|
||||
|
||||
<div>
|
||||
@T("Renders a form for {0}", Model.ContentPart.ContentType)
|
||||
</div>
|
||||
@@ -1,22 +1,22 @@
|
||||
@{
|
||||
dynamic editor = Model.Editor;
|
||||
|
||||
if (TempData.ContainsKey("CustomFormWidget.InvalidCustomFormState")) {
|
||||
editor = TempData["CustomFormWidget.InvalidCustomFormState"];
|
||||
}
|
||||
|
||||
// remove default Save/Publish buttons
|
||||
editor.Zones["Sidebar"].Items.Clear();
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Item", new { area = "Orchard.CustomForms", id = Model.ContentItem.Id }))) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(editor)
|
||||
|
||||
@Html.Hidden("returnUrl", Request.RawUrl, new { id = string.Empty });
|
||||
|
||||
<fieldset class="submit-button">
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@Model.ContentPart.SubmitButtonText</button>
|
||||
</fieldset>
|
||||
}
|
||||
@{
|
||||
dynamic editor = Model.Editor;
|
||||
|
||||
if (TempData.ContainsKey("CustomFormWidget.InvalidCustomFormState")) {
|
||||
editor = TempData["CustomFormWidget.InvalidCustomFormState"];
|
||||
}
|
||||
|
||||
// remove default Save/Publish buttons
|
||||
editor.Zones["Sidebar"].Items.Clear();
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Item", new { area = "Orchard.CustomForms", id = Model.ContentItem.Id }))) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(editor)
|
||||
|
||||
@Html.Hidden("returnUrl", Request.RawUrl, new { id = string.Empty });
|
||||
|
||||
<fieldset class="submit-button">
|
||||
<button type="submit" name="submit.Save" value="submit.Save">@Model.ContentPart.SubmitButtonText</button>
|
||||
</fieldset>
|
||||
}
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<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.Web.WebPages"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5.1">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework"/>
|
||||
<add assembly="Orchard.Core"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<!-- NOTE: These binding redirects have no runtime effect; they are only here to avoid build warnings. -->
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863AF14B0044DA" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<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.Web.WebPages"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5.1">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework"/>
|
||||
<add assembly="Orchard.Core"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<!-- NOTE: These binding redirects have no runtime effect; they are only here to avoid build warnings. -->
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863AF14B0044DA" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user