From 515d687342005c8858e9341bcb041d94054e66af Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Thu, 22 Apr 2010 14:39:09 -0700 Subject: [PATCH] Pulling Themes from Orchard.Core into its own module, Orchard.Themes --HG-- branch : dev rename : src/Orchard.Web/Core/Themes/AdminMenu.cs => src/Orchard.Web/Modules/Orchard.Themes/AdminMenu.cs rename : src/Orchard.Web/Core/Themes/Content/orchard.ico => src/Orchard.Web/Modules/Orchard.Themes/Content/orchard.ico rename : src/Orchard.Web/Core/Themes/Controllers/AdminController.cs => src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs rename : src/Orchard.Web/Core/Themes/DesignerNotes/ZoneManagerEvents.cs => src/Orchard.Web/Modules/Orchard.Themes/DesignerNotes/ZoneManagerEvents.cs rename : src/Orchard.Web/Core/Themes/Handlers/ThemeSiteSettingsHandler.cs => src/Orchard.Web/Modules/Orchard.Themes/Handlers/ThemeSiteSettingsHandler.cs rename : src/Orchard.Web/Core/Themes/Models/Theme.cs => src/Orchard.Web/Modules/Orchard.Themes/Models/Theme.cs rename : src/Orchard.Web/Core/Themes/Models/ThemeRecord.cs => src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeRecord.cs rename : src/Orchard.Web/Core/Themes/Models/ThemeSiteSettings.cs => src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettings.cs rename : src/Orchard.Web/Core/Themes/Models/ThemeSiteSettingsRecord.cs => src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettingsRecord.cs rename : src/Orchard.Web/Core/Themes/Module.txt => src/Orchard.Web/Modules/Orchard.Themes/Module.txt rename : src/Orchard.Web/Core/Themes/Permissions.cs => src/Orchard.Web/Modules/Orchard.Themes/Permissions.cs rename : src/Orchard.Web/Core/Themes/Preview/IPreviewTheme.cs => src/Orchard.Web/Modules/Orchard.Themes/Preview/IPreviewTheme.cs rename : src/Orchard.Web/Core/Themes/Preview/PreviewTheme.cs => src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewTheme.cs rename : src/Orchard.Web/Core/Themes/Preview/PreviewThemeFilter.cs => src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs rename : src/Orchard.Web/Core/Themes/Scripts/base.js => src/Orchard.Web/Modules/Orchard.Themes/Scripts/base.js rename : src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.js => src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.js rename : src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.min.js => src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.min.js rename : src/Orchard.Web/Core/Themes/Services/SafeModeThemeSelector.cs => src/Orchard.Web/Modules/Orchard.Themes/Services/SafeModeThemeSelector.cs rename : src/Orchard.Web/Core/Themes/Services/SiteThemeSelector.cs => src/Orchard.Web/Modules/Orchard.Themes/Services/SiteThemeSelector.cs rename : src/Orchard.Web/Core/Themes/Services/ThemeService.cs => src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs rename : src/Orchard.Web/Core/Themes/Services/ThemeZoneManagerEvents.cs => src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeZoneManagerEvents.cs rename : src/Orchard.Web/Core/Themes/Styles/Images/toolBarActiveButtonBackground.gif => src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarActiveButtonBackground.gif rename : src/Orchard.Web/Core/Themes/Styles/Images/toolBarBackground.gif => src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarBackground.gif rename : src/Orchard.Web/Core/Themes/Styles/Images/toolBarHoverButtonBackground.gif => src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarHoverButtonBackground.gif rename : src/Orchard.Web/Core/Themes/Styles/special.css => src/Orchard.Web/Modules/Orchard.Themes/Styles/special.css rename : src/Orchard.Web/Core/Themes/ViewModels/PreviewViewModel.cs => src/Orchard.Web/Modules/Orchard.Themes/ViewModels/PreviewViewModel.cs rename : src/Orchard.Web/Core/Themes/ViewModels/ThemesIndexViewModel.cs => src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs rename : src/Orchard.Web/Core/Themes/Views/Admin/Index.aspx => src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx rename : src/Orchard.Web/Core/Themes/Views/Admin/Install.aspx => src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.aspx rename : src/Orchard.Web/Core/Themes/Views/Admin/ThemePreview.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx rename : src/Orchard.Web/Core/Themes/Views/EditorTemplates/Items/ContentItem.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/DisplayTemplates/Items/ContentItem.ascx rename : src/Orchard.Web/Core/Themes/Views/Document.aspx => src/Orchard.Web/Modules/Orchard.Themes/Views/Document.aspx rename : src/Orchard.Web/Core/Themes/Views/EditorTemplates/Items/ContentItem.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/EditorTemplates/Items/ContentItem.ascx rename : src/Orchard.Web/Core/Themes/Views/HeadPreload.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/HeadPreload.ascx rename : src/Orchard.Web/Core/Themes/Views/Header.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/Header.ascx rename : src/Orchard.Web/Core/Themes/Views/Layout.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/Layout.ascx rename : src/Orchard.Web/Core/Themes/Views/Menu.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx rename : src/Orchard.Web/Core/Themes/Views/Messages.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/Messages.ascx rename : src/Orchard.Web/Core/Themes/Views/NotFound.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/NotFound.ascx rename : src/Orchard.Web/Core/Themes/Views/User.ascx => src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx rename : src/Orchard.Web/Core/Themes/Views/Web.config => src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config rename : src/Orchard.Web/Core/Themes/Views/Web.config => src/Orchard.Web/Modules/Orchard.Themes/Web.config --- src/Orchard.Specs/Setup.feature | 6 +- src/Orchard.Specs/Setup.feature.cs | 7 +- src/Orchard.Web/Core/Orchard.Core.csproj | 41 ----- .../Themes/ViewModels/CreateThemeViewModel.cs | 23 --- .../Orchard.Blogs/Orchard.Blogs.csproj | 5 +- .../Orchard.MultiTenancy.csproj | 5 +- .../Controllers/SetupController.cs | 4 +- .../Orchard.Themes}/AdminMenu.cs | 8 +- .../Orchard.Themes}/Content/orchard.ico | Bin .../Controllers/AdminController.cs | 13 +- .../DesignerNotes/ZoneManagerEvents.cs | 17 +- .../Handlers/ThemeSiteSettingsHandler.cs | 4 +- .../Orchard.Themes}/Models/Theme.cs | 3 +- .../Orchard.Themes}/Models/ThemeRecord.cs | 2 +- .../Models/ThemeSiteSettings.cs | 4 +- .../Models/ThemeSiteSettingsRecord.cs | 2 +- .../Orchard.Themes}/Module.txt | 0 .../Orchard.Themes/Orchard.Themes.csproj | 145 ++++++++++++++++++ .../Orchard.Themes}/Permissions.cs | 18 +-- .../Orchard.Themes}/Preview/IPreviewTheme.cs | 2 +- .../Orchard.Themes}/Preview/PreviewTheme.cs | 3 +- .../Preview/PreviewThemeFilter.cs | 19 ++- .../Orchard.Themes/Properties/AssemblyInfo.cs | 35 +++++ .../Orchard.Themes}/Scripts/base.js | 0 .../Orchard.Themes}/Scripts/jquery-1.4.1.js | 0 .../Scripts/jquery-1.4.1.min.js | 0 .../Services/SafeModeThemeSelector.cs | 3 +- .../Services/SiteThemeSelector.cs | 7 +- .../Orchard.Themes}/Services/ThemeService.cs | 37 +++-- .../Services/ThemeZoneManagerEvents.cs | 2 +- .../Images/toolBarActiveButtonBackground.gif | Bin .../Styles/Images/toolBarBackground.gif | Bin .../Images/toolBarHoverButtonBackground.gif | Bin .../Orchard.Themes}/Styles/special.css | 0 .../ViewModels/PreviewViewModel.cs | 4 +- .../ViewModels/ThemesIndexViewModel.cs | 5 +- .../Orchard.Themes}/Views/Admin/Index.aspx | 4 +- .../Orchard.Themes}/Views/Admin/Install.aspx | 1 + .../Views/Admin/ThemePreview.ascx | 5 +- .../DisplayTemplates/Items/ContentItem.ascx | 1 + .../Orchard.Themes}/Views/Document.aspx | 0 .../EditorTemplates/Items/ContentItem.ascx | 1 + .../Orchard.Themes}/Views/HeadPreload.ascx | 3 +- .../Orchard.Themes}/Views/Header.ascx | 1 + .../Orchard.Themes}/Views/Layout.ascx | 1 + .../Orchard.Themes}/Views/Menu.ascx | 1 + .../Orchard.Themes}/Views/Messages.ascx | 0 .../Orchard.Themes}/Views/NotFound.ascx | 1 + .../Orchard.Themes}/Views/User.ascx | 0 .../Orchard.Themes}/Views/Web.config | 0 .../Modules/Orchard.Themes/Web.config | 140 +++++++++++++++++ src/Orchard.Web/Orchard.Web.csproj | 4 + .../Themes/SafeMode/Views/Layout.ascx | 4 +- src/Orchard.sln | 7 + 54 files changed, 431 insertions(+), 167 deletions(-) delete mode 100644 src/Orchard.Web/Core/Themes/ViewModels/CreateThemeViewModel.cs rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/AdminMenu.cs (57%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Content/orchard.ico (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Controllers/AdminController.cs (95%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/DesignerNotes/ZoneManagerEvents.cs (73%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Handlers/ThemeSiteSettingsHandler.cs (82%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Models/Theme.cs (87%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Models/ThemeRecord.cs (90%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Models/ThemeSiteSettings.cs (84%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Models/ThemeSiteSettingsRecord.cs (79%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Module.txt (100%) create mode 100644 src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Permissions.cs (57%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Preview/IPreviewTheme.cs (75%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Preview/PreviewTheme.cs (91%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Preview/PreviewThemeFilter.cs (59%) create mode 100644 src/Orchard.Web/Modules/Orchard.Themes/Properties/AssemblyInfo.cs rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Scripts/base.js (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Scripts/jquery-1.4.1.js (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Scripts/jquery-1.4.1.min.js (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Services/SafeModeThemeSelector.cs (80%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Services/SiteThemeSelector.cs (84%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Services/ThemeService.cs (67%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Services/ThemeZoneManagerEvents.cs (95%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Styles/Images/toolBarActiveButtonBackground.gif (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Styles/Images/toolBarBackground.gif (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Styles/Images/toolBarHoverButtonBackground.gif (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Styles/special.css (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/ViewModels/PreviewViewModel.cs (75%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/ViewModels/ThemesIndexViewModel.cs (75%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Admin/Index.aspx (95%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Admin/Install.aspx (92%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Admin/ThemePreview.ascx (91%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/DisplayTemplates/Items/ContentItem.ascx (80%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Document.aspx (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/EditorTemplates/Items/ContentItem.ascx (80%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/HeadPreload.ascx (88%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Header.ascx (74%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Layout.ascx (92%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Menu.ascx (94%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Messages.ascx (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/NotFound.ascx (84%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/User.ascx (100%) rename src/Orchard.Web/{Core/Themes => Modules/Orchard.Themes}/Views/Web.config (100%) create mode 100644 src/Orchard.Web/Modules/Orchard.Themes/Web.config diff --git a/src/Orchard.Specs/Setup.feature b/src/Orchard.Specs/Setup.feature index 7548be1bb..3dc7dfb51 100644 --- a/src/Orchard.Specs/Setup.feature +++ b/src/Orchard.Specs/Setup.feature @@ -1,4 +1,4 @@ -Feature: Setup +Feature: Setup In order to install orchard As a new user I want to setup a new site from the default screen @@ -33,8 +33,8 @@ Scenario: Some of the initial form values are required Scenario: Calling setup on a brand new install Given I have a clean site with | extension | names | - | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Pages, Orchard.Comments, TinyMce | - | core | Common, Dashboard, Feeds, HomePage, Navigation, Scheduling, Settings, Themes, XmlRpc | + | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Pages, Orchard.Comments, Orchard.Themes, TinyMce | + | core | Common, Dashboard, Feeds, HomePage, Navigation, Scheduling, Settings, XmlRpc | | theme | SafeMode, Classic | And I am on "/Setup" When I fill in diff --git a/src/Orchard.Specs/Setup.feature.cs b/src/Orchard.Specs/Setup.feature.cs index 5240b3b9b..6d844e3c7 100644 --- a/src/Orchard.Specs/Setup.feature.cs +++ b/src/Orchard.Specs/Setup.feature.cs @@ -138,12 +138,11 @@ this.ScenarioSetup(scenarioInfo); "names"}); table1.AddRow(new string[] { "module", - "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Pages, Orchard.Comments, Tin" + - "yMce"}); + "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Pages, Orchard.Comments, Orc" + + "hard.Themes, TinyMce"}); table1.AddRow(new string[] { "core", - "Common, Dashboard, Feeds, HomePage, Navigation, Scheduling, Settings, Themes, Xml" + - "Rpc"}); + "Common, Dashboard, Feeds, HomePage, Navigation, Scheduling, Settings, XmlRpc"}); table1.AddRow(new string[] { "theme", "SafeMode, Classic"}); diff --git a/src/Orchard.Web/Core/Orchard.Core.csproj b/src/Orchard.Web/Core/Orchard.Core.csproj index 14c01edb0..5e880ffbb 100644 --- a/src/Orchard.Web/Core/Orchard.Core.csproj +++ b/src/Orchard.Web/Core/Orchard.Core.csproj @@ -128,30 +128,12 @@ - - - - - - - - - - - - - - - - - - @@ -187,8 +169,6 @@ - - @@ -200,16 +180,6 @@ - - - - - - - - - - @@ -218,10 +188,6 @@ - - - - @@ -229,13 +195,6 @@ - - - - - - - diff --git a/src/Orchard.Web/Core/Themes/ViewModels/CreateThemeViewModel.cs b/src/Orchard.Web/Core/Themes/ViewModels/CreateThemeViewModel.cs deleted file mode 100644 index f04265db6..000000000 --- a/src/Orchard.Web/Core/Themes/ViewModels/CreateThemeViewModel.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; -using Orchard.Mvc.ViewModels; - -namespace Orchard.Core.Themes.ViewModels { - public class CreateThemeViewModel : AdminViewModel { - [Required] - public string Name { get; set; } - [Required] - public string Author { get; set; } - [Required] - public string Description { get; set; } - [Required] - public string Version { get; set; } - [Required] - public string Tags { get; set; } - [Required] - public string Homepage { get; set; } - } -} diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj index 17ef187bc..b6bbd7bf5 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Orchard.Blogs.csproj @@ -198,9 +198,8 @@ False - False - - + True + http://orchard.codeplex.com False diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj index 33ecafaaa..918329a08 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Orchard.MultiTenancy.csproj @@ -103,9 +103,8 @@ False - False - - + True + http://orchard.codeplex.com False diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs index 9cc552f68..f7af7ecf3 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs @@ -83,9 +83,9 @@ namespace Orchard.Setup.Controllers { // The vanilla Orchard distibution has the following modules enabled. const string hardcoded = @"Orchard.Framework, - Common,Dashboard,Feeds,HomePage,Navigation,Scheduling,Settings,Themes,XmlRpc, + Common,Dashboard,Feeds,HomePage,Navigation,Scheduling,Settings,XmlRpc, Orchard.Users,Orchard.Roles,TinyMce, - Orchard.Pages,Orchard.Comments"; + Orchard.Pages,Orchard.Comments,Orchard.Themes"; var shellDescriptor = new ShellDescriptor { EnabledFeatures = hardcoded.Split(',').Select(name => new ShellFeature { Name = name.Trim() }) diff --git a/src/Orchard.Web/Core/Themes/AdminMenu.cs b/src/Orchard.Web/Modules/Orchard.Themes/AdminMenu.cs similarity index 57% rename from src/Orchard.Web/Core/Themes/AdminMenu.cs rename to src/Orchard.Web/Modules/Orchard.Themes/AdminMenu.cs index d482dded4..80889c706 100644 --- a/src/Orchard.Web/Core/Themes/AdminMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/AdminMenu.cs @@ -1,14 +1,14 @@ using Orchard.UI.Navigation; -namespace Orchard.Core.Themes { +namespace Orchard.Themes { public class AdminMenu : INavigationProvider { public string MenuName { get { return "admin"; } } public void GetNavigation(NavigationBuilder builder) { builder.Add("Site", "11", menu => menu - .Add("Manage Themes", "4.0", item => item.Action("Index", "Admin", new { area = "Themes" }) - .Permission(Permissions.ManageThemes).Permission(Permissions.ApplyTheme))); + .Add("Manage Themes", "4.0", item => item.Action("Index", "Admin", new { area = "Orchard.Themes" }) + .Permission(Permissions.ManageThemes).Permission(Permissions.ApplyTheme))); } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Content/orchard.ico b/src/Orchard.Web/Modules/Orchard.Themes/Content/orchard.ico similarity index 100% rename from src/Orchard.Web/Core/Themes/Content/orchard.ico rename to src/Orchard.Web/Modules/Orchard.Themes/Content/orchard.ico diff --git a/src/Orchard.Web/Core/Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs similarity index 95% rename from src/Orchard.Web/Core/Themes/Controllers/AdminController.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 384039a85..139696373 100644 --- a/src/Orchard.Web/Core/Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -2,15 +2,14 @@ using System.Reflection; using System.Web; using System.Web.Mvc; -using Orchard.Core.Themes.Preview; -using Orchard.Core.Themes.ViewModels; using Orchard.Localization; -using Orchard.Security; -using Orchard.Themes; -using Orchard.UI.Notify; using Orchard.Mvc.ViewModels; +using Orchard.Security; +using Orchard.Themes.Preview; +using Orchard.Themes.ViewModels; +using Orchard.UI.Notify; -namespace Orchard.Core.Themes.Controllers { +namespace Orchard.Themes.Controllers { [ValidateInput(false)] public class AdminController : Controller { private readonly IThemeService _themeService; @@ -158,4 +157,4 @@ namespace Orchard.Core.Themes.Controllers { } } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/DesignerNotes/ZoneManagerEvents.cs b/src/Orchard.Web/Modules/Orchard.Themes/DesignerNotes/ZoneManagerEvents.cs similarity index 73% rename from src/Orchard.Web/Core/Themes/DesignerNotes/ZoneManagerEvents.cs rename to src/Orchard.Web/Modules/Orchard.Themes/DesignerNotes/ZoneManagerEvents.cs index b4cc3479b..39b7afb04 100644 --- a/src/Orchard.Web/Core/Themes/DesignerNotes/ZoneManagerEvents.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/DesignerNotes/ZoneManagerEvents.cs @@ -2,10 +2,9 @@ using System.Linq; using System.Web.Mvc.Html; using Orchard.Security; -using Orchard.Themes; using Orchard.UI.Zones; -namespace Orchard.Core.Themes.DesignerNotes { +namespace Orchard.Themes.DesignerNotes { public class ZoneManagerEvents : IZoneManagerEvents { private readonly IThemeService _themeService; private readonly IAuthorizationService _authorizationService; @@ -35,12 +34,12 @@ namespace Orchard.Core.Themes.DesignerNotes { if (accessAdminPanel) { writer.Write("
"); writer.Write(context.Html.ActionLink("Edit", "AddWidget", new { - Area = "Futures.Widgets", - Controller = "Admin", - context.ZoneName, - theme.ThemeName, - ReturnUrl = requestContext.HttpContext.Request.Url, - })); + Area = "Futures.Widgets", + Controller = "Admin", + context.ZoneName, + theme.ThemeName, + ReturnUrl = requestContext.HttpContext.Request.Url, + })); writer.Write("
"); } writer.Write(File.ReadAllText(physicalPath)); @@ -58,4 +57,4 @@ namespace Orchard.Core.Themes.DesignerNotes { public void ZoneRendered(ZoneRenderContext context) { } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Handlers/ThemeSiteSettingsHandler.cs b/src/Orchard.Web/Modules/Orchard.Themes/Handlers/ThemeSiteSettingsHandler.cs similarity index 82% rename from src/Orchard.Web/Core/Themes/Handlers/ThemeSiteSettingsHandler.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Handlers/ThemeSiteSettingsHandler.cs index 5b60419e5..fbedb0146 100644 --- a/src/Orchard.Web/Core/Themes/Handlers/ThemeSiteSettingsHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Handlers/ThemeSiteSettingsHandler.cs @@ -1,9 +1,9 @@ using JetBrains.Annotations; -using Orchard.Core.Themes.Models; using Orchard.Data; using Orchard.ContentManagement.Handlers; +using Orchard.Themes.Models; -namespace Orchard.Core.Themes.Handlers { +namespace Orchard.Themes.Handlers { [UsedImplicitly] public class ThemeSiteSettingsHandler : ContentHandler { public ThemeSiteSettingsHandler(IRepository repository) { diff --git a/src/Orchard.Web/Core/Themes/Models/Theme.cs b/src/Orchard.Web/Modules/Orchard.Themes/Models/Theme.cs similarity index 87% rename from src/Orchard.Web/Core/Themes/Models/Theme.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Models/Theme.cs index 436fd8b21..84a592dbd 100644 --- a/src/Orchard.Web/Core/Themes/Models/Theme.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Models/Theme.cs @@ -1,7 +1,6 @@ using Orchard.ContentManagement; -using Orchard.Themes; -namespace Orchard.Core.Themes.Models { +namespace Orchard.Themes.Models { public class Theme : ContentPart, ITheme { public static readonly ContentType ContentType = new ContentType { Name = "theme", DisplayName = "Themes" }; diff --git a/src/Orchard.Web/Core/Themes/Models/ThemeRecord.cs b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeRecord.cs similarity index 90% rename from src/Orchard.Web/Core/Themes/Models/ThemeRecord.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeRecord.cs index ab427d6a6..c96c8e05b 100644 --- a/src/Orchard.Web/Core/Themes/Models/ThemeRecord.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeRecord.cs @@ -1,6 +1,6 @@ using Orchard.ContentManagement.Records; -namespace Orchard.Core.Themes.Models { +namespace Orchard.Themes.Models { public class ThemeRecord : ContentPartRecord { public virtual string ThemeName { get; set; } public virtual string DisplayName { get; set; } diff --git a/src/Orchard.Web/Core/Themes/Models/ThemeSiteSettings.cs b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettings.cs similarity index 84% rename from src/Orchard.Web/Core/Themes/Models/ThemeSiteSettings.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettings.cs index 0b86db6c0..f425e4f6c 100644 --- a/src/Orchard.Web/Core/Themes/Models/ThemeSiteSettings.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettings.cs @@ -1,10 +1,10 @@ using Orchard.ContentManagement; -namespace Orchard.Core.Themes.Models { +namespace Orchard.Themes.Models { public class ThemeSiteSettings : ContentPart { public string CurrentThemeName { get { return Record.CurrentThemeName; } set { Record.CurrentThemeName = value; } } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Models/ThemeSiteSettingsRecord.cs b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettingsRecord.cs similarity index 79% rename from src/Orchard.Web/Core/Themes/Models/ThemeSiteSettingsRecord.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettingsRecord.cs index b0f20212d..1012ab0b7 100644 --- a/src/Orchard.Web/Core/Themes/Models/ThemeSiteSettingsRecord.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Models/ThemeSiteSettingsRecord.cs @@ -1,6 +1,6 @@ using Orchard.ContentManagement.Records; -namespace Orchard.Core.Themes.Models { +namespace Orchard.Themes.Models { public class ThemeSiteSettingsRecord : ContentPartRecord { public virtual string CurrentThemeName { get; set; } } diff --git a/src/Orchard.Web/Core/Themes/Module.txt b/src/Orchard.Web/Modules/Orchard.Themes/Module.txt similarity index 100% rename from src/Orchard.Web/Core/Themes/Module.txt rename to src/Orchard.Web/Modules/Orchard.Themes/Module.txt diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj new file mode 100644 index 000000000..9e305fba5 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj @@ -0,0 +1,145 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CDE24A24-01D3-403C-84B9-37722E18DFB7} + {F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Orchard.Themes + Orchard.Themes + v3.5 + false + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + + + 3.5 + + + 3.5 + + + 3.5 + + + False + C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\\Assemblies\System.Web.Mvc.dll + + + 3.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6} + Orchard.Framework + + + + + + + + + + + + + False + True + 20578 + / + + + False + True + http://orchard.codeplex.com + False + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Permissions.cs b/src/Orchard.Web/Modules/Orchard.Themes/Permissions.cs similarity index 57% rename from src/Orchard.Web/Core/Themes/Permissions.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Permissions.cs index 8d6432c9f..3ae99df52 100644 --- a/src/Orchard.Web/Core/Themes/Permissions.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Permissions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Orchard.Security.Permissions; -namespace Orchard.Core.Themes { +namespace Orchard.Themes { public class Permissions : IPermissionProvider { public static readonly Permission ManageThemes = new Permission { Description = "Manage Themes", Name = "ManageThemes" }; public static readonly Permission ApplyTheme = new Permission { Description = "Apply a Theme", Name = "ApplyTheme" }; @@ -14,18 +14,18 @@ namespace Orchard.Core.Themes { public IEnumerable GetPermissions() { return new Permission[] { - ManageThemes, - ApplyTheme, - }; + ManageThemes, + ApplyTheme, + }; } public IEnumerable GetDefaultStereotypes() { return new[] { - new PermissionStereotype { - Name = "Administrator", - Permissions = new[] {ManageThemes, ApplyTheme} - }, - }; + new PermissionStereotype { + Name = "Administrator", + Permissions = new[] {ManageThemes, ApplyTheme} + }, + }; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Preview/IPreviewTheme.cs b/src/Orchard.Web/Modules/Orchard.Themes/Preview/IPreviewTheme.cs similarity index 75% rename from src/Orchard.Web/Core/Themes/Preview/IPreviewTheme.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Preview/IPreviewTheme.cs index 37b2b9e09..1b872afd7 100644 --- a/src/Orchard.Web/Core/Themes/Preview/IPreviewTheme.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Preview/IPreviewTheme.cs @@ -1,4 +1,4 @@ -namespace Orchard.Core.Themes.Preview { +namespace Orchard.Themes.Preview { public interface IPreviewTheme : IDependency { string GetPreviewTheme(); void SetPreviewTheme(string themeName); diff --git a/src/Orchard.Web/Core/Themes/Preview/PreviewTheme.cs b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewTheme.cs similarity index 91% rename from src/Orchard.Web/Core/Themes/Preview/PreviewTheme.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewTheme.cs index d723211cc..c1e064dc8 100644 --- a/src/Orchard.Web/Core/Themes/Preview/PreviewTheme.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewTheme.cs @@ -1,9 +1,8 @@ using System; using System.Web; using System.Web.Routing; -using Orchard.Themes; -namespace Orchard.Core.Themes.Preview { +namespace Orchard.Themes.Preview { public class PreviewTheme : IPreviewTheme, IThemeSelector { private static readonly string PreviewThemeKey = typeof(PreviewTheme).FullName; private readonly HttpContextBase _httpContext; diff --git a/src/Orchard.Web/Core/Themes/Preview/PreviewThemeFilter.cs b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs similarity index 59% rename from src/Orchard.Web/Core/Themes/Preview/PreviewThemeFilter.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs index 73cb0e4f6..a14ecf909 100644 --- a/src/Orchard.Web/Core/Themes/Preview/PreviewThemeFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs @@ -1,11 +1,10 @@ using System.Linq; using System.Web.Mvc; -using Orchard.Core.Themes.ViewModels; using Orchard.Mvc.Filters; using Orchard.Mvc.ViewModels; -using Orchard.Themes; +using Orchard.Themes.ViewModels; -namespace Orchard.Core.Themes.Preview { +namespace Orchard.Themes.Preview { public class PreviewThemeFilter : FilterProvider, IResultFilter { private readonly IThemeService _themeService; private readonly IPreviewTheme _previewTheme; @@ -26,12 +25,12 @@ namespace Orchard.Core.Themes.Preview { var themes = _themeService.GetInstalledThemes(); var model = new PreviewViewModel { - Themes = themes.Select(theme => new SelectListItem { - Text = theme.DisplayName, - Value = theme.ThemeName, - Selected = theme.ThemeName == previewThemeName - }) - }; + Themes = themes.Select(theme => new SelectListItem { + Text = theme.DisplayName, + Value = theme.ThemeName, + Selected = theme.ThemeName == previewThemeName + }) + }; baseViewModel.Zones.AddRenderPartial("body:before", "Admin/ThemePreview", model); } @@ -39,4 +38,4 @@ namespace Orchard.Core.Themes.Preview { } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Properties/AssemblyInfo.cs b/src/Orchard.Web/Modules/Orchard.Themes/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..cfe1eaabc --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Themes/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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.Themes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Orchard.Themes")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[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("3d727a0c-4b37-4081-bef6-68e68a3bae9b")] + +// 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")] diff --git a/src/Orchard.Web/Core/Themes/Scripts/base.js b/src/Orchard.Web/Modules/Orchard.Themes/Scripts/base.js similarity index 100% rename from src/Orchard.Web/Core/Themes/Scripts/base.js rename to src/Orchard.Web/Modules/Orchard.Themes/Scripts/base.js diff --git a/src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.js b/src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.js similarity index 100% rename from src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.js rename to src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.js diff --git a/src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.min.js b/src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.min.js similarity index 100% rename from src/Orchard.Web/Core/Themes/Scripts/jquery-1.4.1.min.js rename to src/Orchard.Web/Modules/Orchard.Themes/Scripts/jquery-1.4.1.min.js diff --git a/src/Orchard.Web/Core/Themes/Services/SafeModeThemeSelector.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/SafeModeThemeSelector.cs similarity index 80% rename from src/Orchard.Web/Core/Themes/Services/SafeModeThemeSelector.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Services/SafeModeThemeSelector.cs index b27b655d8..9b75bcb3c 100644 --- a/src/Orchard.Web/Core/Themes/Services/SafeModeThemeSelector.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/SafeModeThemeSelector.cs @@ -1,8 +1,7 @@ using System.Web.Routing; using JetBrains.Annotations; -using Orchard.Themes; -namespace Orchard.Core.Themes.Services { +namespace Orchard.Themes.Services { [UsedImplicitly] public class SafeModeThemeSelector : IThemeSelector { public ThemeSelectorResult GetTheme(RequestContext context) { diff --git a/src/Orchard.Web/Core/Themes/Services/SiteThemeSelector.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/SiteThemeSelector.cs similarity index 84% rename from src/Orchard.Web/Core/Themes/Services/SiteThemeSelector.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Services/SiteThemeSelector.cs index a646eb26e..49a1a199e 100644 --- a/src/Orchard.Web/Core/Themes/Services/SiteThemeSelector.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/SiteThemeSelector.cs @@ -1,12 +1,11 @@ using System; using System.Web.Routing; using JetBrains.Annotations; -using Orchard.Core.Themes.Models; using Orchard.ContentManagement; using Orchard.Settings; -using Orchard.Themes; +using Orchard.Themes.Models; -namespace Orchard.Core.Themes.Services { +namespace Orchard.Themes.Services { [UsedImplicitly] public class SiteThemeSelector : IThemeSelector { @@ -22,4 +21,4 @@ namespace Orchard.Core.Themes.Services { return new ThemeSelectorResult { Priority = -5, ThemeName = currentThemeName }; } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Services/ThemeService.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs similarity index 67% rename from src/Orchard.Web/Core/Themes/Services/ThemeService.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs index c1071524c..ab70b6566 100644 --- a/src/Orchard.Web/Core/Themes/Services/ThemeService.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs @@ -8,10 +8,9 @@ using Orchard.Environment.Extensions; using Orchard.Logging; using Orchard.ContentManagement; using Orchard.Settings; -using Orchard.Themes; -using Orchard.Core.Themes.Models; +using Orchard.Themes.Models; -namespace Orchard.Core.Themes.Services { +namespace Orchard.Themes.Services { [UsedImplicitly] public class ThemeService : IThemeService { private readonly IExtensionManager _extensionManager; @@ -67,14 +66,14 @@ namespace Orchard.Core.Themes.Services { foreach (var descriptor in _extensionManager.AvailableExtensions()) { if (String.Equals(descriptor.Name, name, StringComparison.OrdinalIgnoreCase)) { return new Theme { - Author = descriptor.Author ?? String.Empty, - Description = descriptor.Description ?? String.Empty, - DisplayName = descriptor.DisplayName ?? String.Empty, - HomePage = descriptor.WebSite ?? String.Empty, - ThemeName = descriptor.Name, - Version = descriptor.Version ?? String.Empty, - Tags = descriptor.Tags ?? String.Empty - }; + Author = descriptor.Author ?? String.Empty, + Description = descriptor.Description ?? String.Empty, + DisplayName = descriptor.DisplayName ?? String.Empty, + HomePage = descriptor.WebSite ?? String.Empty, + ThemeName = descriptor.Name, + Version = descriptor.Version ?? String.Empty, + Tags = descriptor.Tags ?? String.Empty + }; } } return null; @@ -85,14 +84,14 @@ namespace Orchard.Core.Themes.Services { foreach (var descriptor in _extensionManager.AvailableExtensions()) { if (String.Equals(descriptor.ExtensionType, "Theme", StringComparison.OrdinalIgnoreCase)) { Theme theme = new Theme { - Author = descriptor.Author ?? String.Empty, - Description = descriptor.Description ?? String.Empty, - DisplayName = descriptor.DisplayName ?? String.Empty, - HomePage = descriptor.WebSite ?? String.Empty, - ThemeName = descriptor.Name, - Version = descriptor.Version ?? String.Empty, - Tags = descriptor.Tags ?? String.Empty - }; + Author = descriptor.Author ?? String.Empty, + Description = descriptor.Description ?? String.Empty, + DisplayName = descriptor.DisplayName ?? String.Empty, + HomePage = descriptor.WebSite ?? String.Empty, + ThemeName = descriptor.Name, + Version = descriptor.Version ?? String.Empty, + Tags = descriptor.Tags ?? String.Empty + }; if (!theme.Tags.Contains("hidden")) { themes.Add(theme); } diff --git a/src/Orchard.Web/Core/Themes/Services/ThemeZoneManagerEvents.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeZoneManagerEvents.cs similarity index 95% rename from src/Orchard.Web/Core/Themes/Services/ThemeZoneManagerEvents.cs rename to src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeZoneManagerEvents.cs index d1dbbb8dd..c4cb663ae 100644 --- a/src/Orchard.Web/Core/Themes/Services/ThemeZoneManagerEvents.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeZoneManagerEvents.cs @@ -1,7 +1,7 @@ using Orchard.Localization; using Orchard.UI.Zones; -namespace Orchard.Core.Themes.Services { +namespace Orchard.Themes.Services { public class ThemeZoneManagerEvents : IZoneManagerEvents { public ThemeZoneManagerEvents() { T = NullLocalizer.Instance; diff --git a/src/Orchard.Web/Core/Themes/Styles/Images/toolBarActiveButtonBackground.gif b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarActiveButtonBackground.gif similarity index 100% rename from src/Orchard.Web/Core/Themes/Styles/Images/toolBarActiveButtonBackground.gif rename to src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarActiveButtonBackground.gif diff --git a/src/Orchard.Web/Core/Themes/Styles/Images/toolBarBackground.gif b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarBackground.gif similarity index 100% rename from src/Orchard.Web/Core/Themes/Styles/Images/toolBarBackground.gif rename to src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarBackground.gif diff --git a/src/Orchard.Web/Core/Themes/Styles/Images/toolBarHoverButtonBackground.gif b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarHoverButtonBackground.gif similarity index 100% rename from src/Orchard.Web/Core/Themes/Styles/Images/toolBarHoverButtonBackground.gif rename to src/Orchard.Web/Modules/Orchard.Themes/Styles/Images/toolBarHoverButtonBackground.gif diff --git a/src/Orchard.Web/Core/Themes/Styles/special.css b/src/Orchard.Web/Modules/Orchard.Themes/Styles/special.css similarity index 100% rename from src/Orchard.Web/Core/Themes/Styles/special.css rename to src/Orchard.Web/Modules/Orchard.Themes/Styles/special.css diff --git a/src/Orchard.Web/Core/Themes/ViewModels/PreviewViewModel.cs b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/PreviewViewModel.cs similarity index 75% rename from src/Orchard.Web/Core/Themes/ViewModels/PreviewViewModel.cs rename to src/Orchard.Web/Modules/Orchard.Themes/ViewModels/PreviewViewModel.cs index 952eca8c7..10aa15ac8 100644 --- a/src/Orchard.Web/Core/Themes/ViewModels/PreviewViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/PreviewViewModel.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Web.Mvc; -namespace Orchard.Core.Themes.ViewModels { +namespace Orchard.Themes.ViewModels { public class PreviewViewModel { public IEnumerable Themes { get; set; } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/ViewModels/ThemesIndexViewModel.cs b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs similarity index 75% rename from src/Orchard.Web/Core/Themes/ViewModels/ThemesIndexViewModel.cs rename to src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs index c457f0bcf..16223216d 100644 --- a/src/Orchard.Web/Core/Themes/ViewModels/ThemesIndexViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using Orchard.Mvc.ViewModels; -using Orchard.Themes; -namespace Orchard.Core.Themes.ViewModels { +namespace Orchard.Themes.ViewModels { public class ThemesIndexViewModel : BaseViewModel { public ITheme CurrentTheme { get; set; } public IEnumerable Themes { get; set; } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Views/Admin/Index.aspx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx similarity index 95% rename from src/Orchard.Web/Core/Themes/Views/Admin/Index.aspx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx index 01ed7a937..163668ec2 100644 --- a/src/Orchard.Web/Core/Themes/Views/Admin/Index.aspx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.aspx @@ -1,6 +1,6 @@ <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> -<%@ Import Namespace="Orchard.Themes"%> -<%@ Import Namespace="Orchard.Core.Themes.ViewModels"%> +<%@ Import Namespace="Orchard.Mvc.Html"%> +<%@ Import Namespace="Orchard.Themes.ViewModels"%>

<%=Html.TitleForPage(T("Manage Themes").ToString()) %>

<% if (Model.CurrentTheme == null) { %>

<%=_Encoded("There is no current theme in the application. The built-in theme will be used.") diff --git a/src/Orchard.Web/Core/Themes/Views/Admin/Install.aspx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.aspx similarity index 92% rename from src/Orchard.Web/Core/Themes/Views/Admin/Install.aspx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.aspx index 6c9c5130b..8803c7c20 100644 --- a/src/Orchard.Web/Core/Themes/Views/Admin/Install.aspx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.aspx @@ -1,4 +1,5 @@ <%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage" %> +<%@ Import Namespace="Orchard.Mvc.Html"%>

<%=Html.TitleForPage(T("Install Theme").ToString()) %>

<% using (Html.BeginForm("Install", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) {%> <%=Html.ValidationSummary() %> diff --git a/src/Orchard.Web/Core/Themes/Views/Admin/ThemePreview.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx similarity index 91% rename from src/Orchard.Web/Core/Themes/Views/Admin/ThemePreview.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx index 313f4a02e..3c99b76eb 100644 --- a/src/Orchard.Web/Core/Themes/Views/Admin/ThemePreview.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/ThemePreview.ascx @@ -1,5 +1,6 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> -<%@ Import Namespace="Orchard.Core.Themes.ViewModels"%> +<%@ Import Namespace="Orchard.Mvc.Html"%> +<%@ Import Namespace="Orchard.Themes.ViewModels"%>
-<% using(Html.BeginFormAntiForgeryPost(Url.Action("Preview", new{Controller="Admin", Area="Themes"}), FormMethod.Post, new { @class = "inline" })) { %> +<% using(Html.BeginFormAntiForgeryPost(Url.Action("Preview", new{Controller="Admin", Area="Orchard.Themes"}), FormMethod.Post, new { @class = "inline" })) { %>
<%=T("You are previewing: ")%> <%=Html.DropDownList("ThemeName", Model.Themes, new {onChange = "this.form.submit();"})%> diff --git a/src/Orchard.Web/Core/Themes/Views/DisplayTemplates/Items/ContentItem.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/DisplayTemplates/Items/ContentItem.ascx similarity index 80% rename from src/Orchard.Web/Core/Themes/Views/DisplayTemplates/Items/ContentItem.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/DisplayTemplates/Items/ContentItem.ascx index 0189daac3..51c472a16 100644 --- a/src/Orchard.Web/Core/Themes/Views/DisplayTemplates/Items/ContentItem.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/DisplayTemplates/Items/ContentItem.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <% Html.Zone("primary"); Html.ZonesAny(); %> \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Views/Document.aspx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Document.aspx similarity index 100% rename from src/Orchard.Web/Core/Themes/Views/Document.aspx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Document.aspx diff --git a/src/Orchard.Web/Core/Themes/Views/EditorTemplates/Items/ContentItem.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/EditorTemplates/Items/ContentItem.ascx similarity index 80% rename from src/Orchard.Web/Core/Themes/Views/EditorTemplates/Items/ContentItem.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/EditorTemplates/Items/ContentItem.ascx index 0189daac3..51c472a16 100644 --- a/src/Orchard.Web/Core/Themes/Views/EditorTemplates/Items/ContentItem.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/EditorTemplates/Items/ContentItem.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%> <% Html.Zone("primary"); Html.ZonesAny(); %> \ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Views/HeadPreload.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/HeadPreload.ascx similarity index 88% rename from src/Orchard.Web/Core/Themes/Views/HeadPreload.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/HeadPreload.ascx index 75eb71bb8..2a9460ffc 100644 --- a/src/Orchard.Web/Core/Themes/Views/HeadPreload.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/HeadPreload.ascx @@ -1,4 +1,5 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %><% +<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%><% // a CSS file for styling things (e.g. content item edit buttons) for users with elevated privileges (in this case, anyone who is authenticated) if (Request.IsAuthenticated) { Html.RegisterStyle("special.css"); } diff --git a/src/Orchard.Web/Core/Themes/Views/Header.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Header.ascx similarity index 74% rename from src/Orchard.Web/Core/Themes/Views/Header.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Header.ascx index b1029d7dd..d8fc19423 100644 --- a/src/Orchard.Web/Core/Themes/Views/Header.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Header.ascx @@ -1,2 +1,3 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%>
<%=Html.Encode(Html.SiteName()) %>
\ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Views/Layout.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Layout.ascx similarity index 92% rename from src/Orchard.Web/Core/Themes/Views/Layout.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Layout.ascx index 31b71eb1a..fa2b32133 100644 --- a/src/Orchard.Web/Core/Themes/Views/Layout.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Layout.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%><% Html.RegisterStyle("site.css"); Model.Zones.AddRenderPartial("header", "Header", Model); diff --git a/src/Orchard.Web/Core/Themes/Views/Menu.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx similarity index 94% rename from src/Orchard.Web/Core/Themes/Views/Menu.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx index 5a27f6867..be6f99061 100644 --- a/src/Orchard.Web/Core/Themes/Views/Menu.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Menu.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%><% var menu = Model.Menu.FirstOrDefault(); if (menu != null && menu.Items.Count() > 0) { %> diff --git a/src/Orchard.Web/Core/Themes/Views/Messages.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/Messages.ascx similarity index 100% rename from src/Orchard.Web/Core/Themes/Views/Messages.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Messages.ascx diff --git a/src/Orchard.Web/Core/Themes/Views/NotFound.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/NotFound.ascx similarity index 84% rename from src/Orchard.Web/Core/Themes/Views/NotFound.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/NotFound.ascx index 05667a107..f27697e7a 100644 --- a/src/Orchard.Web/Core/Themes/Views/NotFound.ascx +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/NotFound.ascx @@ -1,4 +1,5 @@ <%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %> +<%@ Import Namespace="Orchard.Mvc.Html"%> <%@ Import Namespace="Orchard.Mvc.ViewModels"%>

<%=Html.TitleForPage(T("Not found").ToString()) %>

<%=_Encoded("The page you are looking for does not exist.")%>

\ No newline at end of file diff --git a/src/Orchard.Web/Core/Themes/Views/User.ascx b/src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx similarity index 100% rename from src/Orchard.Web/Core/Themes/Views/User.ascx rename to src/Orchard.Web/Modules/Orchard.Themes/Views/User.ascx diff --git a/src/Orchard.Web/Core/Themes/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config similarity index 100% rename from src/Orchard.Web/Core/Themes/Views/Web.config rename to src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Web.config new file mode 100644 index 000000000..84fdb9c18 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Themes/Web.config @@ -0,0 +1,140 @@ + + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 200551b08..8663f3128 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -146,6 +146,10 @@ {5D0F00F0-26C9-4785-AD61-B85710C60EB0} Orchard.Tags + + {CDE24A24-01D3-403C-84B9-37722E18DFB7} + Orchard.Themes + {79AED36E-ABD0-4747-93D3-8722B042454B} Orchard.Users diff --git a/src/Orchard.Web/Themes/SafeMode/Views/Layout.ascx b/src/Orchard.Web/Themes/SafeMode/Views/Layout.ascx index a7f3ea4e2..0cabeb730 100644 --- a/src/Orchard.Web/Themes/SafeMode/Views/Layout.ascx +++ b/src/Orchard.Web/Themes/SafeMode/Views/Layout.ascx @@ -5,10 +5,10 @@ <%@ Import Namespace="Orchard.Mvc.ViewModels" %> <%@ Import Namespace="Orchard.Mvc.Html" %> <% //todo: (heskew) this should really be using the IResourceManager if it's to be a theme especially for the jquery dep (w/out needing to copy into this theme...) - var jquery = ResolveUrl("~/Core/Themes/Scripts/jquery-1.4.1.js"); + var jquery = ResolveUrl("~/Modules/Orchard.Themes/Scripts/jquery-1.4.1.js"); Model.Zones.AddAction("head:scripts", html => html.ViewContext.Writer.Write(@"")); - var basejs = ResolveUrl("~/Core/Themes/Scripts/base.js"); + var basejs = ResolveUrl("~/Modules/Orchard.Themes/Scripts/base.js"); Model.Zones.AddAction("content:after", html => html.ViewContext.Writer.Write(@"")); var setupjs = ResolveUrl("~/Modules/Orchard.Setup/Scripts/setup.js"); diff --git a/src/Orchard.sln b/src/Orchard.sln index c1102dab2..a04f6d91d 100644 --- a/src/Orchard.sln +++ b/src/Orchard.sln @@ -57,6 +57,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard", "Tools\Orchard\Or EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.MultiTenancy", "Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj", "{72457126-E118-4171-A08F-9A709EE4B7FC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Themes", "Orchard.Web\Modules\Orchard.Themes\Orchard.Themes.csproj", "{CDE24A24-01D3-403C-84B9-37722E18DFB7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -159,6 +161,10 @@ Global {72457126-E118-4171-A08F-9A709EE4B7FC}.Debug|Any CPU.Build.0 = Debug|Any CPU {72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.ActiveCfg = Release|Any CPU {72457126-E118-4171-A08F-9A709EE4B7FC}.Release|Any CPU.Build.0 = Release|Any CPU + {CDE24A24-01D3-403C-84B9-37722E18DFB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDE24A24-01D3-403C-84B9-37722E18DFB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDE24A24-01D3-403C-84B9-37722E18DFB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDE24A24-01D3-403C-84B9-37722E18DFB7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -181,6 +187,7 @@ Global {4A9C04A6-0986-4A92-A610-5F59FF273FB9} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {72457126-E118-4171-A08F-9A709EE4B7FC} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} + {CDE24A24-01D3-403C-84B9-37722E18DFB7} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5} {5E5E7A21-C7B2-44D8-8593-2F9541AE041D} = {383DBA32-4A3E-48D1-AAC3-75377A694452} {4AB4B5B6-277E-4FF6-B69B-7AE9E16D2A56} = {383DBA32-4A3E-48D1-AAC3-75377A694452} {33B1BC8D-E292-4972-A363-22056B207156} = {383DBA32-4A3E-48D1-AAC3-75377A694452}