Moved root dir config to add series.

Cleaned up Indexers.cshtml.
Indexers is the new default Settings page.
pull/4/head
Mark McDowall 14 years ago
parent f6578bd535
commit f27c1d89f6

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -334,4 +334,4 @@ button, input[type="button"], input[type="submit"], input[type="reset"]
-khtml-opacity: 0.8;
opacity: 0.8;
line-height: 90%
}
}

@ -3,16 +3,19 @@ using System.Collections.Generic;
using System.IO;
using System.Web.Mvc;
using System.Linq;
using NLog;
using NzbDrone.Core.Helpers;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Providers.Jobs;
using NzbDrone.Core.Repository;
using NzbDrone.Web.Models;
namespace NzbDrone.Web.Controllers
{
public class AddSeriesController : Controller
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly ConfigProvider _configProvider;
private readonly QualityProvider _qualityProvider;
private readonly RootDirProvider _rootFolderProvider;
@ -70,6 +73,8 @@ namespace NzbDrone.Web.Controllers
public ActionResult Add()
{
ViewData["RootDirs"] = _rootFolderProvider.GetAll();
var unmappedList = new List<String>();
var profiles = _qualityProvider.GetAllProfiles();
@ -109,15 +114,25 @@ namespace NzbDrone.Web.Controllers
[HttpPost]
public JsonResult AddNewSeries(string rootPath, string seriesName, int seriesId, int qualityProfileId)
{
var path = rootPath.Replace('|', Path.DirectorySeparatorChar).Replace('^', Path.VolumeSeparatorChar).Replace('`', '\'') +
Path.DirectorySeparatorChar + EpisodeRenameHelper.CleanFilename(seriesName);
try
{
var path =
rootPath.Replace('|', Path.DirectorySeparatorChar).Replace('^', Path.VolumeSeparatorChar).Replace(
'`', '\'') +
Path.DirectorySeparatorChar + EpisodeRenameHelper.CleanFilename(seriesName);
//Create the folder for the new series and then Add it
_diskProvider.CreateDirectory(path);
//Create the folder for the new series and then Add it
_diskProvider.CreateDirectory(path);
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
ScanNewSeries();
return new JsonResult { Data = "ok" };
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
ScanNewSeries();
return new JsonResult {Data = "ok"};
}
catch(Exception ex)
{
return new JsonResult { Data = "failed" };
}
}
public JsonResult AddSeries(string path, int seriesId, int qualityProfileId)
@ -157,5 +172,80 @@ namespace NzbDrone.Web.Controllers
return new SelectList(dataVal, "Id", "SeriesName", selectId);
}
[HttpPost]
public JsonResult SaveRootDir(int id, string path)
{
try
{
_rootFolderProvider.Update(new RootDir { Id = id, Path = path });
}
catch (Exception ex)
{
Logger.Debug("Failed to save Root Dir");
Logger.DebugException(ex.Message, ex);
return new JsonResult { Data = "failed" };
}
return new JsonResult { Data = "ok" };
}
public ViewResult AddRootDir()
{
var rootDir = new RootDir { Path = String.Empty };
var id = _rootFolderProvider.Add(rootDir);
rootDir.Id = id;
ViewData["RootDirId"] = id;
return View("RootDir", rootDir);
}
public ActionResult GetRootDirView(RootDir rootDir)
{
ViewData["RootDirId"] = rootDir.Id;
return PartialView("RootDir", rootDir);
}
public JsonResult DeleteRootDir(int rootDirId)
{
try
{
_rootFolderProvider.Remove(rootDirId);
}
catch (Exception)
{
return new JsonResult { Data = "failed" };
}
return new JsonResult { Data = "ok" };
}
public JsonResult JsonAutoCompletePath(string term)
{
var windowsSep = term.LastIndexOf('\\');
if (windowsSep > -1)
{
var start = term.Substring(windowsSep + 1);
var dirs = _diskProvider.GetDirectories(term.Substring(0, windowsSep + 1)).Where(d => new DirectoryInfo(d).Name.ToLower().StartsWith(start.ToLower())).Take(10);
return Json(dirs.ToArray(), JsonRequestBehavior.AllowGet);
}
var index = term.LastIndexOf('/');
if (index > -1)
{
var start = term.Substring(index + 1);
var dirs = _diskProvider.GetDirectories(term.Substring(0, index + 1)).Where(d => new DirectoryInfo(d).Name.ToLower().StartsWith(start.ToLower())).Take(10);
return Json(dirs.ToArray(), JsonRequestBehavior.AllowGet);
}
return Json(new JsonResult(), JsonRequestBehavior.AllowGet);
}
}
}

@ -62,21 +62,11 @@ namespace NzbDrone.Web.Controllers
ViewData["viewName"] = viewName;
else
return RedirectToAction("General");
return RedirectToAction("Indexers");
return View("Index");
}
public ActionResult General()
{
ViewData["viewName"] = "General";
return View("Index", new SettingsModel
{
Directories = _rootDirProvider.GetAll()
});
}
public ActionResult Indexers()
{
ViewData["viewName"] = "Indexers";
@ -236,40 +226,6 @@ namespace NzbDrone.Web.Controllers
return PartialView("QualityProfileItem", profile);
}
public ViewResult AddRootDir()
{
var rootDir = new RootDir { Path = String.Empty };
var id = _rootDirProvider.Add(rootDir);
rootDir.Id = id;
ViewData["RootDirId"] = id;
return View("RootDir", rootDir);
}
public ActionResult GetRootDirView(RootDir rootDir)
{
ViewData["RootDirId"] = rootDir.Id;
return PartialView("RootDir", rootDir);
}
public JsonResult DeleteRootDir(int rootDirId)
{
try
{
_rootDirProvider.Remove(rootDirId);
}
catch (Exception)
{
return new JsonResult { Data = "failed" };
}
return new JsonResult { Data = "ok" };
}
public ActionResult SubMenu()
{
return PartialView();
@ -317,29 +273,6 @@ namespace NzbDrone.Web.Controllers
}
}
public JsonResult JsonAutoCompletePath(string term)
{
var windowsSep = term.LastIndexOf('\\');
if (windowsSep > -1)
{
var start = term.Substring(windowsSep + 1);
var dirs = _diskProvider.GetDirectories(term.Substring(0, windowsSep + 1)).Where(d => new DirectoryInfo(d).Name.ToLower().StartsWith(start.ToLower())).Take(10);
return Json(dirs.ToArray(), JsonRequestBehavior.AllowGet);
}
var index = term.LastIndexOf('/');
if (index > -1)
{
var start = term.Substring(index + 1);
var dirs = _diskProvider.GetDirectories(term.Substring(0, index + 1)).Where(d => new DirectoryInfo(d).Name.ToLower().StartsWith(start.ToLower())).Take(10);
return Json(dirs.ToArray(), JsonRequestBehavior.AllowGet);
}
return Json(new JsonResult(), JsonRequestBehavior.AllowGet);
}
[HttpPost]
public ActionResult SaveGeneral(SettingsModel data)
{

@ -696,10 +696,9 @@
<Content Include="Views\System\Jobs.cshtml" />
<Content Include="Views\Settings\Sabnzbd.cshtml" />
<Content Include="Views\Settings\EpisodeSorting.cshtml" />
<Content Include="Views\Settings\General.cshtml" />
<Content Include="Views\Settings\Notifications.cshtml" />
<Content Include="Views\Settings\Quality.cshtml" />
<Content Include="Views\Settings\RootDir.cshtml" />
<Content Include="Views\AddSeries\RootDir.cshtml" />
<Content Include="Views\Settings\SubMenu.cshtml" />
<Content Include="Views\Shared\SiteLayout.cshtml" />
<Content Include="Views\Shared\Footer.cshtml" />

@ -1,7 +1,18 @@
@model IEnumerable<String>
@using NzbDrone.Core.Repository
<script type="text/javascript" src="../../Scripts/2011.1.315/telerik.window.min.js"></script>
<style>
.root_dir_text
{
width: 300px;
margin-top: 8px;
margin-left: 3px;
vertical-align: middle;
}
</style>
@section TitleContent{
Add Series
}
@ -21,17 +32,47 @@
.LoadContentFrom("AddNew", "AddSeries")
.Render();
}
@if (Model.Count() == 0)
@{ Html.Telerik().PanelBar()
.Name("RootDirPanel")
.HtmlAttributes(new { style = "margin: 0px;" })
.ExpandMode(PanelBarExpandMode.Multiple)
.Items(panelItem =>
{
@Html.DisplayText("No Series to Add");
panelItem.Add()
.Text("Root Directories")
.ImageUrl("~/Content/Images/VideoFolder.png")
.Content(@<text>
<div style="padding-top: 10px;">
<div style="padding-left: 7px; margin-bottom: 5px;">
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddRootDir", "AddSeries")">
<img src="../../Content/Images/Plus.png" alt="Add New Profile" width="20px" height="20px" />
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Root Directory</h4></a>
</div>
<div id="root-dirs">
@foreach (var root in ViewData["RootDirs"] as List<RootDir>)
{
Html.RenderAction("GetRootDirView", root);
}
</div>
</div>
</text>);
}).Render();
}
<br/>
@Html.Telerik().DropDownList().Name("masterDropbox").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes(
new {style = "width: 100px; margin-left:5px;"}).ClientEvents(events => events.OnChange("masterChanged"))
<button onclick="openAddNewSeries(); return false;" class="listButton" style="margin-left:210px">Add New</button>
@if (Model.Count() == 0)
{
@Html.DisplayText("No Series to Add");
}
@foreach (var path in Model)
{
Html.RenderAction("RenderPartial", "AddSeries", new {path});
@ -39,7 +80,6 @@
}
<script type="text/javascript">
function openAddNewSeries() {
var windowElement = $('#Window');
@ -62,9 +102,72 @@
comboBox.value(masterQuality);
});
}
function testValue() {
var comboBox = $('#qualityList_tester').data("tDropDownList");
comboBox.value('2');
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
function addSeries(guid, path) {
var seriesComboBox = $("#seriesList_" + guid).data("tComboBox");
var qualityComboBox = $("#qualityList_" + guid).data("tDropDownList");
sendToServer(seriesComboBox.value(), path, qualityComboBox.value());
$("#div_" + guid).hide();
}
function sendToServer(id, path, quality) {
$.ajax({
type: "POST",
url: addSeriesUrl,
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
error: function (req, status, error) {
alert("Sorry! We could not add " + path + " at this time. " + error);
}
});
}
$("#addItem").click(function () {
$.ajax({
url: this.href,
cache: false,
success: function (html) { $("#root-dirs").append(html); }
});
return false;
});
var deleteRootDirUrl = '@Url.Action("DeleteRootDir", "AddSeries")';
function deleteRootDir(id) {
sendToServer(id);
}
function sendToServer(id) {
$.ajax({
type: "POST",
url: deleteRootDirUrl,
data: jQuery.param({ rootDirId: id }),
error: function (req, status, error) {
alert("Sorry! We could not delete your Root Directory at this time. " + error);
},
success: function () {
$("#rootDir_" + id).remove();
}
});
}
var saveRootDirUrl = '@Url.Action("SaveRootDir", "AddSeries")';
function saveRootDir(id) {
var path = $('#path_' + id).val();
$.ajax({
type: "POST",
url: saveRootDirUrl,
data: jQuery.param({ id: id, path: path }),
error: function (req, status, error) {
alert("Sorry! We could not save " + path + " at this time. " + error);
},
success: function (data, textStatus, jqXHR) {
if (data != 'ok')
alert("An error occurred while saving Root Directory: " + path);
}
});
}
</script>

@ -53,14 +53,18 @@
url: addNewSeriesUrl,
data: jQuery.param({ rootPath: rootPath, seriesName: seriesName, seriesId: id, qualityProfileId: quality }),
error: function (req, status, error) {
alert("Sorry! We could not add " + path + " at this time. " + error);
alert("Sorry! We could not add " + seriesName + " at this time. " + error);
},
success: function (){
success: function (data, textStatus, jqXHR){
//Clear the search box
$("#seriesList_new").data("tComboBox").text('');
//Close the Window!
closeAddNewSeries();
//Through up an alert if we failed to add the series
if (data != 'ok')
alert("Sorry! We could not add " + seriesName + ", does it already exist?");
else
closeAddNewSeries(); //Close the Window!
}
});
}

@ -5,39 +5,16 @@
<legend>@ViewData["path"].ToString()</legend>
<div>
@{Html.Telerik().ComboBox()
.Name("seriesList_" + ViewData["guid"].ToString())
.Name("seriesList_" + ViewData["guid"])
.BindTo(Model)
.DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400))
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
.HighlightFirstMatch(true)
.HtmlAttributes(new { style = "width: 300px;" })
.Render();}
@Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"].ToString()).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })
@Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"]).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
Add</button>
</div>
</fieldset>
</div>
<script type="text/javascript" language="javascript">
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
function addSeries(guid, path) {
var seriesComboBox = $("#seriesList_" + guid).data("tComboBox");
var qualityComboBox = $("#qualityList_" + guid).data("tDropDownList");
sendToServer(seriesComboBox.value(), path, qualityComboBox.value());
$("#div_" + guid).hide();
}
function sendToServer(id, path, quality) {
$.ajax({
type: "POST",
url: addSeriesUrl,
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
error: function (req, status, error) {
alert("Sorry! We could not add " + path + " at this time. " + error);
}
});
}
</script>
</div>

@ -0,0 +1,16 @@
@model NzbDrone.Core.Repository.RootDir
@{
Layout = null;
}
<div class="rootDirSection" id="rootDir_@(Model.Id)" style="padding: 7px; padding-left: 3px;">
<fieldset style="padding: 5px; height: 40px;">
@Html.TextBoxFor(m => m.Path, new { @class = "root_dir_text", id = "path_" + Model.Id })
<a href="#" class="deleteRow" onclick="deleteRootDir('@ViewData["RootDirId"]')">
<img src="../../Content/Images/X.png" alt="Delete" width="20px" height="20px" style="vertical-align: middle; margin-top: 7px;"/></a>
<input type="button" value="Save" style="padding: 2px 10px 2px 10px; vertical-align: middle; margin: 0px; margin-top: 7px;" onclick="saveRootDir(@Model.Id)"/>
@Html.HiddenFor(x => x.Id, new { id = "id_" + Model.Id })
</fieldset>
</div>

@ -1,88 +0,0 @@
@model NzbDrone.Web.Models.SettingsModel
<script type="text/javascript">
$(document).ready(function () {
var options = {
target: '#result',
beforeSubmit: showRequest,
success: showResponse,
type: 'post',
resetForm: false
};
$('#form').ajaxForm(options);
$('#save_button').attr('disabled', '');
$(".root_dir_text").autocomplete({ url: '@Url.Action("AutoCompletePath", "Settings")', paramName: 'path', minChars: 3, delay: 300, maxCacheLength: 1 });
$(".root_dir_text").autocomplete({
source: '@Url.Action("JsonAutoCompletePath", "Settings")',
minLength: 3
});
});
function showRequest(formData, jqForm, options) {
$("#result").empty().html('Saving...');
$("#form :input").attr("disabled", true);
}
function showResponse(responseText, statusText, xhr, $form) {
$("#result").empty().html(responseText);
$("#form :input").attr("disabled", false);
}
</script>
@using (Html.BeginForm("SaveGeneral", "Settings", FormMethod.Post, new {id = "form", name = "form"}))
{
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.");
<fieldset>
<legend>General</legend>
<div style="padding-top: 10px;">
<div style="padding-left: 7px; margin-bottom: 5px;">
<a id="addItem" style="text-decoration:none;" href="@Url.Action("AddRootDir", "Settings")">
<img src="../../Content/Images/Plus.png" alt="Add New Profile" />
<h4 style="margin-left: 3px; display: inline; color: Black;">Add New Root Directory</h4></a>
</div>
<div id="root-dirs">
@foreach (var item in Model.Directories)
{
Html.RenderAction("GetRootDirView", item);
}
</div>
</div>
<input type="submit" id="save_button" value="Save" disabled="disabled" />
</fieldset>
}
<div id="result" class="hiddenResult"></div>
<script type="text/javascript">
$("#addItem").click(function () {
$.ajax({
url: this.href,
cache: false,
success: function (html) { $("#root-dirs").append(html); }
});
return false;
});
var deleteRootDirUrl = '@Url.Action("DeleteRootDir", "Settings")';
function deleteRootDir(id) {
sendToServer(id);
$("#div_" + id).remove();
}
function sendToServer(id) {
$.ajax({
type: "POST",
url: deleteRootDirUrl,
data: jQuery.param({ rootDirId: id }),
error: function (req, status, error) {
alert("Sorry! We could not delete your Root Directory at this time. " + error);
}
});
}
</script>

@ -63,140 +63,139 @@
.HtmlAttributes(new { style = "width: 300px; margin: 10px;" })
.ExpandMode(PanelBarExpandMode.Single)
.SelectedIndex(0)
.Items(item =>
.Items(indexerItem =>
{
item.Add()
indexerItem.Add()
.Text("NZBs.org")
.ImageUrl("~/Content/Images/Indexers/NzbsOrg.png")
.Content(
"<div class=\"section_content\">" +
.Content(@<text>
<div class="section_content">
<div class="indexer_group">
<div class="indexer_left">
Enabled
</div>
<div class="indexer_right">
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "indexer_checkbox" })
</div>
</div>
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
"Enabled" +
"</div>" +
"<div class=\"indexer_right\">" +
Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "indexer_checkbox" }) +
"</div>" +
"</div>" +
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbsOrgUId) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbsOrgUId) +
"</div>" +
"</div>" +
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbsOrgHash) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbsOrgHash) +
"</div>" +
"</div>" +
"</div>"
);
item.Add()
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbsOrgUId)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbsOrgUId)
</div>
</div>
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbsOrgHash)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbsOrgHash)
</div>
</div>
</div>
</text>);
indexerItem.Add()
.Text("NZB Matrix")
.ImageUrl("~/Content/Images/Indexers/NzbMatrix.png")
.Content(
"<div class=\"section_content\">" +
.Content(@<text>
<div class="section_content">
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
"Enabled" +
"</div>" +
"<div class=\"indexer_right\">" +
Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "indexer_checkbox" }) +
"</div>" +
"</div>" +
<div class="indexer_group">
<div class="indexer_left">
Enabled
</div>
<div class="indexer_right">
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "indexer_checkbox" })
</div>
</div>
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbMatrixUsername) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbMatrixUsername) +
"</div>" +
"</div>" +
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbMatrixApiKey) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbMatrixApiKey) +
"</div>" +
"</div>" +
"</div>"
);
item.Add()
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbMatrixUsername)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbMatrixUsername)
</div>
</div>
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbMatrixApiKey)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbMatrixApiKey)
</div>
</div>
</div>
</text>);
indexerItem.Add()
.Text("NZBsRus")
.ImageUrl("~/Content/Images/Indexers/NzbsRus.png")
.Content(
"<div class=\"section_content\">" +
.Content(@<text>
<div class="section_content">
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
"Enabled" +
"</div>" +
"<div class=\"indexer_right\">" +
Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "indexer_checkbox" }) +
"</div>" +
"</div>" +
<div class="indexer_group">
<div class="indexer_left">
Enabled
</div>
<div class="indexer_right">
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "indexer_checkbox" })
</div>
</div>
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbsrusUId) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbsrusUId) +
"</div>" +
"</div>" +
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NzbsrusHash) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NzbsrusHash) +
"</div>" +
"</div>" +
"</div>"
);
item.Add()
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbsrusUId)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbsrusUId)
</div>
</div>
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NzbsrusHash)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NzbsrusHash)
</div>
</div>
</div>
</text>);
indexerItem.Add()
.Text("Newzbin")
.ImageUrl("~/Content/Images/Indexers/Newzbin.png")
.Content(
"<div class=\"section_content\">" +
.Content(@<text>
<div class="section_content">
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
"Enabled" +
"</div>" +
"<div class=\"indexer_right\">" +
Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "indexer_checkbox" }) +
"</div>" +
"</div>" +
<div class="indexer_group">
<div class="indexer_left">
Enabled
</div>
<div class="indexer_right">
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "indexer_checkbox" })
</div>
</div>
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NewzbinUsername) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NewzbinUsername) +
"</div>" +
"</div>" +
"<div class=\"indexer_group\">" +
"<div class=\"indexer_left\">" +
Html.LabelFor(m => m.NewzbinPassword) +
"</div>" +
"<div class=\"indexer_right\">" +
Html.TextBoxFor(m => m.NewzbinPassword) +
"</div>" +
"</div>" +
"</div>"
);
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NewzbinUsername)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NewzbinUsername)
</div>
</div>
<div class="indexer_group">
<div class="indexer_left">
@Html.LabelFor(m => m.NewzbinPassword)
</div>
<div class="indexer_right">
@Html.TextBoxFor(m => m.NewzbinPassword)
</div>
</div>
</div>
</text>);
}).Render();
}
</div>

@ -1,35 +0,0 @@
@model NzbDrone.Core.Repository.RootDir
@using NzbDrone.Web.Helpers;
@{
Layout = null;
}
<style type="text/css">
.root_dir_text
{
width: 300px;
}
</style>
@using (Html.BeginCollectionItem("Directories"))
{
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
<div class="rootDirSection" id="div_@(ViewData["RootDirId"])">
<fieldset>
<div class="ui-widget">
@Html.TextBoxFor(m => m.Path, new { @class = "root_dir_text" })
<a href="#" class="deleteRow" onclick="deleteRootDir('@ViewData["RootDirId"]')">
<img src="../../Content/Images/X.png" alt="Delete" /></a>
</div>
<div>
@Html.ValidationMessageFor(m => m.Path)
</div>
<div class="hiddenProfileDetails">
@Html.TextBoxFor(x => x.Id, new { @style = "display:none" })
</div>
</fieldset>
</div>
}
Loading…
Cancel
Save