- 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:
Suha Can
2010-09-29 14:29:43 -07:00
parent 19313b887f
commit e9208542ed
15 changed files with 60 additions and 2 deletions

View File

@@ -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; }
}

View File

@@ -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 {

View File

@@ -7,5 +7,6 @@
public string Author { get; set; }
public string HomePage { get; set; }
public string Tags { get; set; }
public string Zones { get; set; }
}
}

View File

@@ -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);

View File

@@ -0,0 +1,6 @@
using Orchard.ContentManagement;
namespace Orchard.Widgets.Models {
public class Layer : ContentItem {
}
}

View File

@@ -0,0 +1,6 @@
using Orchard.ContentManagement;
namespace Orchard.Widgets.Models {
public class LayerPart : ContentPart<LayerPartRecord> {
}
}

View File

@@ -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; }
}
}

View File

@@ -0,0 +1,7 @@
using System.Collections.Generic;
namespace Orchard.Widgets.Models {
public class LayerZone {
public IList<WidgetPart> WidgetParts = new List<WidgetPart>();
}
}

View File

@@ -0,0 +1,6 @@
using Orchard.ContentManagement;
namespace Orchard.Widgets.Models {
public class WidgetPart : ContentPart<WidgetPartRecord> {
}
}

View File

@@ -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; }
}
}

View File

@@ -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">

View File

@@ -4,3 +4,4 @@ description: Theme using serif.
version: 1.0
tags: Classic, Serif
website: http://www.orchardproject.net
zones: Sidebar

View File

@@ -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;

View File

@@ -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; }
}

View File

@@ -10,5 +10,6 @@
string Author { get; set; }
string HomePage { get; set; }
string Tags { get; set; }
string Zones { get; set; }
}
}