- Removing the old CMS Pages package in favor of a new Pages package based on the new content manager and content item model (still very close to old package at this point)
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045066
@@ -115,9 +115,9 @@
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Packages\Orchard.CmsPages\Orchard.CmsPages.csproj">
|
||||
<Project>{1ECC1131-0D0C-4822-AD90-E979868C63F3}</Project>
|
||||
<Name>Orchard.CmsPages</Name>
|
||||
<ProjectReference Include="..\Orchard.Web\Packages\Orchard.Pages\Orchard.Pages.csproj">
|
||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
||||
<Name>Orchard.Pages</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Packages\Orchard.Roles\Orchard.Roles.csproj">
|
||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||
|
@@ -1,23 +1,21 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Controllers;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Pages.Controllers;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Pages.ViewModels;
|
||||
using Orchard.Data;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Utility;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Controllers {
|
||||
[TestFixture]
|
||||
@@ -44,7 +42,7 @@ namespace Orchard.Tests.Packages.Pages.Controllers {
|
||||
_slugPageId = page.Id;
|
||||
|
||||
_controller = _container.Resolve<AdminController>();
|
||||
_controller.ControllerContext = new ControllerContext(new StubHttpContext("~/admin/cmspages"), new RouteData(), _controller);
|
||||
_controller.ControllerContext = new ControllerContext(new StubHttpContext("~/admin/pages"), new RouteData(), _controller);
|
||||
}
|
||||
|
||||
public override void Register(Autofac.Builder.ContainerBuilder builder) {
|
||||
|
@@ -3,11 +3,10 @@ using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Autofac.Builder;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Controllers;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.Pages.Controllers;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Pages.Models;
|
||||
using System.Web;
|
||||
using Orchard.Tests.Packages.Pages.Services.Templates;
|
||||
|
||||
|
@@ -4,10 +4,9 @@ using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using Autofac.Builder;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services {
|
||||
|
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services {
|
||||
|
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Routing;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.Pages.Services;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services {
|
||||
[TestFixture]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services.Templates {
|
||||
[TestFixture]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services.Templates {
|
||||
[TestFixture]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using NUnit.Framework;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services.Templates {
|
||||
[TestFixture]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services.Templates {
|
||||
public class StubTemplateEntryProvider : ITemplateEntryProvider {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services;
|
||||
|
||||
namespace Orchard.Tests.Packages.Pages.Services {
|
||||
public static class TestExtensions {
|
||||
|
@@ -109,10 +109,6 @@
|
||||
<Project>{63FBD4D9-E1DA-4A7B-AA6A-D6074FE50867}</Project>
|
||||
<Name>Orchard.Blogs</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="Packages\Orchard.CmsPages\Orchard.CmsPages.csproj">
|
||||
<Project>{1ECC1131-0D0C-4822-AD90-E979868C63F3}</Project>
|
||||
<Name>Orchard.CmsPages</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="Packages\Orchard.Comments\Orchard.Comments.csproj">
|
||||
<Project>{14C049FD-B35B-415A-A824-87F26B26E7FD}</Project>
|
||||
<Name>Orchard.Comments</Name>
|
||||
@@ -125,6 +121,10 @@
|
||||
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
||||
<Name>Orchard.Media</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="Packages\Orchard.Pages\Orchard.Pages.csproj">
|
||||
<Project>{4A9C04A6-0986-4A92-A610-5F59FF273FB9}</Project>
|
||||
<Name>Orchard.Pages</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="Packages\Orchard.Roles\Orchard.Roles.csproj">
|
||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||
<Name>Orchard.Roles</Name>
|
||||
|
@@ -1,40 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.CmsPages {
|
||||
public class CmsPagesPermissionsProvider : IPermissionProvider {
|
||||
public static readonly Permission ViewPagesPermission = new Permission { Description = "Viewing CMS Pages", Name = "ViewPagesPermission" };
|
||||
public static readonly Permission CreatePagesPermission = new Permission { Description = "Creating CMS Pages", Name = "CreatePagesPermission" };
|
||||
public static readonly Permission CreateDraftPagesPermission = new Permission { Description = "Creating CMS Page Drafts", Name = "CreateDraftPagesPermission" };
|
||||
public static readonly Permission DeleteDraftPagesPermission = new Permission { Description = "Deleting CMS Page Drafts", Name = "DeleteDraftPagesPermission" };
|
||||
public static readonly Permission ModifyPagesPermission = new Permission { Description = "Modifying CMS Pages", Name = "ModifyPagesPermission" };
|
||||
public static readonly Permission DeletePagesPermission = new Permission { Description = "Deleting CMS Pages", Name = "DeletePagesPermission" };
|
||||
public static readonly Permission PublishPagesPermission = new Permission { Description = "Publishing CMS Pages", Name = "PublishPagesPermission" };
|
||||
public static readonly Permission UnpublishPagesPermission = new Permission { Description = "Unpublishing CMS Pages", Name = "UnpublishPagesPermission" };
|
||||
public static readonly Permission SchedulePagesPermission = new Permission { Description = "Scheduling CMS Pages", Name = "SchedulePagesPermission" };
|
||||
|
||||
#region Implementation of IPermissionProvider
|
||||
|
||||
public string PackageName {
|
||||
get {
|
||||
return "CmsPages";
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Permission> GetPermissions() {
|
||||
return new List<Permission> {
|
||||
ViewPagesPermission,
|
||||
CreatePagesPermission,
|
||||
CreateDraftPagesPermission,
|
||||
DeleteDraftPagesPermission,
|
||||
ModifyPagesPermission,
|
||||
DeletePagesPermission,
|
||||
PublishPagesPermission,
|
||||
UnpublishPagesPermission,
|
||||
SchedulePagesPermission
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Orchard.CmsPages.Models.Page">
|
||||
<Position X="7.75" Y="0.5" Width="1.75" />
|
||||
<AssociationLine Name="Revisions" Type="Orchard.CmsPages.Models.PageRevision" ManuallyRouted="true">
|
||||
<Path>
|
||||
<Point X="8.36" Y="2.247" />
|
||||
<Point X="8.36" Y="3.75" />
|
||||
</Path>
|
||||
</AssociationLine>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAAAAAAAAAAAAAAgEAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Models\Overrides.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Revisions" />
|
||||
<Property Name="Scheduled" />
|
||||
</ShowAsCollectionAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Orchard.CmsPages.Models.PageRevision">
|
||||
<Position X="7.75" Y="3.75" Width="2" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAEAAAEAgAQAAAkAAAAAAAgAAAARAAAA=</HashCode>
|
||||
<FileName>Models\Overrides.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Page" />
|
||||
</ShowAsAssociation>
|
||||
<ShowAsCollectionAssociation>
|
||||
<Property Name="Contents" />
|
||||
<Property Name="Scheduled" />
|
||||
</ShowAsCollectionAssociation>
|
||||
<Lollipop Position="0.2" />
|
||||
</Class>
|
||||
<Class Name="Orchard.CmsPages.Models.ContentItem">
|
||||
<Position X="8" Y="8" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAgBAAAAA=</HashCode>
|
||||
<FileName>Models\ContentItem.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="PageRevision" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="Orchard.CmsPages.Models.Published">
|
||||
<Position X="11.75" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAgAQAAAA=</HashCode>
|
||||
<FileName>Models\Published.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Page" />
|
||||
<Property Name="PageRevision" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Class Name="Orchard.CmsPages.Models.Scheduled">
|
||||
<Position X="3.75" Y="4" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAACAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAgAAAAAQ=</HashCode>
|
||||
<FileName>Models\Scheduled.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<ShowAsAssociation>
|
||||
<Property Name="Page" />
|
||||
<Property Name="PageRevision" />
|
||||
<Property Name="Action" />
|
||||
</ShowAsAssociation>
|
||||
</Class>
|
||||
<Enum Name="Orchard.CmsPages.Models.ScheduledAction">
|
||||
<Position X="3.75" Y="6.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAEAEAAAAAAAAAAAAAAAAAAAAACA=</HashCode>
|
||||
<FileName>Models\Scheduled.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
@@ -1,193 +0,0 @@
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1ECC1131-0D0C-4822-AD90-E979868C63F3}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Orchard.CmsPages</RootNamespace>
|
||||
<AssemblyName>Orchard.CmsPages</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web.Mobile" />
|
||||
<Reference Include="Yaml, Version=1.0.3370.39839, Culture=neutral, PublicKeyToken=187a3d240e44a135, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\yaml\Yaml.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Controllers\TemplatesController.cs" />
|
||||
<Compile Include="Models\ContentItem.cs" />
|
||||
<Compile Include="Models\ContentItemListModelBinder.cs" />
|
||||
<Compile Include="Models\ModelExtensions.cs" />
|
||||
<Compile Include="Models\Page.cs" />
|
||||
<Compile Include="Models\PageRevision.cs" />
|
||||
<Compile Include="Models\Published.cs" />
|
||||
<Compile Include="Models\Scheduled.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Routes.cs" />
|
||||
<Compile Include="Services\PageManager.cs" />
|
||||
<Compile Include="Services\PageScheduler.cs" />
|
||||
<Compile Include="Services\Templates\TemplateExtensions.cs" />
|
||||
<Compile Include="Services\Templates\TemplateProvider.cs" />
|
||||
<Compile Include="Services\Templates\CommentExtractor.cs" />
|
||||
<Compile Include="Services\Templates\TemplateEntry.cs" />
|
||||
<Compile Include="Services\Templates\TemplateEntryProvider.cs" />
|
||||
<Compile Include="Services\Templates\TemplateDescriptor.cs" />
|
||||
<Compile Include="Services\Templates\MetadataEntry.cs" />
|
||||
<Compile Include="Services\Templates\TemplateMetadataParser.cs" />
|
||||
<Compile Include="Services\XmlRpcHandler.cs" />
|
||||
<Compile Include="Services\SlugConstraint.cs" />
|
||||
<Compile Include="ViewModels\ChooseTemplateViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageCreateViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageEditViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageIndexViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Admin\images\draft.gif" />
|
||||
<Content Include="Content\Admin\images\offline.gif" />
|
||||
<Content Include="Content\Admin\images\online.gif" />
|
||||
<Content Include="Content\Admin\images\published.gif" />
|
||||
<Content Include="Content\Admin\images\scheduled.gif" />
|
||||
<Content Include="Package.txt" />
|
||||
<Content Include="Views\Admin\ChooseTemplate.aspx" />
|
||||
<Content Include="Views\Admin\BulkDeleteConfirm.aspx" />
|
||||
<Content Include="Views\Admin\BulkPublishLater.aspx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputTextPermalink.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\TemplateDescriptor.ascx" />
|
||||
<Content Include="Views\Admin\Export.aspx" />
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\Create.aspx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\PageCreateViewModel.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputTextLarge.ascx" />
|
||||
<Content Include="Views\Templates\ExtraUserControl.ascx" />
|
||||
<Content Include="Views\Templates\ThreeColumns.aspx" />
|
||||
<Content Include="Views\Templates\ThreeColumns.gif" />
|
||||
<Content Include="Views\Templates\TwoColumns.aspx" />
|
||||
<Content Include="Views\Templates\TwoColumns.gif" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Models\ModelDiagram.cd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target> -->
|
||||
<!-- To enable MVC area subproject support, uncomment the following two lines:
|
||||
<UsingTask TaskName="Microsoft.Web.Mvc.Build.CreateAreaManifest" AssemblyName="Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<UsingTask TaskName="Microsoft.Web.Mvc.Build.CopyAreaManifests" AssemblyName="Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
-->
|
||||
<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>30927</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 +0,0 @@
|
||||
name: Pages
|
@@ -1,37 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("Orchard.CmsPages")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("Orchard")]
|
||||
[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2009")]
|
||||
[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("9b100f80-3406-4e94-a1eb-8131be996f39")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
public class TemplateEntry {
|
||||
public string Name { get; set; }
|
||||
public TextReader Content { get; set; }
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*.aspx" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
<add path="*.ascx" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
<add path="*.master" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
<!-- todo: (heskew) put back into place when template thumbnails aren't being hit directly
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>-->
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*.aspx,*.ascx,*.master" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
|
||||
<!-- todo: (heskew) put back into place when template thumbnails aren't being hit directly
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>-->
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
@@ -1,154 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Note: As an alternative to hand editing this file you can use the
|
||||
web admin tool to configure settings for your application. Use
|
||||
the Website->Asp.Net Configuration option in Visual Studio.
|
||||
A full list of settings and comments can be found in
|
||||
machine.config.comments usually located in
|
||||
\Windows\Microsoft.Net\Framework\v2.x\Config
|
||||
-->
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
|
||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
|
||||
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
|
||||
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
|
||||
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
|
||||
<system.web>
|
||||
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<compilation debug="true">
|
||||
<assemblies>
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
|
||||
<error statusCode="403" redirect="NoAccess.htm" />
|
||||
<error statusCode="404" redirect="FileNotFound.htm" />
|
||||
</customErrors>
|
||||
-->
|
||||
|
||||
<pages>
|
||||
<controls>
|
||||
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
</controls>
|
||||
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc"/>
|
||||
<add namespace="System.Web.Mvc.Ajax"/>
|
||||
<add namespace="System.Web.Mvc.Html"/>
|
||||
<add namespace="System.Web.Routing"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
|
||||
<httpHandlers>
|
||||
<remove verb="*" path="*.asmx"/>
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
|
||||
<add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
</httpHandlers>
|
||||
|
||||
<httpModules>
|
||||
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</httpModules>
|
||||
|
||||
</system.web>
|
||||
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
|
||||
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<providerOption name="CompilerVersion" value="v3.5"/>
|
||||
<providerOption name="WarnAsError" value="false"/>
|
||||
</compiler>
|
||||
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
|
||||
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<providerOption name="CompilerVersion" value="v3.5"/>
|
||||
<providerOption name="OptionInfer" value="true"/>
|
||||
<providerOption name="WarnAsError" value="false"/>
|
||||
</compiler>
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
|
||||
<system.web.extensions/>
|
||||
|
||||
<!--
|
||||
The system.webServer section is required for running ASP.NET AJAX under Internet
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
|
||||
<modules runAllManagedModulesForAllRequests="true">
|
||||
<remove name="ScriptModule" />
|
||||
<remove name="UrlRoutingModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</modules>
|
||||
|
||||
<handlers>
|
||||
<remove name="WebServiceHandlerFactory-Integrated"/>
|
||||
<remove name="ScriptHandlerFactory" />
|
||||
<remove name="ScriptHandlerFactoryAppServices" />
|
||||
<remove name="ScriptResource" />
|
||||
<remove name="MvcHttpHandler" />
|
||||
<remove name="UrlRoutingHandler" />
|
||||
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
|
||||
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
|
||||
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
</configuration>
|
@@ -1,14 +1,14 @@
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.CmsPages {
|
||||
namespace Orchard.Pages {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add("Pages", "1",
|
||||
menu => menu
|
||||
.Add("Manage Pages", "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.CmsPages" }))
|
||||
.Add("Add New Page", "1.1", item => item.Action("Create", "Admin", new { area = "Orchard.CmsPages" }).Permission(Permissions.CreatePages))
|
||||
.Add("Manage Pages", "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Pages" }))
|
||||
.Add("Add New Page", "1.1", item => item.Action("Create", "Admin", new { area = "Orchard.Pages" }).Permission(Permissions.CreatePages))
|
||||
);
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -4,18 +4,17 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Pages.ViewModels;
|
||||
using Orchard.Data;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.CmsPages.Controllers {
|
||||
namespace Orchard.Pages.Controllers {
|
||||
[ValidateInput(false)]
|
||||
public class AdminController : Controller {
|
||||
private readonly IPageManager _pageManager;
|
||||
@@ -206,7 +205,7 @@ namespace Orchard.CmsPages.Controllers {
|
||||
if (!_authorizer.Authorize(Permissions.CreatePages, T("Couldn't create page")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
Logger.Information("Creating CmsPage slug:{0} title{1}: template{2}",
|
||||
Logger.Information("Creating Page slug:{0} title{1}: template{2}",
|
||||
viewModel.Slug, viewModel.Title, viewModel.TemplateName);
|
||||
var revision = _pageManager.CreatePage(new CreatePageParams(viewModel.Title, viewModel.Slug, viewModel.TemplateName));
|
||||
return RedirectToAction("Edit", new { revision.Page.Id });
|
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.Pages.Services;
|
||||
|
||||
namespace Orchard.CmsPages.Controllers {
|
||||
namespace Orchard.Pages.Controllers {
|
||||
public class TemplatesController : Controller {
|
||||
private readonly IPageManager _pageManager;
|
||||
private readonly ISlugConstraint _slugConstraint;
|
@@ -1,4 +1,4 @@
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
public partial class ContentItem {
|
||||
public virtual int Id { get; set; }
|
||||
public virtual PageRevision PageRevision { get; set; }
|
@@ -2,7 +2,7 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Mvc.ModelBinders;
|
||||
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
public class ContentItemListModelBinder : IModelBinderProvider {
|
||||
private readonly ModelBinderDictionary _binders;
|
||||
private readonly ModelMetadataProvider _provider;
|
@@ -1,4 +1,4 @@
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
public static class ModelExtensions {
|
||||
public static bool IsPublished(this PageRevision revision) {
|
||||
if (revision != null &&
|
@@ -3,7 +3,7 @@ using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Automapping.Alterations;
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
|
||||
public class Page {
|
||||
public Page() {
|
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Data.Conventions;
|
||||
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
|
||||
public class PageRevision {
|
||||
public PageRevision() {
|
@@ -1,4 +1,4 @@
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
public class Published {
|
||||
public virtual int Id { get; set; }
|
||||
public virtual string Slug { get; set; }
|
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Orchard.CmsPages.Models {
|
||||
namespace Orchard.Pages.Models {
|
||||
public enum ScheduledAction {
|
||||
Undefined,
|
||||
Publish,
|
@@ -31,6 +31,14 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
@@ -59,18 +67,78 @@
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web.Mobile" />
|
||||
<Reference Include="Yaml, Version=1.0.3370.39839, Culture=neutral, PublicKeyToken=187a3d240e44a135, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\yaml\Yaml.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Controllers\TemplatesController.cs" />
|
||||
<Compile Include="Models\ContentItem.cs" />
|
||||
<Compile Include="Models\ContentItemListModelBinder.cs" />
|
||||
<Compile Include="Models\ModelExtensions.cs" />
|
||||
<Compile Include="Models\Page.cs" />
|
||||
<Compile Include="Models\PageRevision.cs" />
|
||||
<Compile Include="Models\Published.cs" />
|
||||
<Compile Include="Models\Scheduled.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Routes.cs" />
|
||||
<Compile Include="Services\PageManager.cs" />
|
||||
<Compile Include="Services\PageScheduler.cs" />
|
||||
<Compile Include="Services\SlugConstraint.cs" />
|
||||
<Compile Include="Services\Templates\CommentExtractor.cs" />
|
||||
<Compile Include="Services\Templates\MetadataEntry.cs" />
|
||||
<Compile Include="Services\Templates\TemplateDescriptor.cs" />
|
||||
<Compile Include="Services\Templates\TemplateEntry.cs" />
|
||||
<Compile Include="Services\Templates\TemplateEntryProvider.cs" />
|
||||
<Compile Include="Services\Templates\TemplateExtensions.cs" />
|
||||
<Compile Include="Services\Templates\TemplateMetadataParser.cs" />
|
||||
<Compile Include="Services\Templates\TemplateProvider.cs" />
|
||||
<Compile Include="Services\XmlRpcHandler.cs" />
|
||||
<Compile Include="ViewModels\ChooseTemplateViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageCreateViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageEditViewModel.cs" />
|
||||
<Compile Include="ViewModels\PageIndexViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\Admin\images\draft.gif" />
|
||||
<Content Include="Content\Admin\images\offline.gif" />
|
||||
<Content Include="Content\Admin\images\online.gif" />
|
||||
<Content Include="Content\Admin\images\published.gif" />
|
||||
<Content Include="Content\Admin\images\scheduled.gif" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Package.txt" />
|
||||
<Content Include="Views\Admin\BulkDeleteConfirm.aspx" />
|
||||
<Content Include="Views\Admin\BulkPublishLater.aspx" />
|
||||
<Content Include="Views\Admin\ChooseTemplate.aspx" />
|
||||
<Content Include="Views\Admin\Create.aspx" />
|
||||
<Content Include="Views\Admin\Edit.aspx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputTextLarge.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\inputTextPermalink.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\PageCreateViewModel.ascx" />
|
||||
<Content Include="Views\Admin\EditorTemplates\TemplateDescriptor.ascx" />
|
||||
<Content Include="Views\Admin\Export.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\Templates\ExtraUserControl.ascx" />
|
||||
<Content Include="Views\Templates\ThreeColumns.aspx" />
|
||||
<Content Include="Views\Templates\ThreeColumns.gif" />
|
||||
<Content Include="Views\Templates\TwoColumns.aspx" />
|
||||
<Content Include="Views\Templates\TwoColumns.gif" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Models\" />
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@@ -1 +1 @@
|
||||
name: NewPages
|
||||
name: Pages
|
||||
|
@@ -1,21 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.CmsPages {
|
||||
namespace Orchard.Pages {
|
||||
public class Permissions : IPermissionProvider {
|
||||
public static readonly Permission ViewPages = new Permission { Description = "Viewing CMS Pages", Name = "ViewPages" };
|
||||
public static readonly Permission CreatePages = new Permission { Description = "Creating CMS Pages", Name = "CreatePages" };
|
||||
public static readonly Permission CreateDraftPages = new Permission { Description = "Creating CMS Page Drafts", Name = "CreateDraftPages" };
|
||||
public static readonly Permission DeleteDraftPages = new Permission { Description = "Deleting CMS Page Drafts", Name = "DeleteDraftPages" };
|
||||
public static readonly Permission ModifyPages = new Permission { Description = "Modifying CMS Pages", Name = "ModifyPages" };
|
||||
public static readonly Permission DeletePages = new Permission { Description = "Deleting CMS Pages", Name = "DeletePages" };
|
||||
public static readonly Permission PublishPages = new Permission { Description = "Publishing CMS Pages", Name = "PublishPages" };
|
||||
public static readonly Permission UnpublishPages = new Permission { Description = "Unpublishing CMS Pages", Name = "UnpublishPages" };
|
||||
public static readonly Permission SchedulePages = new Permission { Description = "Scheduling CMS Pages", Name = "SchedulePages" };
|
||||
public static readonly Permission ViewPages = new Permission { Description = "Viewing Pages", Name = "ViewPages" };
|
||||
public static readonly Permission CreatePages = new Permission { Description = "Creating Pages", Name = "CreatePages" };
|
||||
public static readonly Permission CreateDraftPages = new Permission { Description = "Creating Page Drafts", Name = "CreateDraftPages" };
|
||||
public static readonly Permission DeleteDraftPages = new Permission { Description = "Deleting Page Drafts", Name = "DeleteDraftPages" };
|
||||
public static readonly Permission ModifyPages = new Permission { Description = "Modifying Pages", Name = "ModifyPages" };
|
||||
public static readonly Permission DeletePages = new Permission { Description = "Deleting Pages", Name = "DeletePages" };
|
||||
public static readonly Permission PublishPages = new Permission { Description = "Publishing Pages", Name = "PublishPages" };
|
||||
public static readonly Permission UnpublishPages = new Permission { Description = "Unpublishing Pages", Name = "UnpublishPages" };
|
||||
public static readonly Permission SchedulePages = new Permission { Description = "Scheduling Pages", Name = "SchedulePages" };
|
||||
|
||||
public string PackageName {
|
||||
get {
|
||||
return "CmsPages";
|
||||
return "NewPages";
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.CmsPages.Services;
|
||||
using Orchard.Mvc.Routes;
|
||||
using Orchard.Pages.Services;
|
||||
|
||||
namespace Orchard.CmsPages {
|
||||
|
||||
namespace Orchard.Pages {
|
||||
public class Routes : IRouteProvider {
|
||||
private readonly ISlugConstraint _slugConstraint;
|
||||
|
||||
@@ -25,7 +24,7 @@ namespace Orchard.CmsPages {
|
||||
Route = new Route(
|
||||
"{*slug}",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.CmsPages"},
|
||||
{"area", "Orchard.Pages"},
|
||||
{"controller", "templates"},
|
||||
{"action", "show"}
|
||||
},
|
||||
@@ -33,7 +32,7 @@ namespace Orchard.CmsPages {
|
||||
{"slug", _slugConstraint}
|
||||
},
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.CmsPages"}
|
||||
{"area", "Orchard.Pages"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
}
|
@@ -2,15 +2,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Data;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Services;
|
||||
using Orchard.Utility;
|
||||
|
||||
namespace Orchard.CmsPages.Services {
|
||||
namespace Orchard.Pages.Services {
|
||||
|
||||
public enum PublishHistory {
|
||||
Default,
|
||||
@@ -23,7 +22,7 @@ namespace Orchard.CmsPages.Services {
|
||||
}
|
||||
|
||||
public class CreatePageParams {
|
||||
public CreatePageParams(){}
|
||||
public CreatePageParams() { }
|
||||
public CreatePageParams(string title, string slug, string templateName) {
|
||||
Title = title;
|
||||
Slug = slug;
|
||||
@@ -111,13 +110,14 @@ namespace Orchard.CmsPages.Services {
|
||||
}
|
||||
|
||||
foreach (var zone in templateDescriptor.Zones) {
|
||||
if (revision.Contents.Any(r=>r.ZoneName==zone)) {
|
||||
string s = zone;
|
||||
if (revision.Contents.Any(r => r.ZoneName == s)) {
|
||||
// take no action if content for a zone is already present
|
||||
continue;
|
||||
}
|
||||
|
||||
// add an item for the named zone
|
||||
revision.Contents.Add(new ContentItem {PageRevision = revision, ZoneName = zone});
|
||||
revision.Contents.Add(new ContentItem { PageRevision = revision, ZoneName = zone });
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Services;
|
||||
using Orchard.Tasks;
|
||||
|
||||
namespace Orchard.CmsPages.Services {
|
||||
namespace Orchard.Pages.Services {
|
||||
public interface IPageScheduler : IBackgroundTask {
|
||||
void AddPublishTask(PageRevision revision, DateTime moment);
|
||||
void ClearTasks(Page page);
|
||||
@@ -76,7 +75,7 @@ namespace Orchard.CmsPages.Services {
|
||||
public void ClearTasks(Page page) {
|
||||
#warning UNIT TEST!!!!
|
||||
var tasks = _scheduledRepository.Fetch(x => x.Page == page);
|
||||
foreach(var task in tasks) {
|
||||
foreach (var task in tasks) {
|
||||
task.Page.Scheduled.Remove(task);
|
||||
task.PageRevision.Scheduled.Remove(task);
|
||||
task.Page = null;
|
||||
@@ -114,7 +113,7 @@ namespace Orchard.CmsPages.Services {
|
||||
_pageManager.Publish(scheduled.PageRevision, new PublishOptions());
|
||||
}
|
||||
|
||||
private void ProcessUnpublish(Scheduled scheduled) {
|
||||
private static void ProcessUnpublish(Scheduled scheduled) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
@@ -1,18 +1,18 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Tasks;
|
||||
|
||||
namespace Orchard.CmsPages.Services {
|
||||
namespace Orchard.Pages.Services {
|
||||
public interface ISlugConstraint : IRouteConstraint, ISingletonDependency {
|
||||
void SetCurrentlyPublishedSlugs(IEnumerable<string> slugs);
|
||||
string LookupPublishedSlug(string slug);
|
||||
}
|
||||
|
||||
public class SlugConstraint : ISlugConstraint {
|
||||
private IDictionary<string, string> _currentlyPublishedSlugs = new Dictionary<string,string>();
|
||||
private IDictionary<string, string> _currentlyPublishedSlugs = new Dictionary<string, string>();
|
||||
|
||||
public void SetCurrentlyPublishedSlugs(IEnumerable<string> values) {
|
||||
_currentlyPublishedSlugs = values
|
||||
@@ -37,7 +37,7 @@ namespace Orchard.CmsPages.Services {
|
||||
}
|
||||
}
|
||||
|
||||
public class SlugConstraintUpdater : IBackgroundTask{
|
||||
public class SlugConstraintUpdater : IBackgroundTask {
|
||||
private readonly IPageManager _pageManager;
|
||||
private readonly ISlugConstraint _slugConstraint;
|
||||
|
@@ -3,7 +3,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
/// <summary>
|
||||
/// Parse the content of a text reader into a list of metadata entries.
|
||||
/// </summary>
|
@@ -1,4 +1,4 @@
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public class MetadataEntry {
|
||||
public string Tag { get; set; }
|
||||
public string Value { get; set; }
|
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public class TemplateDescriptor {
|
||||
public TemplateDescriptor() {
|
||||
Zones = new List<string>();
|
@@ -0,0 +1,8 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public class TemplateEntry {
|
||||
public string Name { get; set; }
|
||||
public TextReader Content { get; set; }
|
||||
}
|
||||
}
|
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web.Hosting;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public interface ITemplateEntryProvider : IDependency {
|
||||
IEnumerable<TemplateEntry> List();
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Orchard.CmsPages.Services.Templates {
|
||||
public class TemplateEntryProvider : ITemplateEntryProvider {
|
||||
public IEnumerable<TemplateEntry> List() {
|
||||
//TODO: Figure out a way to formalize the notion of "Orchard Package View Folder"
|
||||
const string templatesVirtualPath = "~/Packages/Orchard.CmsPages/Views/Templates";
|
||||
const string templatesVirtualPath = "~/Packages/Orchard.Pages/Views/Templates";
|
||||
|
||||
VirtualPathProvider vpathProvider = HostingEnvironment.VirtualPathProvider;
|
||||
VirtualDirectory templatesDirectory = vpathProvider.GetDirectory(templatesVirtualPath);
|
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.Pages.Models;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public static class TemplateExtensions {
|
||||
/// <summary>
|
||||
/// Include a zone's contents from the current view.
|
@@ -5,7 +5,7 @@ using Orchard.Logging;
|
||||
using Orchard.Utility;
|
||||
using Yaml.Grammar;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public interface ITemplateMetadataParser : IDependency {
|
||||
IList<MetadataEntry> Parse(TextReader reader);
|
||||
}
|
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.Utility;
|
||||
|
||||
namespace Orchard.CmsPages.Services.Templates {
|
||||
namespace Orchard.Pages.Services.Templates {
|
||||
public interface ITemplateProvider : IDependency {
|
||||
IList<TemplateDescriptor> List();
|
||||
TemplateDescriptor Get(string name);
|
@@ -1,15 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using Orchard.CmsPages.ViewModels;
|
||||
using Orchard.Core.XmlRpc;
|
||||
using Orchard.Core.XmlRpc.Models;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.CmsPages.Services {
|
||||
namespace Orchard.Pages.Services {
|
||||
public class XmlRpcHandler : IXmlRpcHandler {
|
||||
private readonly IPageManager _pageManager;
|
||||
|
||||
@@ -31,7 +26,7 @@ namespace Orchard.CmsPages.Services {
|
||||
.Add(new XRpcArray()
|
||||
.Add(new XRpcStruct()
|
||||
.Set("url", uriBuilder.Uri.AbsoluteUri)
|
||||
.Set("blogid", "Orchard.CmsPages")
|
||||
.Set("blogid", "Orchard.Pages")
|
||||
.Set("blogName", "Orchard Pages")));
|
||||
}
|
||||
|
@@ -1,12 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.CmsPages.ViewModels {
|
||||
namespace Orchard.Pages.ViewModels {
|
||||
public class ChooseTemplateViewModel : AdminViewModel {
|
||||
public string TemplateName { get; set; }
|
||||
public IList<TemplateDescriptor> Templates{ get; set; }
|
@@ -1,10 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.CmsPages.ViewModels {
|
||||
namespace Orchard.Pages.ViewModels {
|
||||
public class PageCreateViewModel : AdminViewModel {
|
||||
[Required, DisplayName("Title:")]
|
||||
public string Title { get; set; }
|
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.CmsPages.Services.Templates;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Pages.Services.Templates;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.CmsPages.ViewModels {
|
||||
namespace Orchard.Pages.ViewModels {
|
||||
public enum PageEditCommand {
|
||||
Undefined,
|
||||
PublishNow,
|
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard.CmsPages.Models;
|
||||
using Orchard.Pages.Models;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.CmsPages.ViewModels {
|
||||
namespace Orchard.Pages.ViewModels {
|
||||
public class PageIndexViewModel : AdminViewModel {
|
||||
public PageIndexOptions Options { get; set; }
|
||||
public IList<PageEntry> PageEntries { get; set; }
|
@@ -1,7 +1,8 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PageIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Utility"%>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates"%>
|
||||
<h2><%=Html.TitleForPage("Delete pages") %></h2>
|
||||
<p>Are you sure you want to delete the pages?</p>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
@@ -1,7 +1,8 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PageIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Utility"%>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates"%>
|
||||
<h2><%=Html.TitleForPage("Publish later") %></h2>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||
<p>Enter the scheduled publication date:</p>
|
@@ -1,5 +1,6 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.ChooseTemplateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.ViewModels.ChooseTemplateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates"%>
|
||||
<h2><%=Html.TitleForPage("Change Template") %></h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) {
|
@@ -1,4 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageCreateViewModel>" %>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.ViewModels.PageCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<h2><%=Html.TitleForPage("Add a Page") %></h2>
|
||||
<p>Select your layout from one of the templates below.</p>
|
||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
@@ -1,5 +1,6 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.CmsPages.ViewModels.PageEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Models" %>
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<Orchard.Pages.ViewModels.PageEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Pages.Models" %>
|
||||
<h2><%=Html.TitleForPage("Edit Page") %></h2>
|
||||
<p><%=_Encoded("about setting up a page") %></p>
|
||||
<%=Html.ValidationSummary() %>
|
@@ -1,6 +1,6 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PageCreateViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.ViewModels" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates" %>
|
||||
<%@ Import Namespace="Orchard.Pages.ViewModels" %>
|
||||
<%@ Import Namespace="Orchard.Utility" %>
|
||||
<ul class="templates">
|
||||
<% foreach (var template in Model.Templates) {
|
@@ -1,5 +1,5 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateDescriptor>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates" %>
|
||||
<div>
|
||||
<h3><%=Html.Encode(Model.DisplayName)%></h3>
|
||||
<fieldset>
|
||||
@@ -9,5 +9,5 @@
|
||||
Select this template</label>
|
||||
</fieldset>
|
||||
<%-- todo: (heskew) need an HTML helper (+route and controller/action for an ImageResult) for template thumbnails --%>
|
||||
<p><img src="/Packages/Orchard.CMSPages/Views/Templates/<%=Html.Encode(Model.Name)%>.gif" alt="<%=Html.Encode(Model.DisplayName)%>" /><%=Html.Encode(Model.Description)%></p>
|
||||
<p><img src="/Packages/Orchard.Pages/Views/Templates/<%=Html.Encode(Model.Name)%>.gif" alt="<%=Html.Encode(Model.DisplayName)%>" /><%=Html.Encode(Model.Description)%></p>
|
||||
</div>
|
@@ -1,4 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Orchard.CmsPages.Models.Page>>" %>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Orchard.Pages.Models.Page>>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<h2><%=Html.TitleForPage("Export") %></h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
<ol>
|
@@ -1,6 +1,7 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PageIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<%@ Import Namespace="Orchard.Utility"%>
|
||||
<%@ Import Namespace="Orchard.CmsPages.ViewModels"%>
|
||||
<%@ Import Namespace="Orchard.Pages.ViewModels"%>
|
||||
<%-- todo: (heskew) localize --%>
|
||||
<h2><%=Html.TitleForPage("Manage Pages") %></h2>
|
||||
<p>Possible text about setting up a page goes here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla erat turpis, blandit eget feugiat nec, tempus vel quam. Mauris et neque eget justo suscipit blandit.</p>
|
||||
@@ -68,9 +69,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if (pageEntry.IsPublished) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/online.gif") %>" alt="Online" title="The page is currently online" />
|
||||
<% } else {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/offline.gif") %>" alt="Offline" title="The page is currently offline" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=Html.ActionLink(revision.Title ?? "(no title)", "Show", new { Controller = "Templates", revision.Slug }) %></td>
|
||||
@@ -79,10 +80,10 @@
|
||||
<td><%=string.Format("{0:d}<br />{0:t}", revision.ModifiedDate) %></td>
|
||||
<td>
|
||||
<% if (pageEntry.HasDraft) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/draft.gif") %>" alt="Draft" title="The page has a draft" />
|
||||
<% }
|
||||
if (revision.Page.Scheduled.Any()) {
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.CmsPages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
|
||||
%><img src="<%=ResolveUrl("~/Packages/Orchard.Pages/Content/Admin/images/scheduled.gif") %>" alt="Scheduled" title="The draft is scheduled for publishing" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><%=revision.Page.Scheduled.Any() ? string.Format("{0:d}<br />{0:t}", revision.Page.Scheduled.First().ScheduledDate.Value) : "" %></td>
|
@@ -1,9 +1,9 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Models"%>
|
||||
<%@ Import Namespace="Orchard.Pages.Models"%>
|
||||
<%
|
||||
if (Request.IsAuthenticated) {
|
||||
%>
|
||||
[ <%=Html.ActionLink("Edit", "Edit", "Admin", new{Area="Orchard.CmsPages", Model.Page.Id}, new{})%> ]
|
||||
[ <%=Html.ActionLink("Edit", "Edit", "Admin", new{Area="Orchard.Pages", Model.Page.Id}, new{})%> ]
|
||||
<%
|
||||
}
|
||||
%>
|
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%--
|
||||
name: Three column layout
|
Before Width: | Height: | Size: 833 B After Width: | Height: | Size: 833 B |
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%--
|
||||
name: Two column layout
|
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
@@ -628,7 +628,7 @@ table.items th, table.items td {
|
||||
todo: (heskew) pull out into relevant modules where appropriate
|
||||
----------------------------------------------------------*/
|
||||
|
||||
/* CMSPages
|
||||
/* Pages
|
||||
----------------------------------------------------------*/
|
||||
.templates fieldset {
|
||||
margin:0 0 .933%;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates"%>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%--
|
||||
name: Three column layout
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.CmsPages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.CmsPages.Services.Templates" %>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Pages.Models.PageRevision>" %>
|
||||
<%@ Import Namespace="Orchard.Pages.Services.Templates" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<%--
|
||||
name: Two column layout
|
||||
|
@@ -11,8 +11,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Web.Tests", "Orchar
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packages", "Packages", "{E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.CmsPages", "Orchard.Web\Packages\Orchard.CmsPages\Orchard.CmsPages.csproj", "{1ECC1131-0D0C-4822-AD90-E979868C63F3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TinyMce", "Orchard.Web\Packages\TinyMce\TinyMce.csproj", "{954CA994-D204-468B-9D69-51F6AD3E1C29}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Media", "Orchard.Web\Packages\Orchard.Media\Orchard.Media.csproj", "{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}"
|
||||
@@ -67,10 +65,6 @@ Global
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F112851D-B023-4746-B6B1-8D2E5AD8F7AA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1ECC1131-0D0C-4822-AD90-E979868C63F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1ECC1131-0D0C-4822-AD90-E979868C63F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1ECC1131-0D0C-4822-AD90-E979868C63F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1ECC1131-0D0C-4822-AD90-E979868C63F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -136,7 +130,6 @@ Global
|
||||
{6CB3EB30-F725-45C0-9742-42599BA8E8D2} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{2FC1D9C8-446D-4414-B252-5E9FBE61EB63} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{ABC826D4-2FA1-4F2F-87DE-E6095F653810} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
|
||||
{1ECC1131-0D0C-4822-AD90-E979868C63F3} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{954CA994-D204-468B-9D69-51F6AD3E1C29} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
{79AED36E-ABD0-4747-93D3-8722B042454B} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
|
||||
|