sonarr-repo-only/NzbDrone.Web/Views/Settings/Quality.cshtml

110 lines
4.1 KiB
Plaintext
Raw Normal View History

@using NzbDrone.Core.Repository.Quality
@using NzbDrone.Web.Helpers;
@model NzbDrone.Web.Models.QualityModel
2012-10-15 00:50:01 +00:00
@{
Layout = "_SettingsLayout.cshtml";
}
<div id="stylized">
2012-10-15 00:50:01 +00:00
@using (Html.BeginForm("SaveQuality", "Settings", FormMethod.Post, new { id = "QualityForm", name = "QualityForm", @class = "settingsForm" }))
{
2012-10-15 00:50:01 +00:00
<div id="top">
<label class="labelClass">@Html.LabelFor(m => m.DefaultQualityProfileId)
<span class="small">@Html.DescriptionFor(m => m.DefaultQualityProfileId)</span>
</label>
@Html.DropDownListFor(m => m.DefaultQualityProfileId, Model.QualityProfileSelectList, new { @class = "inputClass" })
<br />
<button type="submit" class="save_button" disabled="disabled">Save</button>
</div>
<div class="jquery-accordion">
<h3><a href="#">Profiles</a></h3>
<div id="profileContainer">
<div id="profiles">
</div>
</div>
<h3><a href="#">Size Limits</a></h3>
<div class="sliders">
<div class="infoBox">
Size Limits specify the maximum download size NzbDrone will send to your download client.
</div>
<div id="sliders"></div>
</div>
</div>
}
</div>
2012-02-18 20:00:50 +00:00
2012-10-15 00:50:01 +00:00
@section Scripts {
@Html.IncludeScript("NzbDrone/qualitySettings.js")
2012-11-07 00:41:34 +00:00
2012-11-09 16:28:59 +00:00
@Html.IncludeScript("backbone/apps/qualityProfileApp.js")
@Html.IncludeScript("backbone/apps/qualityTypeApp.js")
2012-11-07 00:41:34 +00:00
@Html.IncludeScript("backbone/constants.js")
2012-11-09 16:28:59 +00:00
@Html.IncludeScript("backbone/models/qualityProfile.js")
@Html.IncludeScript("backbone/models/qualityProfileCollection.js")
2012-11-07 00:41:34 +00:00
@Html.IncludeScript("backbone/views/qualityProfiles.js")
@Html.IncludeScript("backbone/models/qualityType.js")
@Html.IncludeScript("backbone/models/qualityTypeCollection.js")
@Html.IncludeScript("backbone/views/qualityTypes.js")
2012-11-07 00:41:34 +00:00
2012-11-09 16:28:59 +00:00
<script id="QualityProfileTemplate" type="text/template">
2012-12-05 16:34:43 +00:00
<a href="#" class="remove-profile"><i class="icon-remove"></i></a>
<div class="quality-profile-setting">
<label>Name</label>
2012-12-03 03:08:26 +00:00
<input type="text" value="<%= Name %>" class="name" />
</div>
2012-12-05 16:34:43 +00:00
<div class="quality-profile-setting">
<label>Cutoff</label>
2012-12-11 04:39:35 +00:00
<select class="cutoff">
2012-12-03 03:08:26 +00:00
<% _.each(Qualities, function(quality) { %>
<% if (quality.Allowed === true) { %>
<option value="<%= quality.Id %>" <%= quality.Id === Cutoff ? 'selected="selected"' : '' %>><%= quality.Name %></option>
<% } %>
<% }); %>
</select>
</div>
<% var guid = createGuid(); %>
2012-12-03 03:08:26 +00:00
2012-11-24 08:03:38 +00:00
<% _.each(Qualities, function(quality) { %>
<input id="<%= guid %>_<%= quality.Id %>"
2012-12-05 16:34:43 +00:00
class="quality-selectee"
type="checkbox"
value="<%= quality.Allowed %>"
data-quality-id="<%= quality.Id %>"
<%= quality.Allowed ? 'checked="checked"' : '' %>
2012-11-24 08:03:38 +00:00
/>
<label for="<%= guid %>_<%= quality.Id %>"><%= quality.Name %></label>
2012-11-24 08:03:38 +00:00
<% }); %>
2012-11-07 00:41:34 +00:00
</script>
2012-11-09 16:28:59 +00:00
<script id="QualityProfileCollectionTemplate" type="text/template">
2012-12-05 01:21:54 +00:00
<div id="profileHeader">
2012-12-11 04:39:35 +00:00
<a id="add-profile" href="@Url.Action("AddProfile", "Settings")">
2012-12-05 01:21:54 +00:00
<i class="icon-plus icon-large"></i>
Add New Profile
2012-12-11 04:39:35 +00:00
</a>
2012-12-05 01:21:54 +00:00
</div>
2012-11-09 16:28:59 +00:00
</script>
<script id="QualityTypeTemplate" type="text/template">
<b><%= Name %></b>
<div class="slider"></div>
<input type="hidden" value="<%= MaxSize %>" class="slider-value">
30 minute size: <span class="30-minute"></span>MB | 60 minute size: <span class="60-minute"></span>MB
</script>
<script id="QualityTypeCollectionTemplate" type="text/template">
</script>
2012-11-09 16:28:59 +00:00
<script>
2012-12-03 03:08:26 +00:00
$(document).ready(function() {
2012-11-09 16:28:59 +00:00
QualityProfileApp.App.start();
QualityTypeApp.App.start();
2012-11-09 16:28:59 +00:00
});
</script>
2012-11-07 00:41:34 +00:00
}