mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
- Updating ExtensionManager and ThemeService to read zones from the manifest.
- Adding a few essential parts for layers, widgets. --HG-- branch : dev
This commit is contained in:
@@ -41,6 +41,7 @@ namespace Orchard.Tests.DisplayManagement {
|
||||
public string Author { get; set; }
|
||||
public string HomePage { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string Zones { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
@@ -115,6 +115,7 @@ namespace Orchard.Setup {
|
||||
public string Author { get; set; }
|
||||
public string HomePage { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string Zones { get; set; }
|
||||
}
|
||||
|
||||
private readonly SafeModeTheme _theme = new SafeModeTheme {
|
||||
|
@@ -7,5 +7,6 @@
|
||||
public string Author { get; set; }
|
||||
public string HomePage { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string Zones { get; set; }
|
||||
}
|
||||
}
|
@@ -72,7 +72,8 @@ namespace Orchard.Themes.Services {
|
||||
HomePage = descriptor.WebSite ?? String.Empty,
|
||||
ThemeName = descriptor.Name,
|
||||
Version = descriptor.Version ?? String.Empty,
|
||||
Tags = descriptor.Tags ?? String.Empty
|
||||
Tags = descriptor.Tags ?? String.Empty,
|
||||
Zones = descriptor.Zones ?? String.Empty,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -90,7 +91,8 @@ namespace Orchard.Themes.Services {
|
||||
HomePage = descriptor.WebSite ?? String.Empty,
|
||||
ThemeName = descriptor.Name,
|
||||
Version = descriptor.Version ?? String.Empty,
|
||||
Tags = descriptor.Tags ?? String.Empty
|
||||
Tags = descriptor.Tags ?? String.Empty,
|
||||
Zones = descriptor.Zones ?? String.Empty,
|
||||
};
|
||||
if (!theme.Tags.Contains("hidden")) {
|
||||
themes.Add(theme);
|
||||
|
6
src/Orchard.Web/Modules/Orchard.Widgets/Models/Layer.cs
Normal file
6
src/Orchard.Web/Modules/Orchard.Widgets/Models/Layer.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class Layer : ContentItem {
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class LayerPart : ContentPart<LayerPartRecord> {
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class LayerPartRecord : ContentPartRecord {
|
||||
public virtual string Name { get; set; }
|
||||
public virtual string Description { get; set; }
|
||||
public virtual string Rule { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class LayerZone {
|
||||
public IList<WidgetPart> WidgetParts = new List<WidgetPart>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
using Orchard.ContentManagement;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class WidgetPart : ContentPart<WidgetPartRecord> {
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
using Orchard.ContentManagement.Records;
|
||||
|
||||
namespace Orchard.Widgets.Models {
|
||||
public class WidgetPartRecord : ContentPartRecord {
|
||||
public virtual string Title { get; set; }
|
||||
public virtual string Position { get; set; }
|
||||
}
|
||||
}
|
@@ -59,6 +59,12 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Models\Layer.cs" />
|
||||
<Compile Include="Models\LayerPart.cs" />
|
||||
<Compile Include="Models\LayerPartRecord.cs" />
|
||||
<Compile Include="Models\LayerZone.cs" />
|
||||
<Compile Include="Models\WidgetPart.cs" />
|
||||
<Compile Include="Models\WidgetPartRecord.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
@@ -69,6 +75,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Handlers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
|
@@ -4,3 +4,4 @@ description: Theme using serif.
|
||||
version: 1.0
|
||||
tags: Classic, Serif
|
||||
website: http://www.orchardproject.net
|
||||
zones: Sidebar
|
@@ -123,6 +123,7 @@ namespace Orchard.Environment.Extensions.Folders {
|
||||
WebSite = GetValue(fields, "website"),
|
||||
Tags = GetValue(fields, "tags"),
|
||||
AntiForgery = GetValue(fields, "antiforgery"),
|
||||
Zones = GetValue(fields, "zones"),
|
||||
};
|
||||
extensionDescriptor.Features = GetFeaturesForExtension(GetMapping(fields, "features"), extensionDescriptor);
|
||||
return extensionDescriptor;
|
||||
|
@@ -26,6 +26,7 @@ namespace Orchard.Environment.Extensions.Models {
|
||||
public string WebSite { get; set; }
|
||||
public string Tags { get; set; }
|
||||
public string AntiForgery { get; set; }
|
||||
public string Zones { get; set; }
|
||||
|
||||
public IEnumerable<FeatureDescriptor> Features { get; set; }
|
||||
}
|
||||
|
@@ -10,5 +10,6 @@
|
||||
string Author { get; set; }
|
||||
string HomePage { get; set; }
|
||||
string Tags { get; set; }
|
||||
string Zones { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user