NzbDrone has been RAZORfied completely now, die ASPX pages!pull/4/head
parent
13af6663fe
commit
33b67a138c
@ -1,115 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NzbDrone.Core.Repository.Series>" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Edit
|
|
||||||
|
|
||||||
<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', '');
|
|
||||||
});
|
|
||||||
|
|
||||||
function showRequest(formData, jqForm, options) {
|
|
||||||
$("#result").empty().html('Saving Series...');
|
|
||||||
$("#form :input").attr("disabled", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showResponse(responseText, statusText, xhr, $form) {
|
|
||||||
$("#result").empty().html(responseText);
|
|
||||||
$("#form :input").attr("disabled", false);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
|
|
||||||
<h2><%:Html.DisplayTextFor(model => model.Title)%></h2>
|
|
||||||
|
|
||||||
<%
|
|
||||||
Html.EnableClientValidation();%>
|
|
||||||
<%
|
|
||||||
using (Html.BeginForm("Edit", "Series", FormMethod.Post, new {id = "form", name = "form"}))
|
|
||||||
{%>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>Edit</legend>
|
|
||||||
|
|
||||||
<div class="editor-label">
|
|
||||||
<%:Html.LabelFor(model => model.Path)%>
|
|
||||||
</div>
|
|
||||||
<div class="editor-field">
|
|
||||||
<%:Html.TextBoxFor(model => model.Path)%>
|
|
||||||
<%:Html.ValidationMessageFor(model => model.Path)%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="editor-label">
|
|
||||||
<%:Html.LabelFor(model => model.Monitored)%>
|
|
||||||
</div>
|
|
||||||
<div class="editor-field">
|
|
||||||
<%:Html.CheckBoxFor(model => model.Monitored)%>
|
|
||||||
<%:Html.ValidationMessageFor(model => model.Monitored)%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="editor-label">
|
|
||||||
<%:Html.LabelFor(model => model.SeasonFolder)%>
|
|
||||||
</div>
|
|
||||||
<div class="editor-field">
|
|
||||||
<%:Html.CheckBoxFor(model => model.SeasonFolder)%>
|
|
||||||
<%:Html.ValidationMessageFor(model => model.SeasonFolder)%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="editor-label">
|
|
||||||
<%:Html.LabelFor(model => model.QualityProfileId)%>
|
|
||||||
</div>
|
|
||||||
<div class="editor-field">
|
|
||||||
<%:Html.DropDownListFor(model => model.QualityProfileId, (SelectList) ViewData["SelectList"])%>
|
|
||||||
<%:Html.ValidationMessageFor(model => model.QualityProfileId)%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="hidden" style="display:none;">
|
|
||||||
<%:Html.TextBoxFor(model => model.SeriesId)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.Title)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.CleanTitle)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.Status)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.Overview)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.AirsDayOfWeek)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.AirTimes)%>
|
|
||||||
<%:Html.TextBoxFor(model => model.Language)%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<%:Html.ActionLink("Back to Show", "Details", new {seriesId = Model.SeriesId})%> |
|
|
||||||
<%:Html.ActionLink("Back to List", "Index")%>
|
|
||||||
<%:Html.ActionLink("Delete Series", "Delete", new {seriesId = Model.SeriesId})%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="result"></div>
|
|
||||||
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="headerContent" runat="server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="Scripts" runat="server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
|||||||
|
@model NzbDrone.Core.Repository.Series
|
||||||
|
|
||||||
|
@section TitleContent{
|
||||||
|
Edit
|
||||||
|
}
|
||||||
|
|
||||||
|
@section Scripts{
|
||||||
|
<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', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
function showRequest(formData, jqForm, options) {
|
||||||
|
$("#result").empty().html('Saving Series...');
|
||||||
|
$("#form :input").attr("disabled", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
function showResponse(responseText, statusText, xhr, $form) {
|
||||||
|
$("#result").empty().html(responseText);
|
||||||
|
$("#form :input").attr("disabled", false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
|
||||||
|
@section MainContent{
|
||||||
|
<h2>@Html.DisplayTextFor(model => model.Title)</h2>
|
||||||
|
|
||||||
|
@using (Html.BeginForm("Edit", "Series", FormMethod.Post, new { id = "form", name = "form" }))
|
||||||
|
{
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>Edit</legend>
|
||||||
|
|
||||||
|
<div class="editor-label">
|
||||||
|
@Html.LabelFor(model => model.Path)
|
||||||
|
</div>
|
||||||
|
<div class="editor-field">
|
||||||
|
@Html.TextBoxFor(model => model.Path)
|
||||||
|
@Html.ValidationMessageFor(model => model.Path)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="editor-label">
|
||||||
|
@Html.LabelFor(model => model.Monitored)
|
||||||
|
</div>
|
||||||
|
<div class="editor-field">
|
||||||
|
@Html.CheckBoxFor(model => model.Monitored)
|
||||||
|
@Html.ValidationMessageFor(model => model.Monitored)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="editor-label">
|
||||||
|
@Html.LabelFor(model => model.SeasonFolder)
|
||||||
|
</div>
|
||||||
|
<div class="editor-field">
|
||||||
|
@Html.CheckBoxFor(model => model.SeasonFolder)
|
||||||
|
@Html.ValidationMessageFor(model => model.SeasonFolder)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="editor-label">
|
||||||
|
@Html.LabelFor(model => model.QualityProfileId)
|
||||||
|
</div>
|
||||||
|
<div class="editor-field">
|
||||||
|
@Html.DropDownListFor(model => model.QualityProfileId, (SelectList) ViewData["SelectList"])
|
||||||
|
@Html.ValidationMessageFor(model => model.QualityProfileId)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden" style="display:none;">
|
||||||
|
@Html.TextBoxFor(model => model.SeriesId)
|
||||||
|
@Html.TextBoxFor(model => model.Title)
|
||||||
|
@Html.TextBoxFor(model => model.CleanTitle)
|
||||||
|
@Html.TextBoxFor(model => model.Status)
|
||||||
|
@Html.TextBoxFor(model => model.Overview)
|
||||||
|
@Html.TextBoxFor(model => model.AirsDayOfWeek)
|
||||||
|
@Html.TextBoxFor(model => model.AirTimes)
|
||||||
|
@Html.TextBoxFor(model => model.Language)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<input type="submit" id="save_button" value="Save" disabled="disabled" />
|
||||||
|
</p>
|
||||||
|
</fieldset>
|
||||||
|
}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
@Html.ActionLink("Back to Show", "Details", new {seriesId = Model.SeriesId}) |
|
||||||
|
@Html.ActionLink("Back to List", "Index")
|
||||||
|
@Html.ActionLink("Delete Series", "Delete", new {seriesId = Model.SeriesId})
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="result"></div>
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
@model IEnumerable<NzbDrone.Core.Repository.Series>
|
||||||
|
|
||||||
|
@section TitleContent{
|
||||||
|
Series
|
||||||
|
}
|
||||||
|
|
||||||
|
@section ActionMenu{
|
||||||
|
@{Html.RenderPartial("SubMenu");}
|
||||||
|
}
|
||||||
|
|
||||||
|
@section MainContent{
|
||||||
|
@{Html.Telerik().Grid(Model).Name("Grid")
|
||||||
|
.TableHtmlAttributes(new { @class = "Grid" })
|
||||||
|
.Columns(columns =>
|
||||||
|
{
|
||||||
|
columns.Template(c => @Html.ActionLink(c.Title ?? "New Series", "Details",
|
||||||
|
new {seriesId = c.SeriesId})
|
||||||
|
).Title("Title");
|
||||||
|
columns.Bound(o => o.Seasons.Count).Title("Seasons");
|
||||||
|
columns.Bound(o => o.QualityProfile.Name).Title("Quality");
|
||||||
|
columns.Bound(o => o.Status);
|
||||||
|
columns.Bound(o => o.AirsDayOfWeek);
|
||||||
|
columns.Bound(o => o.Path);
|
||||||
|
})
|
||||||
|
.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(false))
|
||||||
|
.Render();}
|
||||||
|
}
|
@ -1,30 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<NzbDrone.Web.Models.SeriesSearchResultModel>>" %>
|
|
||||||
<div id="searchResults">
|
|
||||||
<fieldset>
|
|
||||||
<legend>Search Results</legend>
|
|
||||||
<%
|
|
||||||
if (Model.Count == 0)
|
|
||||||
{%>
|
|
||||||
<b>No results found for the series name</b>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
<%
|
|
||||||
int r = 0;%>
|
|
||||||
<%
|
|
||||||
foreach (var result in Model)
|
|
||||||
{%>
|
|
||||||
<%:Html.RadioButton("selectedSeries", result.TvDbId, r == 0,
|
|
||||||
new {@class = "searchRadio examplePart", id = "searchRadio_" + r})%>
|
|
||||||
<b>
|
|
||||||
<%:result.TvDbName + " (" + result.FirstAired.ToShortDateString()%>)
|
|
||||||
<%:Html.TextBox(result.TvDbName + "_text", result.TvDbName,
|
|
||||||
new {id = result.TvDbId + "_text", style = "display:none"})%>
|
|
||||||
<%
|
|
||||||
|
|
||||||
r++;%>
|
|
||||||
<br />
|
|
||||||
<%
|
|
||||||
}%>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
@ -0,0 +1,30 @@
|
|||||||
|
@model List<NzbDrone.Web.Models.SeriesSearchResultModel>
|
||||||
|
|
||||||
|
<div id="searchResults">
|
||||||
|
<fieldset>
|
||||||
|
<legend>Search Results</legend>
|
||||||
|
@if (Model.Count == 0)
|
||||||
|
{
|
||||||
|
<b>No results found for the series name</b>
|
||||||
|
}
|
||||||
|
|
||||||
|
@{var open = "(";}
|
||||||
|
@{var close = ")";}
|
||||||
|
@{int r = 0;}
|
||||||
|
@foreach (var result in Model)
|
||||||
|
{
|
||||||
|
@Html.RadioButton("selectedSeries", result.TvDbId, r == 0,
|
||||||
|
new {@class = "searchRadio examplePart", id = "searchRadio_" + r})
|
||||||
|
|
||||||
|
|
||||||
|
<b>@result.TvDbName</b> @open @result.FirstAired.ToShortDateString() @close
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
@Html.TextBox(result.TvDbName + "_text", result.TvDbName, new { id = result.TvDbId + "_text", style = "display:none" })
|
||||||
|
r++;
|
||||||
|
}
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
@ -1,21 +0,0 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
|
|
||||||
<%@ Import Namespace="NzbDrone.Web.Controllers" %>
|
|
||||||
<%
|
|
||||||
Html.Telerik().Menu().Name("telerikGrid").Items(items =>
|
|
||||||
{
|
|
||||||
items.Add().Text("Add Series")
|
|
||||||
.Items(
|
|
||||||
subItem =>
|
|
||||||
subItem.Add().Text("New Series").Action
|
|
||||||
<AddSeriesController>(c => c.AddNew()))
|
|
||||||
.Items(
|
|
||||||
subItem =>
|
|
||||||
subItem.Add().Text("Existing Series").Action
|
|
||||||
<AddSeriesController>(c => c.AddExisting()));
|
|
||||||
|
|
||||||
items.Add().Text("Start RSS Sync").Action<SeriesController>(
|
|
||||||
c => c.RssSync());
|
|
||||||
items.Add().Text("Rename All").Action<SeriesController>(
|
|
||||||
c => c.RenameAll());
|
|
||||||
}).Render();
|
|
||||||
%>
|
|
@ -0,0 +1,17 @@
|
|||||||
|
@using NzbDrone.Web.Controllers
|
||||||
|
|
||||||
|
@{Html.Telerik().Menu().Name("telerikGrid").Items(items =>
|
||||||
|
{
|
||||||
|
items.Add().Text("Add Series")
|
||||||
|
.Items(
|
||||||
|
subItem =>
|
||||||
|
subItem.Add().Text("New Series").Action<AddSeriesController>(c => c.AddNew()))
|
||||||
|
.Items(
|
||||||
|
subItem =>
|
||||||
|
subItem.Add().Text("Existing Series").Action<AddSeriesController>(c => c.AddExisting()));
|
||||||
|
|
||||||
|
items.Add().Text("Start RSS Sync").Action<SeriesController>(
|
||||||
|
c => c.RssSync());
|
||||||
|
items.Add().Text("Rename All").Action<SeriesController>(
|
||||||
|
c => c.RenameAll());
|
||||||
|
}).Render();}
|
@ -1,33 +0,0 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<NzbDrone.Core.Repository.Series>>" %>
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
Series
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Menu" ContentPlaceHolderID="ActionMenu" runat="server">
|
|
||||||
<%
|
|
||||||
Html.RenderPartial("SubMenu");
|
|
||||||
%>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<%
|
|
||||||
Html.Telerik().Grid(Model)
|
|
||||||
.Name("Grid")
|
|
||||||
.Columns(columns =>
|
|
||||||
{
|
|
||||||
columns.Template(c =>
|
|
||||||
{
|
|
||||||
%>
|
|
||||||
<%:Html.ActionLink(c.Title ?? "New Series",
|
|
||||||
"Details",
|
|
||||||
new {seriesId = c.SeriesId})%>
|
|
||||||
<%
|
|
||||||
}).Title("Title");
|
|
||||||
columns.Bound(o => o.Seasons.Count).Title("Seasons");
|
|
||||||
columns.Bound(o => o.QualityProfile.Name).Title("Quality");
|
|
||||||
columns.Bound(o => o.Status);
|
|
||||||
columns.Bound(o => o.AirsDayOfWeek);
|
|
||||||
columns.Bound(o => o.Path);
|
|
||||||
})
|
|
||||||
.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(false))
|
|
||||||
.Render();
|
|
||||||
%>
|
|
||||||
</asp:Content>
|
|
@ -1,11 +0,0 @@
|
|||||||
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Web.Mvc.HandleErrorInfo>" %>
|
|
||||||
<asp:Content ID="errorTitle" ContentPlaceHolderID="TitleContent" runat="server">
|
|
||||||
EPIC FAIL!!!
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="errorContent" ContentPlaceHolderID="MainContent" runat="server">
|
|
||||||
<h2>
|
|
||||||
<%:Model.Exception.Message%>
|
|
||||||
</h2>
|
|
||||||
<br />
|
|
||||||
<%:Model.Exception.ToString()%>
|
|
||||||
</asp:Content>
|
|
@ -0,0 +1,15 @@
|
|||||||
|
@model System.Web.Mvc.HandleErrorInfo
|
||||||
|
|
||||||
|
@section TitleContent
|
||||||
|
{
|
||||||
|
EPIC FAIL!!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@section MainContent
|
||||||
|
{
|
||||||
|
<h2>
|
||||||
|
@Model.Exception.Message
|
||||||
|
</h2>
|
||||||
|
<br />
|
||||||
|
@Model.Exception.ToString()
|
||||||
|
}
|
Loading…
Reference in new issue