1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-27 02:09:59 +00:00

AddSeries/Index will show the RotoDirs Panel if no root dirs are in the DB.

This commit is contained in:
Mark McDowall 2011-06-06 14:31:08 -07:00
parent 4d3ba62e5d
commit 96670d0567
2 changed files with 7 additions and 0 deletions

View file

@ -79,6 +79,11 @@ public ActionResult Index()
var defaultQuality = Convert.ToInt32(_configProvider.DefaultQualityProfile); var defaultQuality = Convert.ToInt32(_configProvider.DefaultQualityProfile);
var selectList = new SelectList(profiles, "QualityProfileId", "Name", defaultQuality); var selectList = new SelectList(profiles, "QualityProfileId", "Name", defaultQuality);
ViewData["qualities"] = selectList; ViewData["qualities"] = selectList;
ViewData["ShowRootDirs"] = false;
//There are no RootDirs Show the RootDirs Panel
if (rootDirs.Count == 0)
ViewData["ShowRootDirs"] = true;
return View(rootDirs); return View(rootDirs);
} }

View file

@ -42,6 +42,8 @@
panelItem.Add() panelItem.Add()
.Text("Root Directories") .Text("Root Directories")
.ImageUrl("~/Content/Images/VideoFolder.png") .ImageUrl("~/Content/Images/VideoFolder.png")
.Selected((bool)ViewData["ShowRootDirs"])
.Expanded((bool)ViewData["ShowRootDirs"])
.Content(@<text> .Content(@<text>
<div style="padding-top: 10px;"> <div style="padding-top: 10px;">
<div style="padding-left: 7px; margin-bottom: 5px;"> <div style="padding-left: 7px; margin-bottom: 5px;">