diff --git a/NzbDrone.Web/Content/QualitySettings.css b/NzbDrone.Web/Content/QualitySettings.css index 6220c1381..74f08b603 100644 --- a/NzbDrone.Web/Content/QualitySettings.css +++ b/NzbDrone.Web/Content/QualitySettings.css @@ -1,6 +1,11 @@ #top { - overflow: auto; + margin: 20px; + overflow: hidden; +} + +#top .settingsForm { + float: left; } #profileContainer @@ -59,7 +64,7 @@ .profileSection { float: left; - width: 270px; + width: 265px; margin: 2px; border:solid 1px #CCCCCD; display: inline-block; @@ -74,7 +79,7 @@ margin-right: 20px; font-weight: bold; display: inline-block; - width: 50px; + width: 40px; } .profileOptions input, .profileOptions select @@ -142,7 +147,6 @@ width: 600px; } -.slider-container -{ - margin-bottom: 10px; +#QualityForm .ui-accordion .ui-accordion-content { + padding: 1em 2em; } \ No newline at end of file diff --git a/NzbDrone.Web/Content/Settings.css b/NzbDrone.Web/Content/Settings.css index 59d5d25ea..24cf5e894 100644 --- a/NzbDrone.Web/Content/Settings.css +++ b/NzbDrone.Web/Content/Settings.css @@ -115,5 +115,40 @@ } .settingsForm .validation-error { - background: url("../Content/jQueryUI/images/ui-bg_flat_30_b40404_40x100.png") repeat-x scroll 50% 50% #B40404; - } \ No newline at end of file + background: url("../Content/jQueryUI/images/ui-bg_flat_30_b40404_40x100.png") repeat-x scroll 50% 50% #B40404; +} + + +/* Navigation */ +.settings-navigation { + line-height: normal; + list-style: none outside none; + margin-left: 5px; + margin-bottom: 30px; + padding: 5px 0px 20px 0px; +} + +.settings-navigation li { + display: block; + float: left; + padding: 5px; +} + +.settings-navigation li.current_action a { + background-color: #065EFE; +} + +.settings-navigation a { + background-color: #191919; + color: white; + display: block; + float: left; + font-family: "Segoe UI","Open Sans","Segoe UI Light",sans-serif; + font-size: 16px; + font-weight: normal; + height: 26px; + padding: 2px 10px; + text-align: center; + text-decoration: none; + vertical-align: middle; +} \ No newline at end of file diff --git a/NzbDrone.Web/Controllers/SettingsController.cs b/NzbDrone.Web/Controllers/SettingsController.cs index d01c41593..2bc01dc2a 100644 --- a/NzbDrone.Web/Controllers/SettingsController.cs +++ b/NzbDrone.Web/Controllers/SettingsController.cs @@ -23,7 +23,6 @@ namespace NzbDrone.Web.Controllers [HandleError] public class SettingsController : Controller { - private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private readonly ConfigProvider _configProvider; private readonly IndexerProvider _indexerProvider; private readonly QualityProvider _qualityProvider; @@ -36,6 +35,8 @@ namespace NzbDrone.Web.Controllers private readonly MetadataProvider _metadataProvider; private readonly JobProvider _jobProvider; + private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); + public SettingsController(ConfigProvider configProvider, IndexerProvider indexerProvider, QualityProvider qualityProvider, AutoConfigureProvider autoConfigureProvider, SeriesProvider seriesProvider, ExternalNotificationProvider externalNotificationProvider, @@ -59,7 +60,33 @@ namespace NzbDrone.Web.Controllers public ActionResult Index() { - return View(); + return RedirectToAction("Naming", "Settings"); + } + + public ActionResult Naming() + { + var model = new EpisodeNamingModel(); + + model.SeriesName = _configProvider.SortingIncludeSeriesName; + model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle; + model.ReplaceSpaces = _configProvider.SortingReplaceSpaces; + model.AppendQuality = _configProvider.SortingAppendQuality; + model.SeasonFolders = _configProvider.UseSeasonFolder; + model.SeasonFolderFormat = _configProvider.SortingSeasonFolderFormat; + model.SeparatorStyle = _configProvider.SortingSeparatorStyle; + model.NumberStyle = _configProvider.SortingNumberStyle; + model.MultiEpisodeStyle = _configProvider.SortingMultiEpisodeStyle; + model.SceneName = _configProvider.SortingUseSceneName; + + model.SeparatorStyles = new SelectList(EpisodeSortingHelper.GetSeparatorStyles(), "Id", "Name"); + model.NumberStyles = new SelectList(EpisodeSortingHelper.GetNumberStyles(), "Id", "Name"); + model.MultiEpisodeStyles = new SelectList(EpisodeSortingHelper.GetMultiEpisodeStyles(), "Id", "Name"); + + //Metadata + model.MetadataXbmcEnabled = _metadataProvider.GetSettings(typeof(Core.Providers.Metadata.Xbmc)).Enable; + model.MetadataUseBanners = _configProvider.MetadataUseBanners; + + return View(model); } public ActionResult Indexers() @@ -200,32 +227,6 @@ namespace NzbDrone.Web.Controllers return View(model); } - public ActionResult Naming() - { - var model = new EpisodeNamingModel(); - - model.SeriesName = _configProvider.SortingIncludeSeriesName; - model.EpisodeName = _configProvider.SortingIncludeEpisodeTitle; - model.ReplaceSpaces = _configProvider.SortingReplaceSpaces; - model.AppendQuality = _configProvider.SortingAppendQuality; - model.SeasonFolders = _configProvider.UseSeasonFolder; - model.SeasonFolderFormat = _configProvider.SortingSeasonFolderFormat; - model.SeparatorStyle = _configProvider.SortingSeparatorStyle; - model.NumberStyle = _configProvider.SortingNumberStyle; - model.MultiEpisodeStyle = _configProvider.SortingMultiEpisodeStyle; - model.SceneName = _configProvider.SortingUseSceneName; - - model.SeparatorStyles = new SelectList(EpisodeSortingHelper.GetSeparatorStyles(), "Id", "Name"); - model.NumberStyles = new SelectList(EpisodeSortingHelper.GetNumberStyles(), "Id", "Name"); - model.MultiEpisodeStyles = new SelectList(EpisodeSortingHelper.GetMultiEpisodeStyles(), "Id", "Name"); - - //Metadata - model.MetadataXbmcEnabled = _metadataProvider.GetSettings(typeof(Core.Providers.Metadata.Xbmc)).Enable; - model.MetadataUseBanners = _configProvider.MetadataUseBanners; - - return View(model); - } - public ActionResult System() { var selectedAuthenticationType = _configFileProvider.AuthenticationType; diff --git a/NzbDrone.Web/Helpers/IsCurrentActionHelper.cs b/NzbDrone.Web/Helpers/IsCurrentActionHelper.cs index 1681d169f..d68f8c19d 100644 --- a/NzbDrone.Web/Helpers/IsCurrentActionHelper.cs +++ b/NzbDrone.Web/Helpers/IsCurrentActionHelper.cs @@ -7,7 +7,7 @@ namespace NzbDrone.Web.Helpers { public static class IsCurrentActionHelper { - private static bool IsCurrentController(HtmlHelper helper, string actionName, string controllerName) + private static bool IsCurrentController(HtmlHelper helper, string controllerName) { var currentControllerName = (string) helper.ViewContext.RouteData.Values["controller"]; @@ -17,12 +17,23 @@ namespace NzbDrone.Web.Helpers return false; } - public static string CurrentActionLink(this HtmlHelper helper, string text, string actionName, - string controllerName) + private static bool IsCurrentAction(HtmlHelper helper, string actionName, string controllerName) + { + var currentControllerName = (string)helper.ViewContext.RouteData.Values["controller"]; + var currentActionName = (string)helper.ViewContext.RouteData.Values["action"]; + + if (currentControllerName.Equals(controllerName, StringComparison.CurrentCultureIgnoreCase) && + currentActionName.Equals(actionName, StringComparison.CurrentCultureIgnoreCase)) + return true; + + return false; + } + + public static string CurrentControllerLink(this HtmlHelper helper, string text, string actionName, string controllerName) { string result; - if (IsCurrentController(helper, actionName, controllerName)) + if (IsCurrentController(helper, controllerName)) { result = "
  • "; } @@ -33,5 +44,21 @@ namespace NzbDrone.Web.Helpers return result + helper.ActionLink(text, actionName, controllerName).ToHtmlString() + @"
  • "; } + + public static string CurrentActionLink(this HtmlHelper helper, string text, string actionName, string controllerName) + { + string result; + + if (IsCurrentAction(helper, actionName, controllerName)) + { + result = "
  • "; + } + else + { + result = "
  • "; + } + + return result + helper.ActionLink(text, actionName, controllerName).ToHtmlString() + @"
  • "; + } } } \ No newline at end of file diff --git a/NzbDrone.Web/NzbDrone.Web.csproj b/NzbDrone.Web/NzbDrone.Web.csproj index 0bb0c2722..f41b5d750 100644 --- a/NzbDrone.Web/NzbDrone.Web.csproj +++ b/NzbDrone.Web/NzbDrone.Web.csproj @@ -412,6 +412,7 @@ + diff --git a/NzbDrone.Web/Views/Settings/DownloadClient.cshtml b/NzbDrone.Web/Views/Settings/DownloadClient.cshtml index ad721041d..6c7581ccb 100644 --- a/NzbDrone.Web/Views/Settings/DownloadClient.cshtml +++ b/NzbDrone.Web/Views/Settings/DownloadClient.cshtml @@ -1,6 +1,10 @@ @using NzbDrone.Web.Helpers; @model NzbDrone.Web.Models.DownloadClientSettingsModel -@{ Layout = null; } + +@{ + Layout = "_SettingsLayout.cshtml"; +} + +
    @Html.CheckBox("nzbMatrixStatus", @Model.NzbMatrixEnabled, new { @class = "indexerStatusButton" }) @@ -177,7 +181,9 @@ }
    - +} diff --git a/NzbDrone.Web/Views/Settings/Misc.cshtml b/NzbDrone.Web/Views/Settings/Misc.cshtml index 70faeb8a1..fbc82091c 100644 --- a/NzbDrone.Web/Views/Settings/Misc.cshtml +++ b/NzbDrone.Web/Views/Settings/Misc.cshtml @@ -1,6 +1,9 @@ @using NzbDrone.Web.Helpers @model NzbDrone.Web.Models.MiscSettingsModel -@{ Layout = null; } + +@{ + Layout = "_SettingsLayout.cshtml"; +}
    Enabling Backlog Searching can use lots of bandwidth and is not recommended for users with block Usenet accounts or bandwidth restrictions. diff --git a/NzbDrone.Web/Views/Settings/Naming.cshtml b/NzbDrone.Web/Views/Settings/Naming.cshtml index d3438b932..f2c1b2620 100644 --- a/NzbDrone.Web/Views/Settings/Naming.cshtml +++ b/NzbDrone.Web/Views/Settings/Naming.cshtml @@ -1,7 +1,6 @@ -@using NzbDrone.Web.Helpers -@model NzbDrone.Web.Models.EpisodeNamingModel +@model NzbDrone.Web.Models.EpisodeNamingModel @{ - Layout = null; + Layout = "_SettingsLayout.cshtml"; }