diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj index ff4b07e10..1fc26a0e5 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj +++ b/src/Orchard.Azure/Orchard.Azure.Web/Orchard.Azure.Web.csproj @@ -256,6 +256,10 @@ {D10AD48F-407D-4DB5-A328-173EC7CB010F} Orchard.Roles + + {2AD6973D-C7BB-416E-89FE-EEE34664E05F} + Orchard.Scripting.Dlr + {2AD6973D-C7BB-416E-89FE-EEE34664E05F} Orchard.Scripting diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config index 3a38cc0c5..a8eacfd77 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.Debug.config @@ -1,9 +1,5 @@  - \ No newline at end of file diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config index 3a38cc0c5..a8eacfd77 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.Release.config @@ -1,9 +1,5 @@  - \ No newline at end of file diff --git a/src/Orchard.Azure/Orchard.Azure.Web/Web.config b/src/Orchard.Azure/Orchard.Azure.Web/Web.config index 5e78c822b..f84174283 100644 --- a/src/Orchard.Azure/Orchard.Azure.Web/Web.config +++ b/src/Orchard.Azure/Orchard.Azure.Web/Web.config @@ -40,7 +40,6 @@ - + - + + + + diff --git a/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml b/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml index e321e9841..d9cc0c7d2 100644 --- a/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml +++ b/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml @@ -6,9 +6,9 @@ @Html.SelectOption(Model.Record.OrderByProperty, "CommonPart.PublishedUtc", T("Date Published").Text) @Html.SelectOption(Model.Record.OrderByProperty, "RoutePart.Title", T("Title").Text) @Html.SelectOption(Model.Record.OrderByProperty, "RoutePart.Slug", T("Slug").Text) - @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomOne", T("Custom 1").Text) - @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomTwo", T("Custom 2").Text) - @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomThree", T("Custom 3").Text) + @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomOne", T("Custom 1").Text) + @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomTwo", T("Custom 2").Text) + @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomThree", T("Custom 3").Text) + + + } +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config index 271dd8ba1..5c76d8df5 100644 --- a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config @@ -1,6 +1,9 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Module.txt b/src/Orchard.Web/Modules/Orchard.Pages/Module.txt index 898c6ed37..7fce3f4f1 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Pages/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: Introduces a preconfigured page content type. Features: Orchard.Pages: + Name: Pages Description: A basic page content type. Dependencies: Contents - Category: Content + Category: Content \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config index b4210f3e0..0dc62ece6 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config @@ -1,5 +1,8 @@  - + + + + diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt b/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt index 196cc9e03..2b895ba82 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The PublishLater module introduces draft creation and scheduled publishing functionality. Features: Orchard.PublishLater: + Name: Publish Later Description: Draft creation and scheduled publishing. Category: Content - Dependencies: Common, Scheduling, Orchard.jQuery + Dependencies: Common, Scheduling, Orchard.jQuery \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config index 37513c05c..c56b45fa7 100644 --- a/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config @@ -1,5 +1,8 @@ - + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Module.txt b/src/Orchard.Web/Modules/Orchard.Roles/Module.txt index 12804ad4d..8851e683d 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Roles/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The roles module is adding the ability to assign roles to users. It's also providing a set of default roles for which other modules can define default permissions. Features: Orchard.Roles: + Name: Roles Description: Standard user roles. Category: Core - Dependencies: Orchard.Users + Dependencies: Orchard.Users \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config index 37513c05c..b7d215131 100644 --- a/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config @@ -1,5 +1,8 @@ + + + diff --git a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt index de048976b..24ee641e2 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Scripting.Dlr/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The DLR scripting module enables the possibility to execute scripts using the DLR. Features: Orchard.Scripting.Dlr: + Name: DLR Scripting Description: DLR scripting support. Dependencies: Orchard.Scripting Category: Scripting \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt b/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt index 14bf4da83..84def02af 100644 --- a/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Scripting/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The scripting module enables the possibility to execute scripts using a simple custom scripting language. Features: Orchard.Scripting: + Name: Scripting Description: Scripting support. Category: Scripting Orchard.Scripting.Lightweight: diff --git a/src/Orchard.Web/Modules/Orchard.Search/Module.txt b/src/Orchard.Web/Modules/Orchard.Search/Module.txt index 2cddecc5e..0267f9028 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Search/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The search module enables the management of the search index and provides the front-end searching user interface. Features: Orchard.Search: + Name: Search Description: Standard interface to Orchard's built-in search. Category: Search - Dependencies: Orchard.Indexing + Dependencies: Orchard.Indexing \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config index 37513c05c..b7d215131 100644 --- a/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config @@ -1,5 +1,8 @@ + + + diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Setup/Content/Web.config new file mode 100644 index 000000000..df1c33504 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Setup/Content/Web.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif b/src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif new file mode 100644 index 000000000..9fb3552b7 Binary files /dev/null and b/src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif differ diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs index bf9272d7b..402134a4d 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs @@ -1,5 +1,6 @@ using System; using System.Web.Mvc; +using Orchard.Environment; using Orchard.FileSystems.AppData; using Orchard.Setup.Services; using Orchard.Setup.ViewModels; @@ -11,11 +12,13 @@ namespace Orchard.Setup.Controllers { [ValidateInput(false), Themed] public class SetupController : Controller { private readonly IAppDataFolder _appDataFolder; + private readonly IViewsBackgroundCompilation _viewsBackgroundCompilation; private readonly INotifier _notifier; private readonly ISetupService _setupService; - public SetupController(INotifier notifier, ISetupService setupService, IAppDataFolder appDataFolder) { + public SetupController(INotifier notifier, ISetupService setupService, IAppDataFolder appDataFolder, IViewsBackgroundCompilation viewsBackgroundCompilation) { _appDataFolder = appDataFolder; + _viewsBackgroundCompilation = viewsBackgroundCompilation; _notifier = notifier; _setupService = setupService; T = NullLocalizer.Instance; @@ -37,6 +40,17 @@ namespace Orchard.Setup.Controllers { public ActionResult Index() { var initialSettings = _setupService.Prime(); + + // On the first time installation of Orchard, the user gets to the setup screen, which + // will take a while to finish (user inputting data and the setup process itself). + // We use this opportunity to start a background task to "pre-compile" all the known + // views in the app folder, so that the application is more reponsive when the user + // hits the homepage and admin screens for the first time. + if (StringComparer.OrdinalIgnoreCase.Equals(initialSettings.Name, "Default")) { + _viewsBackgroundCompilation.Start(); + } + + // return IndexViewResult(new SetupViewModel { AdminUsername = "admin", DatabaseIsPreconfigured = !string.IsNullOrEmpty(initialSettings.DataProvider)}); } @@ -75,6 +89,11 @@ namespace Orchard.Setup.Controllers { _setupService.Setup(setupContext); + // First time installation if finally done. Tell the background views compilation + // process to stop, so that it doesn't interfere with the user (asp.net compilation + // uses a "single lock" mechanism for compiling views). + _viewsBackgroundCompilation.Stop(); + // redirect to the welcome page. return Redirect("~/"); } diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Module.txt b/src/Orchard.Web/Modules/Orchard.Setup/Module.txt index 8a29a5d90..bf0fe4403 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Setup/Module.txt @@ -7,5 +7,6 @@ OrchardVersion: 0.8.0 Description: The setup module is creating the application's setup experience. Features: Orchard.Setup: + Name: Setup Description: Standard site setup. This feature is disabled automatically once setup is over. - Category: Core + Category: Core \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj index 3c67c661a..9a3f09c68 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj @@ -74,9 +74,9 @@ - - Designer - + + + @@ -100,6 +100,16 @@ + + + Designer + + + + + Designer + + + + + + + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Scripts/setup.js b/src/Orchard.Web/Modules/Orchard.Setup/Scripts/setup.js index a9c59453d..07ab184c0 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Scripts/setup.js +++ b/src/Orchard.Web/Modules/Orchard.Setup/Scripts/setup.js @@ -1 +1,14 @@ -$("#SiteName").closest("form").helpfullyFocus(); \ No newline at end of file +(function () { + function show() { + window.setTimeout(function () { + document.getElementById("throbber").style.display = "block"; + }, 2000); + } + + if (document.addEventListener) { + document.addEventListener("submit", show, false); + } + else { + document.forms[0].attachEvent("onsubmit", show); + } +})(); diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs index 7c6e55376..4c68417fc 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs @@ -281,12 +281,30 @@ namespace Orchard.Setup.Services { // create a welcome page that's promoted to the home page var page = contentManager.Create("Page", VersionOptions.Draft); page.As().Title = T("Welcome to Orchard!").Text; - page.As().Path = ""; - page.As().Slug = ""; - page.As().Text = string.Format(CultureInfo.CurrentCulture, "

You’ve successfully setup your Orchard Site and this is the homepage of your new site. Here are a few things you can look at to get familiar with the application. Once you feel confident you don’t need this anymore, you can remove this by going into editing mode and replacing it with whatever you want.

First things first - You’ll probably want to manage your settings and configure Orchard to your liking. After that, you can head over to manage themes to change or install new themes and really make it your own. Once you’re happy with a look and feel, it’s time for some content. You can start creating new custom content types or start with some built-in ones by adding a page, creating a blog or managing your menus.

Finally, Orchard has been designed to be extended. It comes with a few built-in modules such as pages and blogs or themes. If you’re looking to add additional functionality, you can do so by creating your own module or installing a new one that someone has made. Modules are created by other users of Orchard just like you so if you feel up to it, please consider participating. XOXO – The Orchard Team

", page.Id); + page.As().Path = "welcome-to-orchard"; + page.As().Slug = "welcome-to-orchard"; + page.As().PromoteToHomePage = true; + page.As().Text = T( +@"

You've successfully setup your Orchard Site and this is the homepage of your new site. +Here are a few things you can look at to get familiar with the application. +Once you feel confident you don't need this anymore, you can +remove it by going into editing mode +and replacing it with whatever you want.

+

First things first - You'll probably want to manage your settings +and configure Orchard to your liking. After that, you can head over to +manage themes to change or install new themes +and really make it your own. Once you're happy with a look and feel, it's time for some content. +You can start creating new custom content types or start from the built-in ones by +adding a page, creating a blog +or managing your menus.

+

Finally, Orchard has been designed to be extended. It comes with a few built-in +modules such as pages and blogs or themes. If you're looking to add additional functionality, +you can do so by creating your own module or by installing one that somebody else built. +Modules are created by other users of Orchard just like you so if you feel up to it, +please consider participating.

+

Thanks for using Orchard – The Orchard Team

", page.Id).Text; contentManager.Publish(page); - siteSettings.Record.HomePage = "RoutableHomePageProvider;" + page.Id; // add a menu item for the shiny new home page var menuItem = contentManager.Create("MenuItem"); diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.cshtml index 3fd26831f..970ab927b 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Setup/Views/Setup/Index.cshtml @@ -1,5 +1,7 @@ @model Orchard.Setup.ViewModels.SetupViewModel - +@{ + Script.Include("setup.js").AtFoot(); +}

@Html.TitleForPage(T("Get Started").ToString())

@using (Html.BeginFormAntiForgeryPost()) { @@ -48,6 +50,18 @@ if (!Model.DatabaseIsPreconfigured) { } +
+
+
+
+

@T("Configuring Orchard...")

+

+ +

+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config index dd900f1a0..61a4dd271 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Module.txt b/src/Orchard.Web/Modules/Orchard.Tags/Module.txt index a11470166..a4e91e90d 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Tags/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The tags module is providing basic tagging for arbitrary content types. Features: Orchard.Tags: + Name: Tags Description: Tag a content item. Dependencies: Settings - Category: Navigation + Category: Navigation \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config index 37513c05c..b7d215131 100644 --- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config @@ -1,5 +1,8 @@ + + + diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index caf2387d1..8cfa24d2f 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -1,16 +1,14 @@ using System; using System.Linq; using System.Reflection; -using System.Web; using System.Web.Mvc; using Orchard.Data.Migration; -using Orchard.DisplayManagement; using Orchard.Environment.Descriptor.Models; using Orchard.Environment.Extensions; +using Orchard.Environment.Extensions.Models; using Orchard.Environment.Features; using Orchard.Localization; using Orchard.Reports.Services; -using Orchard.Security; using Orchard.Themes.Preview; using Orchard.Themes.Services; using Orchard.Themes.ViewModels; @@ -19,35 +17,36 @@ using Orchard.UI.Notify; namespace Orchard.Themes.Controllers { [ValidateInput(false)] public class AdminController : Controller { + private readonly IDataMigrationManager _dataMigrationManager; + private readonly IFeatureManager _featureManager; private readonly ISiteThemeService _siteThemeService; - private readonly IPreviewTheme _previewTheme; private readonly IExtensionManager _extensionManager; private readonly ShellDescriptor _shellDescriptor; + private readonly IPreviewTheme _previewTheme; private readonly IThemeService _themeService; - private readonly IDataMigrationManager _dataMigrationManager; private readonly IReportsCoordinator _reportsCoordinator; public AdminController( - IDataMigrationManager dataMigraitonManager, - IReportsCoordinator reportsCoordinator, IOrchardServices services, - IThemeManager themeManager, + IDataMigrationManager dataMigraitonManager, IFeatureManager featureManager, ISiteThemeService siteThemeService, - IPreviewTheme previewTheme, - IAuthorizer authorizer, - INotifier notifier, IExtensionManager extensionManager, ShellDescriptor shellDescriptor, - IThemeService themeService) { + IPreviewTheme previewTheme, + IThemeService themeService, + IReportsCoordinator reportsCoordinator) { Services = services; + _dataMigrationManager = dataMigraitonManager; - _reportsCoordinator = reportsCoordinator; _siteThemeService = siteThemeService; - _previewTheme = previewTheme; _extensionManager = extensionManager; _shellDescriptor = shellDescriptor; + _featureManager = featureManager; + _previewTheme = previewTheme; _themeService = themeService; + _reportsCoordinator = reportsCoordinator; + T = NullLocalizer.Instance; } @@ -60,7 +59,7 @@ namespace Orchard.Themes.Controllers { var featuresThatNeedUpdate = _dataMigrationManager.GetFeaturesThatNeedUpdate(); var themes = _extensionManager.AvailableExtensions() - .Where(d => d.ExtensionType == "Theme") + .Where(d => DefaultExtensionTypes.IsTheme(d.ExtensionType)) .Select(d => new ThemeEntry { Descriptor = d, NeedsUpdate = featuresThatNeedUpdate.Contains(d.Id), @@ -68,8 +67,9 @@ namespace Orchard.Themes.Controllers { }) .ToArray(); - var model = new ThemesIndexViewModel { CurrentTheme = currentTheme, Themes = themes }; - return View(model); + return View(new ThemesIndexViewModel { + CurrentTheme = currentTheme, Themes = themes, + InstallThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "Gallery") != null }); } catch (Exception exception) { Services.Notifier.Error(T("Listing themes failed: " + exception.Message)); diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Module.txt b/src/Orchard.Web/Modules/Orchard.Themes/Module.txt index 01f0a26b7..c97779f8b 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Themes/Module.txt @@ -7,5 +7,6 @@ OrchardVersion: 0.8.0 Description: The themes module makes it possible for Orchard applications to customize the look and feel of an Orchard web site. Features: Orchard.Themes: + Name: Themes Description: Basic theming capability. - Category: Core + Category: Core \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj index 7e66d29d1..a504b7e20 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj +++ b/src/Orchard.Web/Modules/Orchard.Themes/Orchard.Themes.csproj @@ -71,7 +71,6 @@ - diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs index aedf0be0b..401c08402 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Preview/PreviewThemeFilter.cs @@ -1,25 +1,22 @@ using System.Linq; using System.Web.Mvc; using Orchard.DisplayManagement; +using Orchard.Environment.Extensions.Models; using Orchard.Environment.Features; using Orchard.Mvc.Filters; -using Orchard.Themes.ViewModels; namespace Orchard.Themes.Preview { public class PreviewThemeFilter : FilterProvider, IResultFilter { - private readonly IThemeManager _themeManager; private readonly IPreviewTheme _previewTheme; private readonly IWorkContextAccessor _workContextAccessor; private readonly dynamic _shapeFactory; private readonly IFeatureManager _featureManager; public PreviewThemeFilter( - IThemeManager themeManager, IPreviewTheme previewTheme, IWorkContextAccessor workContextAccessor, IShapeFactory shapeFactory, IFeatureManager featureManager) { - _themeManager = themeManager; _previewTheme = previewTheme; _workContextAccessor = workContextAccessor; _shapeFactory = shapeFactory; @@ -33,7 +30,7 @@ namespace Orchard.Themes.Preview { var installedThemes = _featureManager.GetEnabledFeatures() .Select(x => x.Extension) - .Where(x => x.ExtensionType == "Theme") + .Where(x => DefaultExtensionTypes.IsTheme(x.ExtensionType)) .Distinct(); var themeListItems = installedThemes diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs index ee75ddbdd..abaec56c5 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Services/ThemeService.cs @@ -110,7 +110,7 @@ namespace Orchard.Themes.Services { var themes = new List(); foreach (var descriptor in extensions) { - if (!string.Equals(descriptor.ExtensionType, "Theme", StringComparison.OrdinalIgnoreCase)) { + if (!DefaultExtensionTypes.IsTheme(descriptor.ExtensionType)) { continue; } diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs index f28ca1309..6d26c07d0 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/ViewModels/ThemesIndexViewModel.cs @@ -3,6 +3,7 @@ using Orchard.Environment.Extensions.Models; namespace Orchard.Themes.ViewModels { public class ThemesIndexViewModel { + public bool InstallThemes { get; set; } public ExtensionDescriptor CurrentTheme { get; set; } public IEnumerable Themes { get; set; } } diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.cshtml index d7588f591..e84d5c3e9 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Index.cshtml @@ -18,7 +18,9 @@ @Model.CurrentTheme.WebSite

- @Html.ActionLink(T("Install a new Theme").ToString(), "Install", null, new { @class = "button primaryAction" }) + if (Model.InstallThemes) { + @Html.ActionLink(T("Install a new Theme").ToString(), "AddTheme", "Gallery", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl }, new { @class = "button primaryAction" }) + } }

@T("Available Themes")

@@ -53,11 +55,13 @@
} } - @using (Html.BeginFormAntiForgeryPost(Url.Action("Uninstall"), FormMethod.Post, new { @class = "inline link" })) { - @Html.Hidden("themeName", theme.Id) - + + @if (Model.InstallThemes) { + using (Html.BeginFormAntiForgeryPost(Url.Action("RemoveTheme", "Gallery", new { area = "Orchard.Packaging", returnUrl = HttpContext.Current.Request.RawUrl, retryUrl = HttpContext.Current.Request.RawUrl, themeId = theme.Id }), FormMethod.Post, new { @class = "inline link" })) { + + } } - + } } diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.cshtml b/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.cshtml deleted file mode 100644 index d83b0a2ce..000000000 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Admin/Install.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -

@Html.TitleForPage(T("Install Theme").ToString())

-@using (Html.BeginForm("Install", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" })) { - @Html.ValidationSummary() -
- -
- - @Html.AntiForgeryTokenOrchard() -
-} diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config index dd900f1a0..61a4dd271 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs index 3251b9105..5491cf92f 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Controllers/AccountController.cs @@ -57,19 +57,19 @@ namespace Orchard.Users.Controllers { if (_authenticationService.GetAuthenticatedUser() != null) return Redirect("~/"); - return View(new LogOnViewModel {Title = "Log On"}); + return View(new LogOnViewModel { Title = T("Log On").Text }); } [HttpPost] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", Justification = "Needs to take same parameter type as Controller.Redirect()")] - public ActionResult LogOn(string userNameOrEmail, string password, bool rememberMe, string returnUrl) { + public ActionResult LogOn(string userNameOrEmail, string password, string returnUrl) { var user = ValidateLogOn(userNameOrEmail, password); if (!ModelState.IsValid) { - return View(new LogOnViewModel {Title = "Log On"}); + return View(new LogOnViewModel { Title = T("Log On").Text }); } - _authenticationService.SignIn(user, rememberMe); + _authenticationService.SignIn(user, false); if (string.IsNullOrEmpty(returnUrl)) return new RedirectResult("~/"); @@ -141,12 +141,23 @@ namespace Orchard.Users.Controllers { return Register(); } - public ActionResult LostPassword() { + public ActionResult RequestLostPassword() { + // ensure users can request lost password + var registrationSettings = _orchardServices.WorkContext.CurrentSite.As(); + if ( !registrationSettings.EnableLostPassword ) { + return HttpNotFound(); + } + return View(); } [HttpPost] - public ActionResult LostPassword(string username) { + public ActionResult RequestLostPassword(string username) { + // ensure users can request lost password + var registrationSettings = _orchardServices.WorkContext.CurrentSite.As(); + if ( !registrationSettings.EnableLostPassword ) { + return HttpNotFound(); + } if(String.IsNullOrWhiteSpace(username)){ _orchardServices.Notifier.Error(T("Invalid username or E-mail")); @@ -160,17 +171,6 @@ namespace Orchard.Users.Controllers { return RedirectToAction("LogOn"); } - public ActionResult ValidateLostPassword(string nonce) { - IUser user; - if (null != (user = _userService.ValidateLostPassword(nonce))) { - _authenticationService.SignIn(user, false); - return RedirectToAction("ChangePassword"); - } - else { - return new RedirectResult("~/"); - } - } - [Authorize] public ActionResult ChangePassword() { ViewData["PasswordLength"] = MinPasswordLength; @@ -180,9 +180,53 @@ namespace Orchard.Users.Controllers { [Authorize] [HttpPost] + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", + Justification = "Exceptions result in password not being changed.")] public ActionResult ChangePassword(string currentPassword, string newPassword, string confirmPassword) { ViewData["PasswordLength"] = MinPasswordLength; + if ( !ValidateChangePassword(currentPassword, newPassword, confirmPassword) ) { + return View(); + } + + try { + var validated = _membershipService.ValidateUser(User.Identity.Name, currentPassword); + + if ( validated != null ) { + _membershipService.SetPassword(validated, newPassword); + return RedirectToAction("ChangePasswordSuccess"); + } + else { + ModelState.AddModelError("_FORM", + T("The current password is incorrect or the new password is invalid.")); + return ChangePassword(); + } + } + catch { + ModelState.AddModelError("_FORM", T("The current password is incorrect or the new password is invalid.")); + return ChangePassword(); + } + } + + public ActionResult LostPassword(string nonce) { + if ( _userService.ValidateLostPassword(nonce) == null ) { + return RedirectToAction("LogOn"); + } + + ViewData["PasswordLength"] = MinPasswordLength; + + return View(); + } + + [HttpPost] + public ActionResult LostPassword(string nonce, string newPassword, string confirmPassword) { + IUser user; + if ( (user = _userService.ValidateLostPassword(nonce)) == null ) { + return Redirect("~/"); + } + + ViewData["PasswordLength"] = MinPasswordLength; + if (newPassword == null || newPassword.Length < MinPasswordLength) { ModelState.AddModelError("newPassword", T("You must specify a new password of {0} or more characters.", MinPasswordLength)); } @@ -195,15 +239,15 @@ namespace Orchard.Users.Controllers { return View(); } - _membershipService.SetPassword(_orchardServices.WorkContext.CurrentUser, newPassword); + _membershipService.SetPassword(user, newPassword); return RedirectToAction("ChangePasswordSuccess"); } - public ActionResult RegistrationPending() { + public ActionResult ChangePasswordSuccess() { return View(); } - public ActionResult ChangePasswordSuccess() { + public ActionResult RegistrationPending() { return View(); } @@ -219,8 +263,8 @@ namespace Orchard.Users.Controllers { return View(); } - public ActionResult ChallengeEmail(string token) { - var user = _userService.ValidateChallenge(token); + public ActionResult ChallengeEmail(string nonce) { + var user = _userService.ValidateChallenge(nonce); if ( user != null ) { _authenticationService.SignIn(user, false /* createPersistentCookie */); @@ -237,6 +281,21 @@ namespace Orchard.Users.Controllers { } #region Validation Methods + private bool ValidateChangePassword(string currentPassword, string newPassword, string confirmPassword) { + if ( String.IsNullOrEmpty(currentPassword) ) { + ModelState.AddModelError("currentPassword", T("You must specify a current password.")); + } + if ( newPassword == null || newPassword.Length < MinPasswordLength ) { + ModelState.AddModelError("newPassword", T("You must specify a new password of {0} or more characters.", MinPasswordLength)); + } + + if ( !String.Equals(newPassword, confirmPassword, StringComparison.Ordinal) ) { + ModelState.AddModelError("_FORM", T("The new password and confirmation password do not match.")); + } + + return ModelState.IsValid; + } + private IUser ValidateLogOn(string userNameOrEmail, string password) { bool validate = true; diff --git a/src/Orchard.Web/Modules/Orchard.Users/Handlers/ModerationMessageAlteration.cs b/src/Orchard.Web/Modules/Orchard.Users/Handlers/ModerationMessageAlteration.cs deleted file mode 100644 index 932e4eacf..000000000 --- a/src/Orchard.Web/Modules/Orchard.Users/Handlers/ModerationMessageAlteration.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Orchard.Localization; -using Orchard.Messaging.Events; -using Orchard.Messaging.Models; -using Orchard.ContentManagement; -using Orchard.Users.Models; - -namespace Orchard.Users.Handlers { - public class ModerationMessageAlteration : IMessageEventHandler { - private readonly IContentManager _contentManager; - - public ModerationMessageAlteration(IContentManager contentManager) { - _contentManager = contentManager; - T = NullLocalizer.Instance; - } - - public Localizer T { get; set; } - - public void Sending(MessageContext context) { - var contentItem = _contentManager.Get(context.Recipient.Id); - if ( contentItem == null ) - return; - - var recipient = contentItem.As(); - if ( recipient == null ) - return; - - if ( context.Type == MessageTypes.Moderation ) { - context.MailMessage.Subject = T("User needs moderation").Text; - context.MailMessage.Body = T("The following user account needs to be moderated: {0}", recipient.UserName).Text; - } - - if (context.Type == MessageTypes.Validation) { - context.MailMessage.Subject = T("User account validation").Text; - context.MailMessage.Body = T("Dear {0}, please click here to validate you email address.", recipient.UserName, context.Properties["ChallengeUrl"]).Text; - } - - if (context.Type == MessageTypes.LostPassword) { - context.MailMessage.Subject = T("Lost password").Text; - context.MailMessage.Body = T("Dear {0}, please click here to change your password.", recipient.UserName, context.Properties["LostPasswordUrl"]).Text; - } - - } - - public void Sent(MessageContext context) { - } - } -} diff --git a/src/Orchard.Web/Modules/Orchard.Users/Handlers/UserMessagesAlteration.cs b/src/Orchard.Web/Modules/Orchard.Users/Handlers/UserMessagesAlteration.cs new file mode 100644 index 000000000..5cde4ed1c --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Handlers/UserMessagesAlteration.cs @@ -0,0 +1,64 @@ +using System; +using Orchard.Localization; +using Orchard.Messaging.Events; +using Orchard.Messaging.Models; +using Orchard.ContentManagement; +using Orchard.Settings; +using Orchard.Users.Models; + +namespace Orchard.Users.Handlers { + public class UserMessagesAlteration : IMessageEventHandler { + private readonly IContentManager _contentManager; + private readonly ISiteService _siteService; + + public UserMessagesAlteration(IContentManager contentManager, ISiteService siteService) { + _contentManager = contentManager; + _siteService = siteService; + T = NullLocalizer.Instance; + } + + public Localizer T { get; set; } + + public void Sending(MessageContext context) { + var contentItem = _contentManager.Get(context.Recipient.Id); + if ( contentItem == null ) + return; + + var recipient = contentItem.As(); + if ( recipient == null ) + return; + + if ( context.Type == MessageTypes.Moderation ) { + context.MailMessage.Subject = T("User needs moderation").Text; + context.MailMessage.Body = T("The following user account needs to be moderated: {0}", recipient.UserName).Text; + } + + if (context.Type == MessageTypes.Validation) { + var registeredWebsite = _siteService.GetSiteSettings().As().ValidateEmailRegisteredWebsite; + var contactEmail = _siteService.GetSiteSettings().As().ValidateEmailContactEMail; + context.MailMessage.Subject = T("Verification E-Mail").Text; + context.MailMessage.Body = + T("Thank you for registering with {0}.


Final Step
To verify that you own this e-mail address, please click the following link:
{1}

Troubleshooting:
If clicking on the link above does not work, try the following:

Select and copy the entire link.
Open a browser window and paste the link in the address bar.
Click Go or, on your keyboard, press Enter or Return.", registeredWebsite, context.Properties["ChallengeUrl"]).Text; + + if (!String.IsNullOrWhiteSpace(contactEmail)) { + context.MailMessage.Body += T("

If you continue to have access problems or want to report other issues, please Contact Us.", contactEmail).Text; + } + } + + if (context.Type == MessageTypes.LostPassword) { + context.MailMessage.Subject = T("Lost password").Text; + context.MailMessage.Body = T("Dear {0}, please click here to change your password.", recipient.UserName, context.Properties["LostPasswordUrl"]).Text; + } + + FormatEmailBody(context); + } + + private static void FormatEmailBody(MessageContext context) { + context.MailMessage.Body = "

" + context.MailMessage.Body; + context.MailMessage.Body += "

"; + } + + public void Sent(MessageContext context) { + } + } +} diff --git a/src/Orchard.Web/Modules/Orchard.Users/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Users/Migrations.cs index 7c4725cd8..4175a2dc5 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Migrations.cs @@ -24,8 +24,12 @@ namespace Orchard.Users { .ContentPartRecord() .Column("UsersCanRegister", c => c.WithDefault(false)) .Column("UsersMustValidateEmail", c => c.WithDefault(false)) + .Column("ValidateEmailRegisteredWebsite", c => c.WithLength(255)) + .Column("ValidateEmailContactEMail", c => c.WithLength(255)) .Column("UsersAreModerated", c => c.WithDefault(false)) .Column("NotifyModeration", c => c.WithDefault(false)) + .Column("NotificationsRecipients", c => c.Unlimited()) + .Column("EnableLostPassword", c => c.WithDefault(false)) ); return 1; diff --git a/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPart.cs b/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPart.cs index 2992b1d2a..711997a4b 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPart.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPart.cs @@ -13,6 +13,16 @@ namespace Orchard.Users.Models { set { Record.UsersMustValidateEmail = value; } } + public string ValidateEmailRegisteredWebsite { + get { return Record.ValidateEmailRegisteredWebsite; } + set { Record.ValidateEmailRegisteredWebsite = value; } + } + + public string ValidateEmailContactEMail { + get { return Record.ValidateEmailContactEMail; } + set { Record.ValidateEmailContactEMail = value; } + } + public bool UsersAreModerated { get { return Record.UsersAreModerated; } set { Record.UsersAreModerated = value; } @@ -23,5 +33,15 @@ namespace Orchard.Users.Models { set { Record.NotifyModeration = value; } } + public string NotificationsRecipients { + get { return Record.NotificationsRecipients; } + set { Record.NotificationsRecipients = value; } + } + + public bool EnableLostPassword { + get { return Record.EnableLostPassword; } + set { Record.EnableLostPassword = value; } + } + } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPartRecord.cs b/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPartRecord.cs index 3a2c5d3f2..fcc3e86c9 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPartRecord.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Models/RegistrationSettingsPartRecord.cs @@ -1,12 +1,19 @@ -using System.Net.Mail; -using Orchard.ContentManagement.Records; using System.ComponentModel.DataAnnotations; +using Orchard.ContentManagement.Records; namespace Orchard.Users.Models { public class RegistrationSettingsPartRecord : ContentPartRecord { public virtual bool UsersCanRegister { get; set; } public virtual bool UsersMustValidateEmail { get; set; } + [StringLength(255)] + public virtual string ValidateEmailRegisteredWebsite { get; set; } + [StringLength(255)] + public virtual string ValidateEmailContactEMail { get; set; } + public virtual bool UsersAreModerated { get; set; } public virtual bool NotifyModeration { get; set; } + public virtual string NotificationsRecipients { get; set; } + + public virtual bool EnableLostPassword { get; set; } } } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Module.txt b/src/Orchard.Web/Modules/Orchard.Users/Module.txt index f87a87c29..58c06ba32 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Users/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: The users module enables user management. Features: Orchard.Users: + Name: Users Description: Standard users. Category: Core - Dependencies: Settings + Dependencies: Settings \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj index 73a4fa092..a61a69717 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj +++ b/src/Orchard.Web/Modules/Orchard.Users/Orchard.Users.csproj @@ -59,7 +59,7 @@ - + @@ -74,6 +74,7 @@ + @@ -123,6 +124,9 @@
+ + + diff --git a/src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs b/src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs index 13fe5349a..19e0c0b4a 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Services/MembershipService.cs @@ -81,9 +81,18 @@ namespace Orchard.Users.Services { } if ( registrationSettings != null && registrationSettings.UsersAreModerated && registrationSettings.NotifyModeration && !createUserParams.IsApproved ) { - var superUser = GetUser(_orchardServices.WorkContext.CurrentSite.SuperUser); - if(superUser != null) - _messageManager.Send(superUser.ContentItem.Record, MessageTypes.Moderation, "email"); + var usernames = String.IsNullOrWhiteSpace(registrationSettings.NotificationsRecipients) + ? new string[0] + : registrationSettings.NotificationsRecipients.Split(new[] {',', ' '}, StringSplitOptions.RemoveEmptyEntries); + + foreach ( var userName in usernames ) { + if (String.IsNullOrWhiteSpace(userName)) { + continue; + } + var recipient = GetUser(userName); + if (recipient != null) + _messageManager.Send(recipient.ContentItem.Record, MessageTypes.Moderation, "email"); + } } return user; diff --git a/src/Orchard.Web/Modules/Orchard.Users/Services/MissingSettingsBanner.cs b/src/Orchard.Web/Modules/Orchard.Users/Services/MissingSettingsBanner.cs new file mode 100644 index 000000000..b5a772951 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Services/MissingSettingsBanner.cs @@ -0,0 +1,36 @@ +using System.Linq; +using System.Collections.Generic; +using Orchard.ContentManagement; +using Orchard.Localization; +using Orchard.Messaging.Services; +using Orchard.UI.Admin.Notification; +using Orchard.UI.Notify; +using Orchard.Users.Models; + +namespace Orchard.Users.Services { + public class MissingSettingsBanner : INotificationProvider { + private readonly IOrchardServices _orchardServices; + private readonly IMessageManager _messageManager; + + public MissingSettingsBanner(IOrchardServices orchardServices, IMessageManager messageManager) { + _orchardServices = orchardServices; + _messageManager = messageManager; + T = NullLocalizer.Instance; + } + + public Localizer T { get; set; } + + public IEnumerable GetNotifications() { + + var registrationSettings = _orchardServices.WorkContext.CurrentSite.As(); + + if ( registrationSettings != null && + ( registrationSettings.UsersMustValidateEmail || + registrationSettings.NotifyModeration || + registrationSettings.EnableLostPassword ) && + !_messageManager.GetAvailableChannelServices().Contains("email") ) { + yield return new NotifyEntry { Message = T("Some Orchard.User settings require an Email channel to be enabled."), Type = NotifyType.Warning }; + } + } + } +} diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml index 3a3b59413..592bbaf25 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/ChangePassword.cshtml @@ -6,6 +6,11 @@ @using (Html.BeginFormAntiForgeryPost()) {
@T("Account Information") +
+ + @Html.Password("currentPassword") + @Html.ValidationMessage("currentPassword") +
@Html.Password("newPassword") diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml index f1efc967a..5e43b57e1 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LogOn.cshtml @@ -3,13 +3,14 @@ @{ var userCanRegister = @WorkContext.CurrentSite.As().UsersCanRegister; + var enableLostPassword = @WorkContext.CurrentSite.As().EnableLostPassword; }

@Html.TitleForPage(Model.Title)

@T("Please enter your username and password.") @if(userCanRegister) { @Html.ActionLink(T("Register").Text, "Register") @T(" if you don't have an account.") } - @Html.ActionLink(T("Lost your Password?").Text, "LostPassword") + @if(enableLostPassword) { @Html.ActionLink(T("Lost your Password?").Text, "RequestLostPassword") }

@Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString()) @@ -27,9 +28,6 @@ @Html.Password("password") @Html.ValidationMessage("password") -
  • - @Html.CheckBox("rememberMe", new { id = "remember-me" }) -
  • diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LostPassword.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LostPassword.cshtml index 0841de7e6..3a3b59413 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LostPassword.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/LostPassword.cshtml @@ -1,15 +1,23 @@ -

    @Html.TitleForPage(T("Lost Password").ToString())

    -

    @T("Please enter your username or email address. You will receive a link to create a new password via email.")

    +@model dynamic +

    @Html.TitleForPage(T("Change Password").ToString())

    +

    @T("Use the form below to change your password.")

    +

    @T("New passwords are required to be a minimum of {0} characters in length.", ViewData["PasswordLength"] as string)

    +@Html.ValidationSummary(T("Password change was unsuccessful. Please correct the errors and try again.").ToString()) @using (Html.BeginFormAntiForgeryPost()) {
    @T("Account Information")
    - - @Html.TextBox("username") - @Html.ValidationMessage("username") + + @Html.Password("newPassword") + @Html.ValidationMessage("newPassword")
    - + + @Html.Password("confirmPassword") + @Html.ValidationMessage("confirmPassword") +
    +
    +
    } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RequestLostPassword.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RequestLostPassword.cshtml new file mode 100644 index 000000000..0841de7e6 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Account/RequestLostPassword.cshtml @@ -0,0 +1,15 @@ +

    @Html.TitleForPage(T("Lost Password").ToString())

    +

    @T("Please enter your username or email address. You will receive a link to create a new password via email.")

    +@using (Html.BeginFormAntiForgeryPost()) { +
    + @T("Account Information") +
    + + @Html.TextBox("username") + @Html.ValidationMessage("username") +
    +
    + +
    +
    + } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml index 0d827da2b..684d319a4 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Admin/Index.cshtml @@ -22,11 +22,11 @@ @foreach (var row in Model.Rows) { - @if(row.UserPart.RegistrationStatus == UserStatus.Approved) { + @if(row.UserPart.RegistrationStatus == UserStatus.Approved && row.UserPart.EmailStatus == UserStatus.Approved) { @T( } else { - @T( + @T( } @Html.ActionLink(row.UserPart.UserName, "Edit", new { row.UserPart.Id }) @@ -42,7 +42,7 @@ @Html.ActionLink(T("Disable").ToString(), "Moderate", new { row.UserPart.Id }) } @if ( row.UserPart.EmailStatus == UserStatus.Pending ) { | - @Html.ActionLink(T("Challenge Email").ToString(), "SendChallengeEmail", new { row.UserPart.Id }) + @Html.ActionLink(T("Send challenge E-mail").ToString(), "SendChallengeEmail", new { row.UserPart.Id }) } diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml index c839341bf..8c9d4c568 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/EditorTemplates/Parts/Users.RegistrationSettings.cshtml @@ -5,21 +5,38 @@
    @Html.EditorFor(m => m.UsersCanRegister) - @Html.ValidationMessage("UsersCanRegister", "*") +
    +
    + @Html.EditorFor(m => m.EnableLostPassword) +
    @Html.EditorFor(m => m.UsersMustValidateEmail) - @Html.ValidationMessage("UsersMustValidateEmail", "*") +
    +
    + + @Html.TextBoxFor(m => m.ValidateEmailRegisteredWebsite, new { @class = "textMedium" } ) + @Html.ValidationMessage("ValidateEmailRegisteredWebsite", "*") + @T("The name of your website as it will appear in the verification e-mail.") + + + @Html.TextBoxFor(m => m.ValidateEmailContactEMail, new { @class = "textMedium" } ) + @Html.ValidationMessage("ValidateEmailContactEMail", "*") + @T("The e-mail address displayed in the verification e-mail for a Contact Us link. Leave empty for no link.")
    @Html.EditorFor(m => m.UsersAreModerated) - @Html.ValidationMessage("UsersAreModerated", "*")
    @Html.EditorFor(m => m.NotifyModeration) - @Html.ValidationMessage("NotifyModeration", "*")
    +
    + + @Html.TextBoxFor(m => m.NotificationsRecipients, new { @class = "textMedium" } ) + @Html.ValidationMessage("NotificationsRecipients", "*") + @T("The usernames to send the notifications to (e.g., \"admin, user1, ...\").") +
    \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config index 37513c05c..b7d215131 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config @@ -1,5 +1,8 @@ + + + diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs deleted file mode 100644 index d4072c7a8..000000000 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs +++ /dev/null @@ -1,13 +0,0 @@ -using JetBrains.Annotations; -using Orchard.ContentManagement.Drivers; -using Orchard.Widgets.Models; - -namespace Orchard.Widgets.Drivers { - [UsedImplicitly] - public class WidgetBagPartDriver : ContentPartDriver { - protected override DriverResult Editor(WidgetBagPart part, dynamic shapeHelper) { - return ContentShape("Parts_Widgets_WidegetBagPart", - () => shapeHelper.EditorTemplate(TemplateName: "Parts/Widgets.WidgetBagPart", Model: part, Prefix: Prefix)); - } - } -} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs index f14da7222..cf2ad4b81 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs @@ -60,15 +60,6 @@ namespace Orchard.Widgets { .WithSetting("Stereotype", "Widget") ); - ContentDefinitionManager.AlterTypeDefinition("WidgetPage", - cfg => cfg - .WithPart("CommonPart") - .WithPart("RoutePart") - .WithPart("WidgetBagPart") - .WithPart("MenuPart") - .Creatable() - ); - return 1; } } diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs deleted file mode 100644 index 4561d6014..000000000 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs +++ /dev/null @@ -1,5 +0,0 @@ -using Orchard.ContentManagement; - -namespace Orchard.Widgets.Models { - public class WidgetBagPart : ContentPart {} -} diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt index 84c3c2392..31b7afbb0 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Module.txt @@ -7,6 +7,7 @@ OrchardVersion: 0.8.0 Description: An implementation of widgets for Orchard. Features: Orchard.Widgets: + Name: Widgets Description: An implementation of widgets. Category: Widget Dependencies: Orchard.Scripting \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj index cbc367726..4e9284f5c 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj @@ -47,14 +47,12 @@ - - diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleManager.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleManager.cs index 706e549bb..38cdae2da 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleManager.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleManager.cs @@ -2,4 +2,4 @@ public interface IRuleManager : IDependency { bool Matches(string expression); } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleProvider.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleProvider.cs index b85700271..260b46f0c 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleProvider.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Services/IRuleProvider.cs @@ -2,5 +2,4 @@ public interface IRuleProvider : IDependency { void Process(RuleContext ruleContext); } -} - +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleContext.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleContext.cs index dfac56841..d1db6dea2 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleContext.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Services/RuleContext.cs @@ -4,4 +4,4 @@ public object[] Arguments { get; set; } public object Result { get; set; } } -} +} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs index 6acc19f0c..b3caf1e3b 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs @@ -3,6 +3,7 @@ using System.Linq; using JetBrains.Annotations; using Orchard.ContentManagement; using Orchard.ContentManagement.Aspects; +using Orchard.Environment.Extensions.Models; using Orchard.Environment.Features; using Orchard.Widgets.Models; @@ -42,7 +43,7 @@ namespace Orchard.Widgets.Services { public IEnumerable GetZones() { return _featureManager.GetEnabledFeatures() .Select(x => x.Extension) - .Where(x => x.ExtensionType == "Theme") + .Where(x => DefaultExtensionTypes.IsTheme(x.ExtensionType)) .SelectMany(x => x.Zones.Split(',')) .Distinct() .Select(x => x.Trim()) diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config index 1f92a3531..7d689782e 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt b/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt index 97f3e4a96..d960e8531 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Module.txt @@ -7,5 +7,6 @@ OrchardVersion: 0.8.0 Description: The jQuery module contains the jQuery and related script libraries. Features: Orchard.jQuery: + Name: jQuery Description: A common location for jQuery and related script libraries. - Category: Resources + Category: Resources \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config b/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config +++ b/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/TinyMce/Module.txt b/src/Orchard.Web/Modules/TinyMce/Module.txt index 1a27f6735..6c23f4ed1 100644 --- a/src/Orchard.Web/Modules/TinyMce/Module.txt +++ b/src/Orchard.Web/Modules/TinyMce/Module.txt @@ -7,5 +7,6 @@ OrchardVersion: 0.8.0 Description: The TinyMCE module enables rich text contents to be created using a "What You See Is What You Get" user interface. Features: TinyMce: + Name: TinyMce Description: TinyMCE HTML WYSIWYG editor. - Category: Input Editor + Category: Input Editor \ No newline at end of file diff --git a/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config b/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config +++ b/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Modules/TinyMce/Views/Web.config b/src/Orchard.Web/Modules/TinyMce/Views/Web.config index 37513c05c..b7d215131 100644 --- a/src/Orchard.Web/Modules/TinyMce/Views/Web.config +++ b/src/Orchard.Web/Modules/TinyMce/Views/Web.config @@ -1,5 +1,8 @@ + + + diff --git a/src/Orchard.Web/Themes/SafeMode/Content/Web.config b/src/Orchard.Web/Themes/SafeMode/Content/Web.config index b4210f3e0..0dc62ece6 100644 --- a/src/Orchard.Web/Themes/SafeMode/Content/Web.config +++ b/src/Orchard.Web/Themes/SafeMode/Content/Web.config @@ -1,5 +1,8 @@  - + + + + diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/Web.config b/src/Orchard.Web/Themes/SafeMode/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/Web.config +++ b/src/Orchard.Web/Themes/SafeMode/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/site.css b/src/Orchard.Web/Themes/SafeMode/Styles/site.css index e7238cbcd..02f1cc0f8 100644 --- a/src/Orchard.Web/Themes/SafeMode/Styles/site.css +++ b/src/Orchard.Web/Themes/SafeMode/Styles/site.css @@ -173,6 +173,34 @@ button:focus::-moz-focus-inner, .button:focus::-moz-focus-inner { /* Confirmations, Messages and the like ***************************************************************/ +#throbber { + display:none; +} +#throbber .curtain +{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; + background-color:Gray; + filter:alpha(opacity=70); + opacity: 0.7; +} +#throbber .curtain-content +{ + position:absolute; + left:0; + top:0; + width:100%; + height:100%; +} +#throbber .curtain-content div { + text-align:center; + padding:250px; + color:White; +} + .message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; diff --git a/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config b/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config index b4210f3e0..0dc62ece6 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config +++ b/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config @@ -1,5 +1,8 @@  - + + + + diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config b/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config index b4210f3e0..0dc62ece6 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config @@ -1,5 +1,8 @@  - + + + + diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css index c6ee3b82c..293b3de49 100644 --- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css +++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css @@ -58,7 +58,6 @@ blockquote, q { quotes: "" ""; } header, footer, aside, nav, article { display: block; } /* end: reset */ - /* Clearing Floats ***************************************************************/ @@ -78,20 +77,20 @@ header, footer, aside, nav, article { display: block; } /* Default font settings. The font-size 81.3% sets the base font to 13px -Pixels EMs Percent Points -1px 0.077em 7.7% 1pt -2px 0.154em 15.4% 2pt -3px 0.231em 23.1% 3pt -4px 0.308em 30.8% 3pt -5px 0.385em 38.5% 4pt -6px 0.462em 46.2% 5pt -7px 0.538em 53.8% 5pt -8px 0.615em 61.5% 6pt -9px 0.692em 69.2% 7pt -10px 0.769em 76.9% 8pt -11px 0.846em 84.6% 8pt -12px 0.923em 92.3% 9pt -13px 1em 100% 10pt +Pixels EMs Percent Points +1px 0.077em 7.7% 1pt +2px 0.154em 15.4% 2pt +3px 0.231em 23.1% 3pt +4px 0.308em 30.8% 3pt +5px 0.385em 38.5% 4pt +6px 0.462em 46.2% 5pt +7px 0.538em 53.8% 5pt +8px 0.615em 61.5% 6pt +9px 0.692em 69.2% 7pt +10px 0.769em 76.9% 8pt +11px 0.846em 84.6% 8pt +12px 0.923em 92.3% 9pt +13px 1em 100% 10pt 14px 1.077em 107.7% 11pt 15px 1.154em 115.4% 11pt 16px 1.231em 123.1% 12pt @@ -425,7 +424,7 @@ span.message { border:1px solid #ffea9b; } .message-Error { - background:#e68585; /* green */ + background:#e68585; /* red */ border:1px solid #990808; color:#fff; }.debug.message { @@ -460,6 +459,10 @@ form.inline fieldset { padding-top:0; } +input[type="checkbox"]:focus, input[type="radio"]:focus { + outline:1px dotted #666d51; +} + legend span { font-weight:normal; } @@ -477,6 +480,8 @@ label input { } .hint { display:block; + font-size:0.923em; + color:#7c7c7c; } /* todo: (heskew) try to get .text on stuff like .text-box */ select, textarea, input.text, input.textMedium, input.text-box { @@ -506,7 +511,7 @@ input.large.text, textarea, fieldset { clear:both; } fieldset { - margin:0 0 1.3em 0; + margin:0 0 1em 0; padding:6px 0 0; } textarea { @@ -821,7 +826,7 @@ table.items th, table.items td { /* Core Modules -----------------------------------------------------------*/ +***************************************************************/ /* Routable */ .permalink input.text { background:transparent; @@ -852,10 +857,11 @@ table.items th, table.items td { } /* Core Contents and Orchard.PublishLater */ -.orchard-blogs .edit-item-sidebar, .contents .edit-item-sidebar + +.edit-item-sidebar { border:1px solid #d3d3d3; - padding:6px; + padding:8px; /*CSS3 properties*/ filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#f7f7f7', endColorstr='#f5f5f5'); @@ -885,9 +891,7 @@ fieldset.save-button { width:auto; } fieldset.publish-later-datetime { - clear:none; float:left; - margin: 0 6px; } fieldset.publish-later-datetime legend { display:none; @@ -899,7 +903,7 @@ fieldset.publish-later-datetime input { } /* Fields -----------------------------------------------------------*/ +***************************************************************/ /* TextField */ #main .summary p.text-field { margin:.5em 0; diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css index e51a40030..767ef57bf 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Site.css @@ -143,7 +143,7 @@ aside h6 { font-size: 1em; } /* Lists */ li ul, li ol { margin:0 1.5em; } -ul, ol { margin: 0 1.5em 1.5em 1.5em; } +ul, ol { margin: 1.5em; line-height: 1.538em; } ul { list-style-type: disc; } ol { list-style-type: decimal; } @@ -321,26 +321,25 @@ nav ul /* Main ***************************************************************/ -/* Blogs */ -.blog-description { font-size: 1.231em; } -.blog-post .tags { margin-top: 12px; } -.blog-post .tags a { background-color: #dbdbdb; padding: 3px; color: #434343; } -.blog-post .tags a:hover { background-color: #434343; padding: 3px; color: #fff; } -.blog-posts { padding: 0; margin: 0; list-style: none; } -.blog-posts li { padding: 0; margin: 0; } -.blog-posts .blog-post { border-top: 1px solid #dbdbdb; padding: 6px 0 6px 0; } -.blog-posts .blog-post header {} -.blog-posts .blog-post header h1 { font-size: 1.308em; } -.blog-posts .blog-post header h1 a { color: #434343; } -.blog-posts .blog-post header h1 a:hover {} -.blog-posts .blog-post .tags { margin-top: 12px; } -.blog-posts .blog-post .tags a { background-color: #dbdbdb; padding: 3px; color: #434343; } -.blog-posts .blog-post .tags a:hover { background-color: #434343; padding: 3px; color: #fff; text-decoration: none; } -.blog-posts .blog-post .metadata { margin: 0 0 12px 0; color: #999; font-size: 0.846em; } -.blog-posts .blog-post .metadata .published { display: inline; margin: 0 6px 0 0; } -.blog-posts .blog-post .metadata .commentcount { display: inline; } -.blog-post {} -.blog-post-title {} +/* Content lists and details */ +.content-description { font-size: 1.154em; } +.content-items { padding: 0; margin: 0; list-style: none; } +.content-items li { padding: 0; margin: 0; } +.content-items .content-item { border-top: 1px solid #dbdbdb; padding: 6px 0 6px 0; } +.content-items .content-item header {} +.content-items .content-item header h1 { font-size: 1.308em; color:#ff0000; } +.content-items .content-item header h1 a { color: #434343; } +.content-items .content-item header h1 a:hover {} + +/* Tags */ +.tags { margin-top: 12px; } +.tags a { background-color: #dbdbdb; padding: 3px 6px; color: #434343; } +.tags a:hover { background-color: #434343; color: #fff; } + +/* Metadata */ +.metadata { margin: 0 0 12px 0; color: #999; font-size: 0.846em; } +.metadata .published { display: inline; margin: 0 6px 0 0; } +.metadata .commentcount { display: inline; } .meta {} /* Comments */ @@ -359,38 +358,12 @@ nav ul .comment-disabled {} .comment-count { font-size: 1.231em; } -/* Tag Search */ -.tagged-posts {} -.tagged-posts { padding: 0; margin: 0; list-style: none; } -.tagged-posts li { padding: 0; margin: 0; } -.tagged-posts .blog-post { border-top: 1px solid #dbdbdb; padding: 6px 0 6px 0; } -.tagged-posts .blog-post header {} -.tagged-posts .blog-post header h1 { font-size: 1.308em; } -.tagged-posts .blog-post header h1 a { color: #434343; } -.tagged-posts .blog-post header h1 a:hover {} -.tagged-posts .blog-post .tags { margin-top: 12px; } -.tagged-posts .blog-post .tags a { background-color: #dbdbdb; padding: 3px; color: #434343; } -.tagged-posts .blog-post .tags a:hover { background-color: #434343; padding: 3px; color: #fff; text-decoration: none; } -.tagged-posts .blog-post .metadata { margin: 0 0 12px 0; color: #999; font-size: 1.1em; } -.tagged-posts .blog-post .metadata .published { display: inline; margin: 0 6px 0 0; } -.tagged-posts .blog-post .metadata .commentcount { display: inline; } - -/* Search Results */ -.search-results {} -.search-results { padding: 0; margin: 0; list-style: none; } -.search-results li { padding: 0; margin: 0; } -.search-results .blog-post { border-top: 1px solid #dbdbdb; padding: 6px 0 6px 0; } -.search-results .blog-post header {} -.search-results .blog-post header h1 { font-size: 1.308em; } -.search-results .blog-post header h1 a { color: #434343; } -.search-results .blog-post header h1 a:hover {} -.search-results .blog-post .tags { margin-top: 12px; } -.search-results .blog-post .tags a { background-color: #dbdbdb; padding: 3px; color: #434343; } -.search-results .blog-post .tags a:hover { background-color: #434343; padding: 3px; color: #fff; text-decoration: none; } -.search-results .blog-post .metadata { margin: 0 0 12px 0; color: #999; font-size: 0.846em; } -.search-results .blog-post .metadata .published { display: inline; margin: 0 6px 0 0; } -.search-results .blog-post .metadata .commentcount { display: inline; } - +/* Confirmations */ +.message, .validation-summary-errors { margin:10px 0 4px 0; padding:4px; } +.messages a { font-weight:bold; } +.message-Information { background:#e6f1c9; /* green */ border:1px solid #cfe493; color:#062232; } +.message-Warning { background:#fdf5bc; /* yellow */ border:1px solid #ffea9b; } +.critical.message, .validation-summary-errors, .message-Error { background:#e68585; /* red */ border:1px solid #990808; color:#fff; } /* Secondary @@ -449,18 +422,11 @@ nav ul /* Widgets ***************************************************************/ .widgets {} +.widget h1 { font-size: 1.077em; } /* Search */ /* Search widget shuld go into the sidebar for proper styling */ /* TODO: (mibach) Generic any zone compatible search widget */ -.widget-search-form -{ - position: absolute; - top: 30px; - right: 12px; -} -.widget-search-form h1 { font-size: 1.077em; } - .search-form {} .search-form input[type="text"] { float: left; } .search-form button[type="submit"] { float: left; margin: 0; margin-left: 6px; } @@ -471,12 +437,6 @@ nav ul .widget-control .manage-actions { position:absolute; top: 0px; right: 0px; } .widget-control .manage-actions a { display: block; background-color: #dbdbdb; color: #434343; padding: 3px 6px; } .widget-control .manage-actions a:hover { background-color: #434343; color: #fff; text-decoration: none; } -.widget-control .widget-search-form /* TODO: (mibach) Remove special case for Search Widget */ -{ - position: absolute; - top: 0px; - right: 12px; -} /* Content Mode */ .content-control { position: relative; border: 1px dotted #5f97af; } diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config index b4210f3e0..df1c33504 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/BadgeOfHonor.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/BadgeOfHonor.cshtml index 265189726..fb3c15f7c 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/BadgeOfHonor.cshtml +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/BadgeOfHonor.cshtml @@ -1 +1 @@ -
    @T("Powered by Orchard", "http://www.orchardproject.net") @T("© The Theme Machine 2010.")
    \ No newline at end of file +
    @T("Powered by Orchard", "http://www.orchardproject.net") @T("© The Theme Machine 2010.")
    \ No newline at end of file diff --git a/src/Orchard.Web/Themes/Web.config b/src/Orchard.Web/Themes/Web.config index d0b6640a4..be244e18c 100644 --- a/src/Orchard.Web/Themes/Web.config +++ b/src/Orchard.Web/Themes/Web.config @@ -1,5 +1,8 @@  + + + diff --git a/src/Orchard.Web/Web.config b/src/Orchard.Web/Web.config index 3613a7321..9b51854ad 100644 --- a/src/Orchard.Web/Web.config +++ b/src/Orchard.Web/Web.config @@ -40,6 +40,8 @@ + +