2011-07-01 23:33:03 +03:00
|
|
|
@using NzbDrone.Web.Helpers
|
|
|
|
@model NzbDrone.Web.Models.IndexerSettingsModel
|
2011-04-20 02:46:21 +03:00
|
|
|
|
2011-07-01 23:33:03 +03:00
|
|
|
@section HeaderContent{
|
|
|
|
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
|
2011-11-13 23:51:15 +03:00
|
|
|
<link rel="stylesheet" type="text/css" href="../../Content/IndexerSettings.css" />
|
2011-07-01 23:33:03 +03:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.indexerPanel
|
|
|
|
{
|
|
|
|
padding-top: 20px;
|
|
|
|
}
|
2011-11-22 10:14:33 +03:00
|
|
|
|
|
|
|
.additionalInfo
|
|
|
|
{
|
|
|
|
float: right;
|
|
|
|
margin-top: 20px;
|
|
|
|
margin-right: 40px;
|
|
|
|
font-size: 120%;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2011-08-05 07:38:18 +03:00
|
|
|
</style>
|
2011-07-01 23:33:03 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@section TitleContent{
|
|
|
|
Settings
|
|
|
|
}
|
|
|
|
|
|
|
|
@section ActionMenu{
|
|
|
|
@{Html.RenderPartial("SubMenu");}
|
|
|
|
}
|
2011-04-20 02:46:21 +03:00
|
|
|
|
2011-07-01 23:33:03 +03:00
|
|
|
@section MainContent{
|
|
|
|
<div id="stylized">
|
|
|
|
|
2011-11-22 10:14:33 +03:00
|
|
|
<div class="additionalInfo">
|
|
|
|
NzbDrone checks all Indexers every 15 minutes
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2011-10-27 08:46:54 +03:00
|
|
|
@using (Html.BeginForm("SaveIndexers", "Settings", FormMethod.Post, new { id = "form", name = "form", @class = "settingsForm" }))
|
|
|
|
{
|
|
|
|
<h1>Indexers</h1>
|
|
|
|
<p></p>
|
2011-11-22 10:14:33 +03:00
|
|
|
|
2011-10-27 08:46:54 +03:00
|
|
|
@Html.ValidationSummary(true, "Unable to save your settings. Please correct the errors and try again.")
|
|
|
|
<div>
|
2011-07-01 23:33:03 +03:00
|
|
|
@{ Html.Telerik().PanelBar()
|
|
|
|
.Name("PanelBar")
|
2011-11-13 23:51:15 +03:00
|
|
|
//.HtmlAttributes(new { style = "width: 500px; margin: 10px;" })
|
2011-07-01 23:33:03 +03:00
|
|
|
.ExpandMode(PanelBarExpandMode.Single)
|
|
|
|
.SelectedIndex(0)
|
|
|
|
.Items(indexerItem =>
|
|
|
|
{
|
|
|
|
indexerItem.Add()
|
|
|
|
.Text("NZBs.org")
|
|
|
|
.ImageUrl("~/Content/Images/Indexers/Nzbs.org.png")
|
|
|
|
.Content(@<text>
|
|
|
|
<div class="indexerPanel clearfix">
|
2011-09-23 03:18:41 +03:00
|
|
|
<label class="labelClass">Enable
|
2011-07-01 23:33:03 +03:00
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgEnabled)</span>
|
|
|
|
</label>
|
|
|
|
@Html.CheckBoxFor(m => m.NzbsOrgEnabled, new { @class = "inputClass checkClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgUId)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgUId)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbsOrgUId, new { @class = "inputClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbsOrgHash)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsOrgHash)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbsOrgHash, new { @class = "inputClass" })
|
|
|
|
</div>
|
|
|
|
</text>);
|
|
|
|
indexerItem.Add()
|
|
|
|
.Text("NZB Matrix")
|
|
|
|
.ImageUrl("~/Content/Images/Indexers/NzbMatrix.png")
|
|
|
|
.Content(@<text>
|
|
|
|
<div class="indexerPanel clearfix">
|
2011-09-23 03:18:41 +03:00
|
|
|
<label class="labelClass">Enable
|
2011-07-01 23:33:03 +03:00
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixEnabled)</span>
|
|
|
|
</label>
|
|
|
|
@Html.CheckBoxFor(m => m.NzbMatrixEnabled, new { @class = "inputClass checkClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixUsername)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixUsername)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbMatrixUsername, new { @class = "inputClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbMatrixApiKey)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbMatrixApiKey)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbMatrixApiKey, new { @class = "inputClass" })
|
|
|
|
</div>
|
|
|
|
</text>);
|
|
|
|
indexerItem.Add()
|
|
|
|
.Text("NZBsRus")
|
|
|
|
.ImageUrl("~/Content/Images/Indexers/NzbsRus.png")
|
|
|
|
.Content(@<text>
|
|
|
|
<div class="indexerPanel clearfix">
|
2011-09-23 03:18:41 +03:00
|
|
|
<label class="labelClass">Enable
|
2011-07-01 23:33:03 +03:00
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsRUsEnabled)</span>
|
|
|
|
</label>
|
|
|
|
@Html.CheckBoxFor(m => m.NzbsRUsEnabled, new { @class = "inputClass checkClass" })
|
2011-04-20 02:46:21 +03:00
|
|
|
|
2011-07-01 23:33:03 +03:00
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusUId)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsrusUId)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbsrusUId, new { @class = "inputClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NzbsrusHash)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NzbsrusHash)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NzbsrusHash, new { @class = "inputClass" })
|
|
|
|
</div>
|
|
|
|
</text>);
|
|
|
|
indexerItem.Add()
|
|
|
|
.Text("Newzbin")
|
|
|
|
.ImageUrl("~/Content/Images/Indexers/Newzbin.png")
|
|
|
|
.Content(@<text>
|
|
|
|
<div class="indexerPanel clearfix">
|
2011-09-23 03:18:41 +03:00
|
|
|
<label class="labelClass">Enable
|
2011-07-01 23:33:03 +03:00
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NewzbinEnabled)</span>
|
|
|
|
</label>
|
|
|
|
@Html.CheckBoxFor(m => m.NewzbinEnabled, new { @class = "inputClass checkClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NewzbinUsername)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NewzbinUsername)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NewzbinUsername, new { @class = "inputClass" })
|
|
|
|
|
|
|
|
<label class="labelClass">@Html.LabelFor(m => m.NewzbinPassword)
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NewzbinPassword)</span>
|
|
|
|
</label>
|
|
|
|
@Html.TextBoxFor(m => m.NewzbinPassword, new { @class = "inputClass" })
|
|
|
|
</div>
|
|
|
|
</text>);
|
2011-11-13 23:51:15 +03:00
|
|
|
indexerItem.Add()
|
|
|
|
.Text("Newznzb")
|
|
|
|
.ImageUrl("~/Content/Images/Indexers/Newznab.png")
|
|
|
|
.Content(@<text>
|
|
|
|
<div class="indexerPanel clearfix">
|
|
|
|
<label class="labelClass">Enable
|
|
|
|
<span class="small">@Html.DescriptionFor(m => m.NewznabEnabled)</span>
|
|
|
|
</label>
|
|
|
|
@Html.CheckBoxFor(m => m.NewznabEnabled, new { @class = "inputClass checkClass" })
|
|
|
|
</div>
|
|
|
|
<p></p>
|
|
|
|
<a id="addItem" href="@Url.Action("AddNewznabProvider", "Settings")">
|
|
|
|
<img src="../../Content/Images/Plus.png" alt="Add Newznab Provider" width="20px" height="20px" />
|
|
|
|
Add Newznab Provider</a>
|
|
|
|
<div id="newznabProviders">
|
|
|
|
@foreach (var provider in Model.NewznabDefinitions)
|
|
|
|
{
|
|
|
|
Html.RenderAction("GetNewznabProviderView", provider);
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</text>);
|
2011-07-01 23:33:03 +03:00
|
|
|
}).Render();
|
|
|
|
}
|
|
|
|
</div>
|
2011-10-27 08:46:54 +03:00
|
|
|
<br/>
|
|
|
|
<button type="submit" id="save_button" disabled="disabled">Save</button>
|
|
|
|
}
|
2011-07-01 23:33:03 +03:00
|
|
|
|
|
|
|
</div>
|
2011-08-05 07:38:18 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@section Scripts{
|
2011-11-11 05:56:33 +03:00
|
|
|
<script src="../../Scripts/NzbDrone/settingsForm.js" type="text/javascript"></script>
|
2011-11-13 23:51:15 +03:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$("#addItem").live('click', function () {
|
|
|
|
$.ajax({
|
|
|
|
url: this.href,
|
|
|
|
cache: false,
|
|
|
|
success: function (html) {
|
|
|
|
$("#newznabProviders").append(html);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
var deleteNewznabProviderUrl = '@Url.Action("DeleteNewznabProvider", "Settings")';
|
|
|
|
|
|
|
|
function deleteProvider(id) {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
url: deleteNewznabProviderUrl,
|
|
|
|
data: jQuery.param({ providerId: id }),
|
|
|
|
error: function (req, status, error) {
|
|
|
|
alert("Sorry! We could not delete your Provider at this time. " + error);
|
|
|
|
},
|
|
|
|
success: function (data, textStatus, jqXHR) {
|
|
|
|
if (data == "ok") {
|
|
|
|
$("#provider_" + id).remove();
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
alert(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getProviderId(obj) {
|
|
|
|
var parentProviderSection = $(obj).parents('.providerSection');
|
|
|
|
return parentProviderSection.children('.newznabProviderId').val();
|
|
|
|
}
|
|
|
|
|
|
|
|
$(".providerName_textbox").live('keyup', function () {
|
|
|
|
var value = $(this).val();
|
|
|
|
var profileId = getProviderId(this);
|
|
|
|
$("#title_" + profileId).text(value);
|
|
|
|
}).keyup();
|
|
|
|
|
|
|
|
</script>
|
2011-07-01 23:33:03 +03:00
|
|
|
}
|