mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
<Target Name="Package-ForCloud">
|
||||
|
||||
<ItemGroup>
|
||||
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.cs;$(SrcFolder)\**\*.csproj*;" />
|
||||
<Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;" />
|
||||
|
||||
<Stage-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
|
||||
<Stage-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
|
||||
@@ -98,14 +98,6 @@
|
||||
<XmlUpdate XmlFileName="$(CloudRootFolder)\web.config"
|
||||
XPath="/configuration/system.web/compilation/@debug"
|
||||
Value="false" />
|
||||
|
||||
<XmlUpdate XmlFileName="$(CloudRootFolder)\web.config"
|
||||
XPath="/configuration/system.web/machineKey/@validationKey"
|
||||
Value="AutoGenerate" />
|
||||
|
||||
<XmlUpdate XmlFileName="$(CloudRootFolder)\web.config"
|
||||
XPath="/configuration/system.web/machineKey/@decryptionKey"
|
||||
Value="AutoGenerate" />
|
||||
|
||||
<XmlUpdate XmlFileName="$(CloudRootFolder)\Config\Diagnostics.config"
|
||||
XPath="/system.diagnostics/trace/@autoflush"
|
||||
|
@@ -53,6 +53,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Experimental", "..\
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.CodeGeneration", "..\Orchard.Web\Modules\Orchard.CodeGeneration\Orchard.CodeGeneration.csproj", "{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.ArchiveLater", "..\Orchard.Web\Modules\Orchard.ArchiveLater\Orchard.ArchiveLater.csproj", "{1C981BB3-26F7-494C-9005-CC27A5144233}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Email", "..\Orchard.Web\Modules\Orchard.Email\Orchard.Email.csproj", "{05660F47-D649-48BD-9DED-DF4E01E7CFF9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.jQuery", "..\Orchard.Web\Modules\Orchard.jQuery\Orchard.jQuery.csproj", "{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Migrations", "..\Orchard.Web\Modules\Orchard.Migrations\Orchard.Migrations.csproj", "{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Widgets", "..\Orchard.Web\Modules\Orchard.Widgets\Orchard.Widgets.csproj", "{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -155,6 +165,26 @@ Global
|
||||
{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -178,6 +208,11 @@ Global
|
||||
{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{AB3C207C-0126-4143-8D62-1119DF80D366} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{1C981BB3-26F7-494C-9005-CC27A5144233} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{05660F47-D649-48BD-9DED-DF4E01E7CFF9} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{194D3CCC-1153-474D-8176-FDE8D7D0D0BD} = {8E3DE014-9B28-4B32-8AC1-B2BE404E9B2D}
|
||||
{33B1BC8D-E292-4972-A363-22056B207156} = {75E7476C-C05B-4C41-8E38-081D3EB55659}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Autofac;
|
||||
@@ -20,19 +16,10 @@ namespace Orchard.Azure.Web {
|
||||
}
|
||||
|
||||
protected void Application_Start() {
|
||||
// This is temporary until MVC2 is officially released.
|
||||
// We want to avoid running against an outdated preview installed in the GAC
|
||||
CheckMvcVersion(
|
||||
new Version("2.0.50217.0")/*MVC2 RTM file version #*/,
|
||||
new Version("2.0.50129.0")/*MVC2 RC2 file version #*/,
|
||||
new Version("2.0.41211.0")/*MVC2 RC file version #*/);
|
||||
|
||||
RegisterRoutes(RouteTable.Routes);
|
||||
|
||||
_host = OrchardStarter.CreateHost(MvcSingletons);
|
||||
_host.Initialize();
|
||||
|
||||
//TODO: what's the failed initialization story - IoC failure in app start can leave you with a zombie appdomain
|
||||
}
|
||||
|
||||
protected void Application_BeginRequest() {
|
||||
@@ -45,58 +32,11 @@ namespace Orchard.Azure.Web {
|
||||
_host.EndRequest();
|
||||
}
|
||||
|
||||
private static void CheckMvcVersion(params Version[] allowedVersions) {
|
||||
Assembly loadedMvcAssembly = typeof(Controller).Assembly;
|
||||
Version loadedMvcVersion = ReadAssemblyFileVersion(loadedMvcAssembly);
|
||||
|
||||
if ( allowedVersions.All(allowed => loadedMvcVersion != allowed) ) {
|
||||
string message;
|
||||
if ( loadedMvcAssembly.GlobalAssemblyCache ) {
|
||||
message = string.Format(
|
||||
"Orchard has been deployed with a version of {0} that has a different file version ({1}) " +
|
||||
"than the version installed in the GAC ({2}).\r\n" +
|
||||
"This implies that Orchard will not be able to run properly in this machine configuration.\r\n" +
|
||||
"Please un-install MVC from the GAC or install a more recent version.",
|
||||
loadedMvcAssembly.GetName().Name,
|
||||
allowedVersions.First(),
|
||||
loadedMvcVersion);
|
||||
}
|
||||
else {
|
||||
message = string.Format(
|
||||
"Orchard has been configured to run with a file version {1} of \"{0}\" " +
|
||||
"but the version deployed with the application is {2}.\r\n" +
|
||||
"This probably implies that Orchard is deployed with a newer version " +
|
||||
"and the source code hasn't been updated accordingly.\r\n" +
|
||||
"Update the Orchard.Web application source code (look for \"CheckMvcVersion\") to " +
|
||||
"specify the correct file version number.\r\n",
|
||||
loadedMvcAssembly.GetName().Name,
|
||||
allowedVersions.First(),
|
||||
loadedMvcVersion);
|
||||
}
|
||||
|
||||
throw new HttpException(500, message);
|
||||
}
|
||||
static void MvcSingletons(ContainerBuilder builder) {
|
||||
builder.Register(ctx => RouteTable.Routes).SingleInstance();
|
||||
builder.Register(ctx => ModelBinders.Binders).SingleInstance();
|
||||
builder.Register(ctx => ViewEngines.Engines).SingleInstance();
|
||||
}
|
||||
|
||||
private static Version ReadAssemblyFileVersion(Assembly assembly) {
|
||||
object[] attributes = assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true);
|
||||
if ( attributes == null || attributes.Length != 1 ) {
|
||||
string message = string.Format("Assembly \"{0}\" doesn't have a \"{1}\" attribute",
|
||||
assembly.GetName().Name, typeof(AssemblyFileVersionAttribute).FullName);
|
||||
throw new FileLoadException(message);
|
||||
}
|
||||
|
||||
var attribute = (AssemblyFileVersionAttribute)attributes[0];
|
||||
return new Version(attribute.Version);
|
||||
}
|
||||
|
||||
|
||||
protected void MvcSingletons(ContainerBuilder builder) {
|
||||
builder.RegisterInstance(ControllerBuilder.Current);
|
||||
builder.RegisterInstance(RouteTable.Routes);
|
||||
builder.RegisterInstance(ModelBinders.Binders);
|
||||
builder.RegisterInstance(ModelMetadataProviders.Current);
|
||||
builder.RegisterInstance(ViewEngines.Engines);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\autofac\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Autofac.Configuration, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<Reference Include="Autofac.Configuration, Version=2.2.4.900, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\autofac\Autofac.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -54,17 +54,6 @@
|
||||
<Reference Include="Autofac.Integration.Web.Mvc">
|
||||
<HintPath>..\..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
@@ -102,6 +91,9 @@
|
||||
<Reference Include="System.Web.Extensions">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
@@ -116,9 +108,18 @@
|
||||
<Reference Include="System.Web.Abstractions">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Routing">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
@@ -137,6 +138,9 @@
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="WebMatrix.Data">
|
||||
<HintPath>..\..\..\lib\aspnetmvc\WebMatrix.Data.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Global.asax.cs">
|
||||
@@ -166,83 +170,15 @@
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Lucene\Lucene.csproj">
|
||||
<Project>{D5D447D7-EF8E-43A6-B9A4-3B025DD9F45D}</Project>
|
||||
<Name>Lucene</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Blogs\Orchard.Blogs.csproj">
|
||||
<Project>{63FBD4D9-E1DA-4A7B-AA6A-D6074FE50867}</Project>
|
||||
<Name>Orchard.Blogs</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.CodeGeneration\Orchard.CodeGeneration.csproj">
|
||||
<Project>{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}</Project>
|
||||
<Name>Orchard.CodeGeneration</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Comments\Orchard.Comments.csproj">
|
||||
<Project>{14C049FD-B35B-415A-A824-87F26B26E7FD}</Project>
|
||||
<Name>Orchard.Comments</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.ContentTypes\Orchard.ContentTypes.csproj">
|
||||
<Project>{0E7646E8-FE8F-43C1-8799-D97860925EC4}</Project>
|
||||
<Name>Orchard.ContentTypes</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Experimental\Orchard.Experimental.csproj">
|
||||
<Project>{AB3C207C-0126-4143-8D62-1119DF80D366}</Project>
|
||||
<Name>Orchard.Experimental</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Indexing\Orchard.Indexing.csproj">
|
||||
<Project>{EA2B9121-EF54-40A6-A53E-6593C86EE696}</Project>
|
||||
<Name>Orchard.Indexing</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Media\Orchard.Media.csproj">
|
||||
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
|
||||
<Name>Orchard.Media</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj">
|
||||
<Project>{17F86780-9A1F-4AA1-86F1-875EEC2730C7}</Project>
|
||||
<Name>Orchard.Modules</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj">
|
||||
<Project>{72457126-E118-4171-A08F-9A709EE4B7FC}</Project>
|
||||
<Name>Orchard.MultiTenancy</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Packaging\Orchard.Packaging.csproj">
|
||||
<Project>{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}</Project>
|
||||
<Name>Orchard.Packaging</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||
<Name>Orchard.Roles</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Search\Orchard.Search.csproj">
|
||||
<Project>{4BE4EB01-AC56-4048-924E-2CA77F509ABA}</Project>
|
||||
<Name>Orchard.Search</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Setup\Orchard.Setup.csproj">
|
||||
<Project>{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}</Project>
|
||||
<Name>Orchard.Setup</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Tags\Orchard.Tags.csproj">
|
||||
<Project>{5D0F00F0-26C9-4785-AD61-B85710C60EB0}</Project>
|
||||
<Name>Orchard.Tags</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Themes\Orchard.Themes.csproj">
|
||||
<Project>{CDE24A24-01D3-403C-84B9-37722E18DFB7}</Project>
|
||||
<Name>Orchard.Themes</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Users\Orchard.Users.csproj">
|
||||
<Project>{79AED36E-ABD0-4747-93D3-8722B042454B}</Project>
|
||||
<Name>Orchard.Users</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard.Web\Modules\TinyMce\TinyMce.csproj">
|
||||
<Project>{954CA994-D204-468B-9D69-51F6AD3E1C29}</Project>
|
||||
<Name>TinyMce</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Tools\Orchard\Orchard.csproj">
|
||||
<Project>{33B1BC8D-E292-4972-A363-22056B207156}</Project>
|
||||
<Name>Orchard</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Azure.csproj">
|
||||
<Project>{2505AA84-65A6-43D0-9C27-4F44FD576284}</Project>
|
||||
<Name>Orchard.Azure</Name>
|
||||
|
@@ -9,17 +9,17 @@
|
||||
-->
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.razor.web" type="System.Razor.Web.Configuration.SystemRazorWebSectionGroup, System.Razor.Web">
|
||||
<section name="host" type="System.Razor.Web.Configuration.HostSection, System.Razor.Web" requirePermission="false" />
|
||||
<section name="pages" type="System.Razor.Web.Configuration.RazorPagesSection, System.Razor.Web" requirePermission="false" />
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
|
||||
<appSettings/>
|
||||
<system.diagnostics configSource="Config\Diagnostics.config"/>
|
||||
|
||||
<system.razor.web>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
@@ -31,7 +31,7 @@
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.razor.web>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<!--
|
||||
Set default transaction timeout to 30 minutes so that interactive debugging
|
||||
@@ -129,7 +129,7 @@
|
||||
<probing privatePath="App_Data/Dependencies"/>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0"/>
|
||||
<bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
@@ -41,7 +41,7 @@ namespace Orchard.Core.Common.DataMigrations {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(BodyPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "5" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace Orchard.Core.Common.DataMigrations {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommonPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "metadata", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "20" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "20" }},
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -19,14 +19,14 @@ namespace Orchard.Core.Common.Drivers {
|
||||
}
|
||||
|
||||
protected override DriverResult Display(ContentPart part, TextField field, string displayType) {
|
||||
var location = field.GetLocation(displayType, "primary", "1");
|
||||
var location = field.GetLocation(displayType, "Primary", "1");
|
||||
|
||||
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
|
||||
.Location(location);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(ContentPart part, TextField field) {
|
||||
var location = field.GetLocation("Editor", "primary", "1");
|
||||
var location = field.GetLocation("Editor", "Primary", "1");
|
||||
|
||||
return ContentFieldTemplate(field, TemplateName, GetPrefix(field, part))
|
||||
.Location(location);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</div>
|
||||
<div class="secondary">
|
||||
@Display(Model.secondary)
|
||||
|
@@ -1,3 +1,3 @@
|
||||
content item -> @Model.ContentItem.ContentType
|
||||
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
|
@@ -15,5 +15,5 @@
|
||||
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
<br />@Display(Model.meta)
|
||||
</div>
|
||||
<div class="primary">@Display(Model.primary)</div>
|
||||
<div class="primary">@Display(Model.Primary)</div>
|
||||
</div>
|
@@ -3,6 +3,6 @@
|
||||
@Display(Model.Header)
|
||||
</header>
|
||||
<section>
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</section>
|
||||
</article>
|
@@ -99,7 +99,7 @@ namespace Orchard.Core.ContentsLocation.Settings {
|
||||
var viewModel = new LocationSettingsViewModel {
|
||||
Definition = location,
|
||||
Location = settings.Get(location.Name),
|
||||
DefaultLocation = new ContentLocation { Zone = "primary", Position = "1" }
|
||||
DefaultLocation = new ContentLocation { Zone = "Primary", Position = "1" }
|
||||
};
|
||||
yield return DefinitionTemplate(viewModel, templateName: "LocationSettings", prefix: location.Name);
|
||||
}
|
||||
|
@@ -22,8 +22,8 @@ namespace Orchard.Core.Localization.DataMigrations {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(LocalizationPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ namespace Orchard.Core.Navigation.DataMigrations {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(MenuPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "9" }}
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ namespace Orchard.Core.Routable {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(RoutePart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "before.5" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "before.5" }}
|
||||
} ));
|
||||
|
||||
return 2;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
<fieldset>
|
||||
<input class="button primaryAction" type="submit" value="@T("Save")" />
|
||||
</fieldset>
|
||||
|
@@ -51,7 +51,7 @@ namespace Orchard.Blogs.Drivers {
|
||||
.Select(bp => _contentManager.BuildDisplay(bp, "SummaryAdmin.BlogPost")));
|
||||
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List.Admin";
|
||||
var contentShape = ContentShape(blogPostList).Location("primary");
|
||||
var contentShape = ContentShape(blogPostList).Location("Primary");
|
||||
driverResults.Add(contentShape);
|
||||
}
|
||||
else if (!displayType.Contains("Summary")) {
|
||||
@@ -60,7 +60,7 @@ namespace Orchard.Blogs.Drivers {
|
||||
.Select(bp => _contentManager.BuildDisplay(bp, "Summary.BlogPost")));
|
||||
var blogPostList = shapeHelper.Parts_Blogs_BlogPost_List(ContentPart: part, BlogPosts: list);
|
||||
blogPostList.Metadata.Type = "Parts_Blogs_BlogPost.List";
|
||||
var contentShape = ContentShape(blogPostList).Location("primary");
|
||||
var contentShape = ContentShape(blogPostList).Location("Primary");
|
||||
driverResults.Add(contentShape);
|
||||
|
||||
_feedManager.Register(part);
|
||||
|
@@ -51,7 +51,7 @@ namespace Orchard.Blogs {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(BlogPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
}));
|
||||
return 3;
|
||||
}
|
||||
|
@@ -8,11 +8,6 @@ using Orchard.Security;
|
||||
|
||||
namespace Orchard.Blogs.Models {
|
||||
public class BlogPostPart : ContentPart {
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id {
|
||||
get { return ContentItem.Id; }
|
||||
}
|
||||
|
||||
public string Title {
|
||||
get { return this.As<RoutePart>().Title; }
|
||||
set { this.As<RoutePart>().Title = value; }
|
||||
|
@@ -4,4 +4,4 @@
|
||||
@Display(Model.manage)
|
||||
<div class="manage"><a href="@Url.BlogPostCreate((BlogPart)Model.ContentItem.Get(typeof(BlogPart)))" class="add button primaryAction">@T("New Post")</a></div>
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -7,4 +7,4 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.manage)
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -1,3 +1,3 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -1,4 +1,4 @@
|
||||
@Html.AddTitleParts(Model.Title)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!111 Content.Edit.Blog !!!!!!!!!!!!!!!!!!!!!!!!11
|
||||
<fieldset><input class="button primaryAction" type="submit" value="@T("Add")" /></fieldset>
|
@@ -5,7 +5,7 @@
|
||||
}
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
||||
</div>
|
||||
<div class="secondary">
|
||||
@Display(Model.secondary)
|
||||
|
@@ -5,4 +5,4 @@
|
||||
@using Orchard.Core.Common.ViewModels;
|
||||
<h2>@Html.Link((string)Model.Title, Url.BlogPost((BlogPostPart)Model.ContentItem.Get(typeof(BlogPostPart))))</h2>
|
||||
<div class="meta">@Html.PublishedState(new CommonMetadataViewModel((CommonPart)Model.ContentItem.Get(typeof(CommonPart))), T) | @Display(Model.meta)</div>
|
||||
<div class="content">@Display(Model.primary)</div>
|
||||
<div class="content">@Display(Model.Primary)</div>
|
@@ -18,5 +18,5 @@
|
||||
@Html.Link(T("Remove").Text, Url.Action("Remove", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl }), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
<br />@Display(Model.meta)
|
||||
</div>
|
||||
<div class="primary">@Display(Model.primary)</div>
|
||||
<div class="primary">@Display(Model.Primary)</div>
|
||||
</div>
|
||||
|
@@ -68,11 +68,11 @@ namespace Orchard.Comments {
|
||||
public int UpdateFrom2() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommentsPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "before.5" }},
|
||||
{"Detail", new ContentLocation { Zone = "primary", Position = "after.5" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "before.5" }},
|
||||
{"Detail", new ContentLocation { Zone = "Primary", Position = "after.5" }},
|
||||
{"SummaryAdmin", new ContentLocation { Zone = "meta", Position = null }},
|
||||
{"Summary", new ContentLocation { Zone = "meta", Position = "5" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "10" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "10" }},
|
||||
}));
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(CommentsContainerPart).Name, cfg => cfg
|
||||
|
@@ -17,7 +17,6 @@ namespace Orchard.Roles.Models {
|
||||
}
|
||||
|
||||
class SimulatedUser : ContentPart, IUser {
|
||||
public int Id { get { return ContentItem.Id; } }
|
||||
public string UserName { get { return null; } }
|
||||
public string Email { get { return null; } }
|
||||
}
|
||||
|
@@ -28,8 +28,8 @@ namespace Orchard.Tags {
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(TagsPart).Name, cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Default", new ContentLocation { Zone = "primary", Position = "49" }},
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "9" }},
|
||||
{"Default", new ContentLocation { Zone = "Primary", Position = "49" }},
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "9" }},
|
||||
}));
|
||||
return 2;
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ namespace Orchard.Widgets {
|
||||
.WithPart("WidgetPart")
|
||||
.WithPart("BodyPart")
|
||||
.WithPart("CommonPart")
|
||||
.WithSetting("stereotype", "widget")
|
||||
.WithSetting("Stereotype", "Widget")
|
||||
);
|
||||
|
||||
CreateDefaultLayers();
|
||||
@@ -82,21 +82,21 @@ namespace Orchard.Widgets {
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(LayerPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
})
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation { Zone = "primary", Position = "1" }}
|
||||
{"Editor", new ContentLocation { Zone = "Primary", Position = "1" }}
|
||||
})
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterPartDefinition(typeof(WidgetBagPart).Name,
|
||||
cfg => cfg
|
||||
.WithLocation(new Dictionary<string, ContentLocation> {
|
||||
{"Editor", new ContentLocation {Zone = "primary", Position = "5"}}
|
||||
{"Editor", new ContentLocation {Zone = "Primary", Position = "5"}}
|
||||
})
|
||||
);
|
||||
ContentDefinitionManager.AlterTypeDefinition("WidgetPage",
|
||||
|
@@ -5,14 +5,6 @@ using Orchard.ContentManagement;
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class LayerPart : ContentPart<LayerPartRecord> {
|
||||
|
||||
/// <summary>
|
||||
/// The layer's identifier.
|
||||
/// </summary>
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id {
|
||||
get { return ContentItem.Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The layer's name.
|
||||
/// </summary>
|
||||
|
@@ -7,14 +7,6 @@ using Orchard.ContentManagement.Aspects;
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class WidgetPart : ContentPart<WidgetPartRecord> {
|
||||
|
||||
/// <summary>
|
||||
/// The widget's identifier.
|
||||
/// </summary>
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id {
|
||||
get { return ContentItem.Id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The widget's title.
|
||||
/// </summary>
|
||||
|
@@ -23,7 +23,7 @@ namespace Orchard.Widgets.Services {
|
||||
|
||||
public IEnumerable<string> GetWidgetTypes() {
|
||||
return _contentManager.GetContentTypeDefinitions()
|
||||
.Where(contentTypeDefinition => contentTypeDefinition.Settings.ContainsKey("stereotype") && contentTypeDefinition.Settings["stereotype"] == "widget")
|
||||
.Where(contentTypeDefinition => contentTypeDefinition.Settings.ContainsKey("Stereotype") && contentTypeDefinition.Settings["Stereotype"] == "Widget")
|
||||
.Select(contentTypeDefinition => contentTypeDefinition.Name);
|
||||
}
|
||||
|
||||
|
@@ -3,23 +3,23 @@
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.availableWidgets {
|
||||
.widgets-availableWidgets {
|
||||
float: left;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.availableLayers {
|
||||
.widgets-availableLayers {
|
||||
float: left;
|
||||
margin: 0 0 0 2em;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.layerZones {
|
||||
.widgets-layerZones {
|
||||
float: left;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.layerZones .zone {
|
||||
.widgets-layerZones .widgets-zone {
|
||||
font-weight:700;
|
||||
background:#f5f5f5;
|
||||
border: 1px solid #f1f1f1;
|
||||
@@ -27,7 +27,7 @@
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.layerZones .zoneWidget {
|
||||
.widgets-layerZones .widgets-zoneWidget {
|
||||
margin: 0 0 1em 0;
|
||||
padding: 1em 2em 1em 3em;
|
||||
background:#ffffff;
|
||||
@@ -35,26 +35,26 @@
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.layers {
|
||||
.widgets-layers {
|
||||
margin: 1em 0 0 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.layers ul {
|
||||
.widgets-layers ul {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #f1f1f1;
|
||||
}
|
||||
|
||||
.layers .currentLayer {
|
||||
.widgets-layers .widgets-currentLayer {
|
||||
background: #c3d9ff;
|
||||
}
|
||||
|
||||
.layers .editLayer img {
|
||||
.widgets-layers .widgets-editLayer img {
|
||||
float: right;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
.layerZones ul li ul {
|
||||
.widgets-layerZones ul li ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
@@ -10,9 +10,9 @@
|
||||
|
||||
<div class="manage">@Html.ActionLink(T("Add a layer").ToString(), "AddLayer", new { }, new { @class = "button primaryAction" })</div>
|
||||
|
||||
<div id="widgets" class="widgets">
|
||||
<div id="widgets">
|
||||
|
||||
<div class="availableWidgets">
|
||||
<div class="widgets-availableWidgets">
|
||||
<h2>Available Widgets</h2>
|
||||
|
||||
<fieldset>
|
||||
@@ -38,18 +38,18 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="availableLayers">
|
||||
<div class="widgets-availableLayers">
|
||||
<h2>Widget Layers</h2>
|
||||
|
||||
<fieldset>
|
||||
<div class="layerZonesWidgets">
|
||||
<ul class="layerZones">
|
||||
<div>
|
||||
<ul class="widgets-layerZones">
|
||||
@foreach (string zone in Model.Zones) {
|
||||
<li>
|
||||
<div class="zone">@zone</div>
|
||||
<div class="widgets-zone">@zone</div>
|
||||
<ul>
|
||||
@foreach (WidgetPart widget in Model.CurrentLayerWidgets.Where(widgetPart => widgetPart.Zone == zone).OrderBy(widgetPart => widgetPart.Position)) {
|
||||
<li class="zoneWidget">
|
||||
<li class="widgets-zoneWidget">
|
||||
@if (widget.Position != "1") {
|
||||
<input type="image" name="submit.MoveUp.@widget.Id" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/moveup.gif")" alt="Move up" value="@widget.Id" />
|
||||
}
|
||||
@@ -65,18 +65,18 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="layers">
|
||||
<div class="widgets-layers">
|
||||
<ul>
|
||||
@foreach (var layer in Model.Layers) {
|
||||
if (layer.Id == Model.CurrentLayer.Id) {
|
||||
<li class="currentLayer editLayer">
|
||||
<li class="widgets-currentLayer widgets-editLayer">
|
||||
@Html.ActionLink(@layer.Name, "Index", new { @layer.Id })
|
||||
<a href="@Url.Action("EditLayer", new { @layer.Id })">
|
||||
<img width="15" height="15" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/edit.gif")" />
|
||||
</a>
|
||||
</li>
|
||||
} else {
|
||||
<li class="editLayer">
|
||||
<li class="widgets-editLayer">
|
||||
@Html.ActionLink(@layer.Name, "Index", new { @layer.Id })
|
||||
<a href="@Url.Action("EditLayer", new { @layer.Id })">
|
||||
<img width="15" height="15" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/edit.gif")" />
|
||||
|
@@ -132,31 +132,40 @@ p, .meta {
|
||||
|
||||
/* Sidebar off - Content Zone 960 */
|
||||
#content {
|
||||
clear:both;
|
||||
/*padding:12px;*/
|
||||
/*clear:both;
|
||||
padding:12px;*/
|
||||
}
|
||||
|
||||
/*Right Sidebar on - Content Zone 600 */
|
||||
/*One Sidebar on */
|
||||
.has-sidebar #content {
|
||||
background-color:#e8e8e8;
|
||||
width: 600px;
|
||||
/*padding:12px 6px 6px 12px;*/
|
||||
float:left;
|
||||
clear:both;
|
||||
/*clear:both;*/
|
||||
}
|
||||
|
||||
/*Left Sidebar on - Content Zone 600
|
||||
|
||||
.has-sidebar #content {
|
||||
float:right;
|
||||
}*/
|
||||
|
||||
.sidebar {
|
||||
.has-sidebar .sidebar {
|
||||
background-color:#f6f6f6;
|
||||
width: 360px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
/*Two Sidebars on */
|
||||
.has-sidebars #content {
|
||||
background-color:#e8e8e8;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.has-sidebars .sidebar {
|
||||
background-color:#f6f6f6;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.has-sidebars .primary, .has-sidebars .secondary, .has-sidebars #content {
|
||||
float:left;
|
||||
}
|
||||
|
||||
#sitemap {
|
||||
clear:both;
|
||||
}
|
||||
@@ -166,37 +175,37 @@ p, .meta {
|
||||
|
||||
|
||||
#navigation {
|
||||
width: 960px;
|
||||
margin: 4px auto;
|
||||
width: 960px;
|
||||
margin: 4px auto;
|
||||
display:block;
|
||||
border-bottom: 1px solid #999;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
|
||||
nav ul li
|
||||
{
|
||||
border:1px solid #999;
|
||||
background:#e7e7e7;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0 2px -1px 0;
|
||||
}
|
||||
|
||||
nav ul li.on {
|
||||
border-bottom: 1px solid #fff;
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
nav ul a {
|
||||
padding:0 18px;
|
||||
display:block;
|
||||
float:left;
|
||||
font-size:1.4em;
|
||||
text-decoration:none;
|
||||
line-height:24px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
|
||||
nav ul li
|
||||
{
|
||||
border:1px solid #999;
|
||||
background:#e7e7e7;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0 2px -1px 0;
|
||||
}
|
||||
|
||||
nav ul li.on {
|
||||
border-bottom: 1px solid #fff;
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
nav ul a {
|
||||
padding:0 18px;
|
||||
display:block;
|
||||
float:left;
|
||||
font-size:1.4em;
|
||||
text-decoration:none;
|
||||
line-height:24px;
|
||||
}
|
||||
|
||||
#footer {}
|
||||
@@ -288,6 +297,6 @@ form.inline p { margin-bottom:0; }
|
||||
}
|
||||
|
||||
|
||||
.clearfix {
|
||||
clear:both;
|
||||
.clearfix {
|
||||
clear:both;
|
||||
}
|
@@ -7,4 +7,4 @@
|
||||
<h1>@Html.TitleForPage((string)Model.Title)</h1>
|
||||
@Display(Model.manage)
|
||||
@Display(Model.metadata)
|
||||
@Display(Model.primary)
|
||||
@Display(Model.Primary)
|
@@ -7,9 +7,21 @@
|
||||
// Zone is an alias for Display
|
||||
Func<dynamic, dynamic> Zone = x => Display(x);
|
||||
|
||||
if (Model.Sidebar != null) {
|
||||
|
||||
|
||||
if (Model.Sidebar != null && Model.Sidebar2 == null) {
|
||||
Model.Classes.Add("has-sidebar");
|
||||
}
|
||||
else if (Model.Sidebar == null && Model.Sidebar2 != null) {
|
||||
Model.Classes.Add("has-sidebar-left");
|
||||
}
|
||||
else if (Model.Sidebar != null && Model.Sidebar2 != null) {
|
||||
Model.Classes.Add("has-sidebars");
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Model.Attributes.Add("onclick", "javscript:alert('woot')");
|
||||
|
||||
@@ -73,10 +85,9 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@{WorkContext.Layout.Sidebar1.Add("just some text in featured");}
|
||||
@if(Model.Sidebar1 != null) {
|
||||
<aside class="sidebar">
|
||||
@Zone(Model.Sidebar1)
|
||||
@if(Model.Sidebar2 != null) {
|
||||
<aside class="sidebar secondary">
|
||||
@Zone(Model.Sidebar2)
|
||||
</aside>
|
||||
}
|
||||
|
||||
@@ -86,14 +97,10 @@
|
||||
@Zone(Model.Content)
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
<div id="content" class="group">
|
||||
Let's take over the home page
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@if(Model.Sidebar != null) {
|
||||
<aside class="sidebar">
|
||||
<aside class="sidebar primary">
|
||||
@Zone(Model.Sidebar)
|
||||
</aside>
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.Utilities;
|
||||
using Orchard.UI;
|
||||
@@ -23,6 +24,14 @@ namespace Orchard.ContentManagement {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ContentItem's identifier.
|
||||
/// </summary>
|
||||
[HiddenInput(DisplayValue = false)]
|
||||
public int Id {
|
||||
get { return ContentItem.Id; }
|
||||
}
|
||||
|
||||
public ContentTypeDefinition TypeDefinition { get { return ContentItem.TypeDefinition; } }
|
||||
public ContentTypePartDefinition TypePartDefinition { get; set; }
|
||||
public ContentPartDefinition PartDefinition { get { return TypePartDefinition.PartDefinition; } }
|
||||
|
@@ -10,7 +10,7 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
public TemplateFilterForRecord(string prefix, string templateName) {
|
||||
_prefix = prefix;
|
||||
_templateName = templateName;
|
||||
_location = "primary";
|
||||
_location = "Primary";
|
||||
_position = "5";
|
||||
}
|
||||
|
||||
|
@@ -3,5 +3,10 @@
|
||||
namespace Orchard.ContentManagement {
|
||||
public interface IContent {
|
||||
ContentItem ContentItem { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The ContentItem's identifier.
|
||||
/// </summary>
|
||||
int Id { get; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user