diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Services/SettingsBanner.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Services/SettingsBanner.cs index b51da54f0..0ce541ee7 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Services/SettingsBanner.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Services/SettingsBanner.cs @@ -1,4 +1,7 @@ using System.Collections.Generic; +using System.Security.Policy; +using System.Web.Mvc; +using System.Web.Routing; using Orchard.ContentManagement; using Orchard.Environment.Configuration; using Orchard.Localization; @@ -8,9 +11,11 @@ using Orchard.UI.Notify; namespace Orchard.Warmup.Services { public class SettingsBanner: INotificationProvider { private readonly IOrchardServices _orchardServices; + private readonly WorkContext _workContext; - public SettingsBanner(IOrchardServices orchardServices) { + public SettingsBanner(IOrchardServices orchardServices, WorkContext workContext) { _orchardServices = orchardServices; + _workContext = workContext; T = NullLocalizer.Instance; } @@ -18,7 +23,9 @@ namespace Orchard.Warmup.Services { public IEnumerable GetNotifications() { if ( string.IsNullOrWhiteSpace(_orchardServices.WorkContext.CurrentSite.BaseUrl)) { - yield return new NotifyEntry { Message = T("The Warmup feature needs the Base Url site setting to be set." ), Type = NotifyType.Warning }; + var urlHelper = new UrlHelper(_workContext.HttpContext.Request.RequestContext); + var url = urlHelper.Action("Index", "Admin", new {Area = "Settings"}); + yield return new NotifyEntry { Message = T("The Warmup feature needs the Base Url site setting to be set.", url), Type = NotifyType.Warning }; } } }