mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-11 13:32:42 +01:00
70bfc49b4e
Edit in popup for Series Grid using custom editing template.
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
@using NzbDrone.Core.Repository;
|
|
@using NzbDrone.Web.Models;
|
|
@model IEnumerable<NzbDrone.Core.Repository.Series>
|
|
|
|
@section TitleContent{
|
|
Series
|
|
}
|
|
|
|
@section ActionMenu{
|
|
@{Html.RenderPartial("SubMenu");}
|
|
}
|
|
|
|
@section MainContent{
|
|
@{Html.Telerik().Grid<SeriesModel>().Name("Grid")
|
|
.TableHtmlAttributes(new { @class = "Grid" })
|
|
.DataKeys(keys =>
|
|
{
|
|
keys.Add(p => p.SeriesId);
|
|
})
|
|
.DataBinding(data => data.Ajax()
|
|
.Select("_AjaxSeriesGrid", "Series")
|
|
.Update("_SaveAjaxSeriesEditing", "Series"))
|
|
.Columns(columns =>
|
|
{
|
|
columns.Bound(o => o.Title)
|
|
.ClientTemplate("<a href=" +
|
|
Url.Action("Details", "Series", new {seriesId = "<#= SeriesId #>"}) +
|
|
"><#= Title #></a>");
|
|
columns.Bound(o => o.SeasonsCount).Title("Seasons");
|
|
columns.Bound(o => o.QualityProfileName).Title("Quality");
|
|
columns.Bound(o => o.Status);
|
|
columns.Bound(o => o.AirsDayOfWeek);
|
|
columns.Bound(o => o.Path);
|
|
columns.Command(commands => commands.Edit().ButtonType(GridButtonType.Image)).Title("Edit").Width(50);
|
|
|
|
})
|
|
.Editable(editor => editor.Mode(GridEditMode.PopUp))
|
|
.Sortable(sort => sort.OrderBy(order => order.Add(o => o.Title).Ascending()).Enabled(true))
|
|
.DetailView(detailView => detailView.ClientTemplate("<div style=\"width:95%\"><#= Overview #></div>"))
|
|
.Render();}
|
|
}
|