Merge remote-tracking branch 'upstream/dev'

This commit is contained in:
Patrick Frisch 2017-04-10 15:34:03 +02:00
commit cd2c9a40e5
283 changed files with 10998 additions and 1985 deletions

View file

@ -1,4 +1,5 @@
@using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.AuthenticationSettings>
@Html.Partial("Shared/Partial/_Sidebar")
@{
@ -17,40 +18,11 @@
<form class="form-horizontal" method="POST" action="@formAction" id="mainForm">
<fieldset>
<legend>Authentication Settings</legend>
<div class="form-group">
<div class="checkbox">
@if (Model.UserAuthentication)
{
<input type="checkbox" id="userAuth" name="UserAuthentication" checked="checked">
<label for="userAuth">Enable User Authentication</label>
}
else
{
<input type="checkbox" id="userAuth" name="UserAuthentication">
<label for="userAuth">Enable User Authentication</label>
}
</div>
</div>
<div class="form-group">
<div class="checkbox">
@if (Model.UsePassword)
{
<input type="checkbox" id="UsePassword" name="UsePassword" checked="checked">
<label id="passLabel" for="UsePassword">Require users to login with their passwords</label>
}
else
{
<input type="checkbox" id="UsePassword" name="UsePassword">
<label id="passLabel" for="UsePassword">Require users to login with their passwords</label>
}
</div>
</div>
@Html.Checkbox(Model.UserAuthentication, "UserAuthentication", "Enable User Authentication", "If enabled we will check the login name against a user in your local users list or Plex/Emby users.")
@Html.Checkbox(Model.UsePassword, "UsePassword", "Require users to login with their passwords", "If enabled, users must provide a valid password to log into Ombi")
<br />
@ -59,7 +31,9 @@
<br />
<p class="form-group">A comma separated list of users that you do not want to login.</p>
<p class="form-group">A comma separated list of users that you do not want to login.
@Html.ToolTip("This is a 'blacklist', if you have users that you do not want to log in, enter them here!")</p>
<div class="form-group">
<label for="DeniedUsers" class="control-label">Denied Users</label>
<div >
@ -83,20 +57,13 @@
$(function () {
var base = '@Html.GetBaseUrl()';
$('.customTooltip').tooltipster({
contentCloning: true
});
changeDisabledStatus($('#UsePassword'), @Model.UserAuthentication.ToString().ToLower(), $('#passLabel'));
if ($('#PlexAuthToken')) {
loadUserList();
}
$('#refreshUsers').click(function (e) {
e.preventDefault();
loadUserList();
});
$('#mainForm').on('click', '#userAuth', function () {
var checked = this.checked;
changeDisabledStatus($('#UsePassword'), checked, $('#passLabel'));
@ -112,41 +79,5 @@
$label.css("color", "grey");
}
}
function loadUserList() {
$('#users').html("");
var url = "getusers";
$.ajax({
type: "Get",
url: url,
dataType: "json",
success: function (response) {
$('#users').html("");
if(!response.result){
generateNotify(response.message,"danger");
$('#users').append("<option>Error!</option>");
return;
}
if (response.users.length > 0) {
$(response.users).each(function () {
$('#users').append("<option>" + this + "</option>");
});
} else {
$('#users').append("<option>No Users, Please refresh!</option>");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#users').html("");
$('#users').append("<option>Error!</option>");
}
});
}
});
</script>

View file

@ -0,0 +1,150 @@
@using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.EmbySettings>
@Html.Partial("Shared/Partial/_Sidebar")
@{
int port;
if (Model.Port == 0)
{
port = 8096;
}
else
{
port = Model.Port;
}
}
<div class="col-sm-8 col-sm-push-1">
<form class="form-horizontal" method="POST" id="mainForm">
<fieldset>
<legend>Emby Settings</legend>
@Html.Checkbox(Model.Enable, "Enable", "Enabled")
<div class="form-group">
<label for="Ip" class="control-label">Emby Hostname or IP</label>
<div>
<input type="text" class="form-control form-control-custom " id="Ip" name="Ip" placeholder="localhost" value="@Model.Ip">
</div>
</div>
<div class="form-group">
<label for="portNumber" class="control-label">Port</label>
<div>
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" value="@port">
</div>
</div>
<div class="form-group">
<div class="checkbox">
@if (Model.Ssl)
{
<input type="checkbox" id="Ssl" name="Ssl" checked="checked"><label for="Ssl">SSL</label>
}
else
{
<input type="checkbox" id="Ssl" name="Ssl"><label for="Ssl">SSL</label>
}
</div>
</div>
@Html.Checkbox(Model.EnableEpisodeSearching, "EnableEpisodeSearching", "Enable Episode Searching")
@Html.ToolTip("This will allow Ombi to search through all of the episodes stored on Emby")
<div class="form-group">
<label for="SubDir" class="control-label">Emby Base Url</label>
<div>
<input type="text" class="form-control form-control-custom " id="SubDir" name="SubDir" value="@Model.SubDir">
</div>
</div>
<div class="form-group">
<label for="ApiKey" class="control-label">Emby Api Key</label>
<div class="">
<input type="text" class="form-control-custom form-control" id="ApiKey" name="ApiKey" placeholder="Api Key" value="@Model.ApiKey">
</div>
</div>
<div class="form-group">
<div>
<button id="testEmby" type="submit" class="btn btn-primary-outline">Test Connectivity <div id="spinner"></div></button>
</div>
</div>
<div class="form-group">
<div>
<button id="save" type="submit" class="btn btn-primary-outline">Submit</button>
</div>
</div>
</fieldset>
</form>
</div>
<script>
$(function () {
var base = '@Html.GetBaseUrl()';
$('#testEmby').click(function (e) {
e.preventDefault();
var url = createBaseUrl(base, '/test/emby');
var $form = $("#mainForm");
$('#spinner').attr("class", "fa fa-spinner fa-spin");
$.ajax({
type: $form.prop("method"),
url: url,
data: $form.serialize(),
dataType: "json",
success: function (response) {
$('#spinner').attr("class", "");
console.log(response);
if (response.result === true) {
generateNotify(response.message, "success");
$('#spinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "warning");
$('#spinner').attr("class", "fa fa-times");
}
},
error: function (e) {
$('#spinner').attr("class", "fa fa-times");
console.log(e);
generateNotify("Something went wrong!", "danger");
}
});
});
$('#save').click(function (e) {
e.preventDefault();
var port = $('#portNumber').val();
if (isNaN(port)) {
generateNotify("You must specify a Port.", "warning");
return;
}
var $form = $("#mainForm");
$.ajax({
type: $form.prop("method"),
data: $form.serialize(),
url: $form.prop("action"),
dataType: "json",
success: function (response) {
if (response.result === true) {
generateNotify(response.message, "success");
} else {
generateNotify(response.message, "warning");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
}
});
});
});
</script>

View file

@ -54,7 +54,7 @@
<p class="form-group">Notice Message</p>
<div class="form-group">
<div>
<textarea rows="4" type="text" class="form-control-custom form-control " id="NoticeMessage" name="NoticeMessage" placeholder="e.g. Plex will be down for maintaince (HTML is allowed)" value="@Model.NoticeMessage">@Model.NoticeMessage</textarea>
<textarea rows="4" type="text" class="form-control-custom form-control " id="NoticeMessage" name="NoticeMessage" placeholder="e.g. The server will be down for maintaince (HTML is allowed)" value="@Model.NoticeMessage">@Model.NoticeMessage</textarea>
</div>
</div>

View file

@ -0,0 +1,105 @@
@using System.Linq
@using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.NewletterSettings>
@Html.Partial("Shared/Partial/_Sidebar")
<div class="col-sm-8 col-sm-push-1">
<form id="massemail" class="form-horizontal">
<fieldset>
<legend>Mass Email</legend>
<!-- Mass Email Section -->
<div style="padding:10px">
<div class="form-group">
<small>Note: This will require you to setup your email notifications</small>
</div>
<div class="form-group">
<label for="massEmailSubject" class="control-label">Subject</label>
<div>
<input type="text" class="form-control form-control-custom " placeholder="A Message from the Admin" id="massEmailSubject" name="massEmailSubject" value="">
</div>
</div>
<div class="form-group">
<label for="massEmailBody" class="control-label">Body</label>
<textarea id="massEmailBody" class="form-control" rows="5"></textarea>
<small>Supports HTML</small>
</div>
<div class="form-group">
<div>
<button id="testSendMassEmailBtn" class="btn btn-primary-outline">Send Test to Admin<div id="testSendMassEmailSpinner"></div></button>
</div>
</div>
<div class="form-group">
<div>
<button id="sendMassEmailBtn" class="btn btn-primary-outline">Send To All Users<div id="sendMassEmailSpinner"></div></button>
</div>
</div>
</div>
<!-- Mass Email Section -->
</fieldset>
</form>
</div>
<script>
$(function () {
$('#testSendMassEmailBtn').click(function (e) {
e.preventDefault();
var base = '@Html.GetBaseUrl()';
var url = createBaseUrl(base, '/admin/testmassadminemail');
$('#testSendMassEmailSpinner').attr("class", "fa fa-spinner fa-spin");
var data = { "Users": "", "Body": $("#massEmailBody").val(), "Subject": $("#massEmailSubject").val() };
$.ajax({
type: "post",
url: url,
data: data,
dataType: "json",
success: function (response) {
if (response.result) {
generateNotify(response.message, "success");
$('#testSendMassEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
});
});
$('#sendMassEmailBtn').click(function (e) {
e.preventDefault();
var base = '@Html.GetBaseUrl()';
var url = createBaseUrl(base, '/admin/sendmassemail');
$('#sendMassEmailSpinner').attr("class", "fa fa-spinner fa-spin");
var data = { "Users": "", "Body": $("#massEmailBody").val(), "Subject": $("#massEmailSubject").val() };
$.ajax({
type: "post",
url: url,
data: data,
dataType: "json",
success: function (response) {
if (response.result) {
generateNotify(response.message, "success");
$('#sendMassEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#sendMassEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#sendMassEmailSpinner').attr("class", "fa fa-times");
}
});
});
});
</script>

View file

@ -7,59 +7,54 @@
<form class="form-horizontal" method="POST" id="mainForm">
<fieldset>
<legend>Newsletter Settings</legend>
<div style="padding:10px">
<!-- Email Nofication Section -->
<div class="form-group">
<div class="checkbox">
<!-- Newsletter Section -->
<div class="form-group">
<div class="checkbox">
<small>Note: This will require you to setup your email notifications</small>
<br />
@if (Model.SendRecentlyAddedEmail)
{
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail" checked="checked"><label for="SendRecentlyAddedEmail">Enable newsletter</label>
}
else
{
<input type="checkbox" id="SendRecentlyAddedEmail" name="SendRecentlyAddedEmail"><label for="SendRecentlyAddedEmail">Enable newslette</label>
}
<small>Note: This will require you to setup your email notifications
</small><span class="customTooltip" title="It also requires users to have the Newsletter feature"><i class="fa fa-info-circle"></i></span>
<br />
<br />
@Html.Checkbox(Model.SendRecentlyAddedEmail, "SendRecentlyAddedEmail", "Enable newsletter")
</div>
</div>
<div class="form-group">
<br>
<label for="CustomUsers" class="control-label">Email Addresses to Send to (For users that are not in your User Management section)</label>
<small>You can add multiple email addresses by using the ; delimiter</small>
<div>
<input type="text" class="form-control form-control-custom " placeholder="first@address.com;second@address.com" id="CustomUsers" name="CustomUsers" value="@Model.CustomUsers">
</div>
</div>
<div class="form-group">
<div>
<button id="recentlyAddedBtn" class="btn btn-primary-outline">Send test email to Admin <div id="testEmailSpinner"></div></button>
</div>
</div>
<br />
<br />
<div class="form-group">
<div>
<button type="submit" id="save" class="btn btn-primary-outline">Save</button>
</div>
</div>
</div>
<div class="form-group">
<br>
<label for="CustomUsers" class="control-label">Email Addresses to Send to (For users that are not in your User Management section)</label>
<small>You can add multiple email address by using the ; delimiter</small>
<div>
<input type="text" class="form-control form-control-custom " placeholder="first@address.com;second@address.com" id="CustomUsers" name="CustomUsers" value="@Model.CustomUsers">
</div>
</div>
<div class="form-group">
<div>
<button id="recentlyAddedBtn" class="btn btn-primary-outline">Send test email to Admin <div id="spinner"></div></button>
</div>
</div>
<br />
<br />
<div class="form-group">
<div>
<button type="submit" id="save" class="btn btn-primary-outline">Submit</button>
</div>
</div>
<!-- Email Nofication Section -->
<!-- Newsletter Section -->
</fieldset>
</form>
</div>
<script>
$(function () {
$('.customTooltip').tooltipster({
contentCloning: true
});
var base = '@Html.GetBaseUrl()';
$('#save').click(function (e) {
@ -90,8 +85,8 @@
$('#recentlyAddedBtn').click(function (e) {
e.preventDefault();
var base = '@Html.GetBaseUrl()';
var url = createBaseUrl(base, '/admin/recentlyAddedTest');
$('#spinner').attr("class", "fa fa-spinner fa-spin");
var url = createBaseUrl(base, '/admin/testnewsletteradminemail');
$('#testEmailSpinner').attr("class", "fa fa-spinner fa-spin");
$.ajax({
type: "post",
url: url,
@ -99,20 +94,20 @@
success: function (response) {
if (response) {
generateNotify(response.message, "success");
$('#spinner').attr("class", "fa fa-check");
$('#testSendMassEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#spinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#spinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
});
});
});
</script>
</script>

View file

@ -17,6 +17,8 @@
<fieldset>
<legend>Plex Settings</legend>
@*<input id="advancedToggle" type="checkbox"/>*@ @*TODO*@
@Html.Checkbox(Model.Enable, "Enable", "Enable")
<div class="form-group">
<label for="Ip" class="control-label">Plex Hostname or IP</label>
<div>
@ -220,6 +222,7 @@
if (response.result === true) {
generateNotify("Success!", "success");
$('#authToken').val(response.authToken);
$('#MachineIdentifier').val(response.identifier);
} else {
generateNotify(response.message, "warning");
}

View file

@ -35,28 +35,59 @@
<fieldset>
<legend>Scheduler Settings</legend>
<small>Please note, you will need to restart for these settings to take effect</small>
<div class="form-group">
<label for="PlexAvailabilityChecker" class="control-label">Plex Availability Checker (min)</label>
<input type="text" class="form-control form-control-custom " id="PlexAvailabilityChecker" name="PlexAvailabilityChecker" value="@Model.PlexAvailabilityChecker">
</div>
<div class="form-group">
<label for="PlexContentCacher" class="control-label">Plex Content Cacher (min)</label>
<input type="text" class="form-control form-control-custom " id="PlexContentCacher" name="PlexContentCacher" value="@Model.PlexContentCacher">
</div>
<div class="form-group">
<label for="PlexUserChecker" class="control-label">Plex User Checker (hours)</label>
<input type="text" class="form-control form-control-custom " id="PlexUserChecker" name="PlexUserChecker" value="@Model.PlexUserChecker">
</div>
@if (Model.Plex)
{
<div class="form-group">
<label for="PlexAvailabilityChecker" class="control-label">Plex Availability Checker (min)</label>
<input type="text" class="form-control form-control-custom " id="PlexAvailabilityChecker" name="PlexAvailabilityChecker" value="@Model.PlexAvailabilityChecker">
</div>
<div class="form-group">
<label for="PlexContentCacher" class="control-label">Plex Content Cacher (min)</label>
<input type="text" class="form-control form-control-custom " id="PlexContentCacher" name="PlexContentCacher" value="@Model.PlexContentCacher">
</div>
<div class="form-group">
<label for="PlexUserChecker" class="control-label">Plex User Checker (hours)</label>
<input type="text" class="form-control form-control-custom " id="PlexUserChecker" name="PlexUserChecker" value="@Model.PlexUserChecker">
</div>
<small>Please note, the minimum time for this to run is 11 hours, if set below 11 then we will ignore that value. This is a very resource intensive job, the less we run it the better.</small>
<div class="form-group">
<label for="PlexEpisodeCacher" class="control-label">Plex Episode Cacher (hours)</label>
<input type="text" class="form-control form-control-custom " id="PlexEpisodeCacher" name="PlexEpisodeCacher" value="@Model.PlexEpisodeCacher">
</div>
}
@if (Model.Emby)
{
<div class="form-group">
<label for="EmbyAvailabilityChecker" class="control-label">Emby Availability Checker (min)</label>
<input type="text" class="form-control form-control-custom " id="EmbyAvailabilityChecker" name="EmbyAvailabilityChecker" value="@Model.EmbyAvailabilityChecker">
</div>
<div class="form-group">
<label for="EmbyContentCacher" class="control-label">Emby Content Cacher (min)</label>
<input type="text" class="form-control form-control-custom " id="EmbyContentCacher" name="EmbyContentCacher" value="@Model.EmbyContentCacher">
</div>
<div class="form-group">
<label for="EmbyUserChecker" class="control-label">Emby User Checker (hours)</label>
<input type="text" class="form-control form-control-custom " id="EmbyUserChecker" name="EmbyUserChecker" value="@Model.EmbyUserChecker">
</div>
<div class="form-group">
<label for="EmbyEpisodeCacher" class="control-label">Emby Episode Cacher (hours)</label>
<input type="text" class="form-control form-control-custom " id="EmbyEpisodeCacher" name="EmbyEpisodeCacher" value="@Model.EmbyEpisodeCacher">
</div>
}
<div class="form-group">
<label for="CouchPotatoCacher" class="control-label">Couch Potato Cacher (min)</label>
<input type="text" class="form-control form-control-custom " id="CouchPotatoCacher" name="CouchPotatoCacher" value="@Model.CouchPotatoCacher">
</div>
<div class="form-group">
<label for="WatcherCacher" class="control-label">Wactcher Cacher (min)</label>
<label for="WatcherCacher" class="control-label">Watcher Cacher (min)</label>
<input type="text" class="form-control form-control-custom " id="WatcherCacher" name="WatcherCacher" value="@Model.WatcherCacher">
</div>
<div class="form-group">
@ -64,11 +95,7 @@
<input type="text" class="form-control form-control-custom " id="RadarrCacher" name="RadarrCacher" value="@Model.RadarrCacher">
</div>
<small>Please note, the minimum time for this to run is 11 hours, if set below 11 then we will ignore that value. This is a very resource intensive job, the less we run it the better.</small>
<div class="form-group">
<label for="PlexEpisodeCacher" class="control-label">Plex Episode Cacher (hours)</label>
<input type="text" class="form-control form-control-custom " id="PlexEpisodeCacher" name="PlexEpisodeCacher" value="@Model.PlexEpisodeCacher">
</div>
<div class="form-group">
<label for="SonarrCacher" class="control-label">Sonarr Cacher (min)</label>
@ -148,13 +175,19 @@
success: function (response) {
if (response.result === true) {
generateNotify("Success!", "success");
ev.removeClass("fa-spin");
ev.addClass("fa-check");
} else {
generateNotify(response.message, "warning");
ev.removeClass("fa-spin");
ev.addClass("fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
ev.removeClass("fa-spin");
ev.addClass("fa-times");
}
});

View file

@ -34,13 +34,14 @@
<small class="control-label">You will have to restart after changing the port.</small>
<div class="form-group">
<label for="BaseUrl" class="control-label">Base Url</label>
<label for="BaseUrl" class="control-label">Base Url @Html.ToolTip("This will make Ombi run with a base url, usually used in reverse proxy scenarios")</label>
<div>
<input type="text" class="form-control form-control-custom " id="BaseUrl" name="BaseUrl" placeholder="Base Url" value="@Model.BaseUrl">
</div>
</div>
<small class="control-label">You will have to restart after changing the url base.</small>
<small class="control-label">You will have to restart after changing the base url.</small>
<div class="form-group">
<label for="ApiKey" class="control-label">Api Key</label>
@ -60,35 +61,12 @@
@Html.Checkbox(Model.SearchForMovies,"SearchForMovies","Search for Movies")
@Html.Checkbox(Model.SearchForActors,"SearchForActors","Search for Movies by Actor")
<div class="form-group">
<div class="checkbox">
@Html.Checkbox(Model.SearchForTvShows, "SearchForTvShows", "Search for TV Shows")
@if (Model.SearchForTvShows)
{
<input type="checkbox" id="SearchForTvShows" name="SearchForTvShows" checked="checked"><label for="SearchForTvShows">Search for TV Shows</label>
}
else
{
<input type="checkbox" id="SearchForTvShows" name="SearchForTvShows"><label for="SearchForTvShows">Search for TV Shows</label>
}
@Html.Checkbox(Model.SearchForMusic, "SearchForMusic", "Search for Music")
</div>
</div>
<div class="form-group">
<div class="checkbox">
@if (Model.SearchForMusic)
{
<input type="checkbox" id="SearchForMusic" name="SearchForMusic" checked="checked"><label for="SearchForMusic">Search for Music</label>
}
else
{
<input type="checkbox" id="SearchForMusic" name="SearchForMusic"><label for="SearchForMusic">Search for Music</label>
}
</div>
</div>
<div class="form-group">
<div class="checkbox">
@ -218,7 +196,9 @@
<script>
$(function () {
$('.customTooltip').tooltipster({
contentCloning: true
});
new Clipboard('.fa-clipboard');

View file

@ -10,6 +10,13 @@
{
port = Model.Port;
}
var rootFolder = string.Empty;
if (!string.IsNullOrEmpty(Model.RootPath))
{
rootFolder = Model.RootPath.Replace("/", "//");
}
}
<div class="col-sm-8 col-sm-push-1">
<form class="form-horizontal" method="POST" id="mainForm">
@ -96,13 +103,6 @@
</div>
</div>
@*<div class="form-group">
<label for="RootPath" class="control-label">Root save directory for TV shows</label>
<div>
<input type="text" class="form-control form-control-custom " placeholder="C:\Media\Tv" id="RootPath" name="RootPath" value="@Model.RootPath">
<label>Enter the root folder where tv shows are saved. For example <strong>C:\Media\TV</strong>.</label>
</div>
</div>*@
<div class="form-group">
<div class="checkbox">
@ -184,7 +184,7 @@
console.log('Hit root folders..');
var rootFolderSelected = '@Model.RootPath';
var rootFolderSelected = '@rootFolder';
if (!rootFolderSelected) {
return;
}

View file

@ -23,7 +23,7 @@
<div class="form-group">
<label for="ApplicationName" class="control-label">Application Name</label>
<label for="ApplicationName" class="control-label">Application Name @Html.ToolTip("Change the name of the application :( I quite like the name Ombi...")</label>
<div>
<input type="text" class="form-control form-control-custom " id="ApplicationName" name="ApplicationName" placeholder="Application Name" value="@Model.Settings.ApplicationName">
@ -34,7 +34,7 @@
<label for="select" class="control-label">Theme</label>
<div id="themes">
<select class="form-control form-control-custom" id="select">
<option @plexTheme class="form-control form-control-custom" value="@Themes.PlexTheme">Plex</option>
<option @plexTheme class="form-control form-control-custom" value="@Themes.PlexTheme">Dark</option>
<option @originalTheme class="form-control form-control-custom" value="@Themes.OriginalTheme">Original Blue</option>
</select>
</div>
@ -104,7 +104,8 @@
</div>
</div>
@Html.Checkbox(Model.Settings.NewSearch, "NewSearch", "Use New Search")
@*@Html.Checkbox(Model.Settings.NewSearch, "NewSearch", "Use New Search")*@
@Html.Checkbox(Model.Settings.EnableIssues, "EnableIssues", "Enable Issues")
<div class="form-group">
<div>
<button type="submit" id="save" class="btn btn-primary-outline">Submit</button>
@ -119,7 +120,11 @@
<script>
$(function() {
$(function () {
$('.customTooltip').tooltipster({
contentCloning: true
});
$('#save').click(function (e) {
e.preventDefault();

View file

@ -22,6 +22,9 @@
<th>
Error Description
</th>
<th>
Delete
</th>
</tr>
</thead>
<tbody>
@ -44,6 +47,7 @@
<td>
@m.Message
</td>
<td class="delete" id="@m.Id"><i class="fa fa-times"></i></td>
</tr>
}
</tbody>
@ -52,57 +56,42 @@
</fieldset>
</div>
@*<script>
<script>
var base = '@Html.GetBaseUrl()';
$('#autoUpdate')
.click(function (e) {
e.preventDefault();
$('body').append("<i class=\"fa fa-spinner fa-spin fa-5x fa-fw\" style=\"position: absolute; top: 20%; left: 50%;\"></i>");
$('#autoUpdate').prop("disabled", "disabled");
document.getElementById("lightbox").style.display = "";
var count = 0;
setInterval(function () {
count++;
var dots = new Array(count % 10).join('.');
document.getElementById('autoUpdate').innerHTML = "Updating" + dots;
}, 1000);
$(function () {
$.ajax({
type: "Post",
url: "autoupdate",
data: { url: "@Model.Status.DownloadUri" },
dataType: "json",
error: function () {
setTimeout(
function () {
location.reload();
}, 30000);
}
});
});
$('.refresh').click(function (e) {
var id = e.currentTarget.id;
$('#saveSettings').click(function (e) {
e.preventDefault();
var $form = $("#mainForm");
var ev = $(e.currentTarget.children[0]);
ev.addClass("fa-spin");
var branches = $("#branches option:selected").val();
var data = $form.serialize();
data = data + "&branch=" + branches;
var url = createLocalUrl("/admin/deleteFault");
$.ajax({
type: $form.prop("method"),
url: $form.prop("action"),
data: data,
type: 'POST',
data: { key: id },
url: url,
dataType: "json",
success: function (response) {
if (response.result === true) {
generateNotify(response.message, "success");
generateNotify("Success!", "success");
ev.removeClass("fa-spin");
ev.addClass("fa-check");
} else {
generateNotify(response.message, "warning");
ev.removeClass("fa-spin");
ev.addClass("fa-exclamation");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
ev.removeClass("fa-spin");
ev.addClass("fa-exclamation");
}
});
});
</script>*@
});
</script>

View file

@ -11,11 +11,20 @@
{
port = Model.Port;
}
var rootFolder = string.Empty;
if (!string.IsNullOrEmpty(Model.RootPath))
{
rootFolder = Model.RootPath.Replace("/", "//");
}
}
<div class="col-sm-8 col-sm-push-1">
<form class="form-horizontal" method="POST" id="mainForm">
<fieldset>
<legend>Radarr Settings</legend>
<input hidden="hidden" name="FullRootPath" id="fullRootPath" value="@Model.FullRootPath" />
@Html.Checkbox(Model.Enabled, "Enabled", "Enabled")
@ -64,10 +73,17 @@
</div>
<div class="form-group">
<label for="RootPath" class="control-label">Root save directory for TV shows</label>
<div>
<input type="text" class="form-control form-control-custom " placeholder="C:\Media\Tv" id="RootPath" name="RootPath" value="@Model.RootPath">
<label>Enter the root folder where movies are saved. For example <strong>C:\Media\TV</strong>.</label>
<button type="submit" id="getRootFolders" class="btn btn-primary-outline">Get Root Folders <div id="getRootFolderSpinner" /></button>
</div>
</div>
<div class="form-group">
<label for="selectRootFolder" class="control-label">Default Root Folders</label>
<div id="rootFolders">
<select class="form-control form-control-custom" id="selectRootFolder"></select>
</div>
</div>
@ -128,6 +144,39 @@
}
</text>
}
@if (!string.IsNullOrEmpty(Model.RootPath))
{
<text>
console.log('Hit root folders..');
var rootFolderSelected = '@rootFolder';
if (!rootFolderSelected) {
return;
}
var $form = $("#mainForm");
$.ajax({
type: $form.prop("method"),
data: $form.serialize(),
url: "sonarrrootfolders",
dataType: "json",
success: function(response) {
response.forEach(function(result) {
$('#selectedRootFolder').html("");
if (result.id == rootFolderSelected) {
$("#selectRootFolder").append("<option selected='selected' value='" + result.id + "'>" + result.path + "</option>");
} else {
$("#selectRootFolder").append("<option value='" + result.id + "'>" + result.path + "</option>");
}
});
},
error: function(e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
}
});
</text>
}
$('#save').click(function(e) {
@ -138,11 +187,14 @@
return;
}
var qualityProfile = $("#profiles option:selected").val();
var rootFolder = $("#rootFolders option:selected").val();
var rootFolderPath = $('#rootFolders option:selected').text();
$('#fullRootPath').val(rootFolderPath);
var $form = $("#mainForm");
var data = $form.serialize();
data = data + "&qualityProfile=" + qualityProfile;
data = data + "&qualityProfile=" + qualityProfile + "&rootPath=" + rootFolder;
$.ajax({
type: $form.prop("method"),
@ -202,6 +254,45 @@
});
});
$('#getRootFolders').click(function (e) {
$('#getRootFolderSpinner').attr("class", "fa fa-spinner fa-spin");
e.preventDefault();
if (!$('#Ip').val()) {
generateNotify("Please enter a valid IP/Hostname.", "warning");
$('#getRootFolderSpinner').attr("class", "fa fa-times");
return;
}
if (!$('#portNumber').val()) {
generateNotify("Please enter a valid Port Number.", "warning");
$('#getRootFolderSpinner').attr("class", "fa fa-times");
return;
}
if (!$('#ApiKey').val()) {
generateNotify("Please enter a valid ApiKey.", "warning");
$('#getRootFolderSpinner').attr("class", "fa fa-times");
return;
}
var $form = $("#mainForm");
$.ajax({
type: $form.prop("method"),
data: $form.serialize(),
url: "radarrrootfolders",
dataType: "json",
success: function (response) {
response.forEach(function (result) {
$('#getRootFolderSpinner').attr("class", "fa fa-check");
$("#selectRootFolder").append("<option value='" + result.id + "'>" + result.path + "</option>");
});
},
error: function (e) {
console.log(e);
$('#getRootFolderSpinner').attr("class", "fa fa-times");
generateNotify("Something went wrong!", "danger");
}
});
});
var base = '@Html.GetBaseUrl()';
$('#testRadarr').click(function (e) {
@ -213,7 +304,7 @@
var data = $form.serialize();
data = data + "&qualityProfile=" + qualityProfile;
var url = createBaseUrl(base, '/test/radarr');
$.ajax({
type: $form.prop("method"),
@ -241,4 +332,4 @@
})
</script>
</script>

View file

@ -33,7 +33,7 @@
</div>
<div class="media-body">
<h4 class="media-heading landing-title" id="statusTitle">Checking...</h4>
The Plex server is <strong><span id="statusText">Loading...</span></strong> (check this page for continuous status updates)
The Media server is <strong><span id="statusText">Loading...</span></strong> (check this page for continuous status updates)
</div>
</div>
</div>

View file

@ -191,18 +191,36 @@
</a>
</div>
<br />
{{#if_eq type "tv"}}
<span>@UI.Search_TV_Show_Status: </span>
{{else}}
<span>@UI.Search_Movie_Status: </span>
{{/if_eq}}
<span class="label label-success">{{status}}</span>
{{#if denied}}
<div>
Denied: <i style="color:red;" class="fa fa-check"></i>
{{#if_eq type "tv"}}
<span>@UI.Search_TV_Show_Status: </span>
{{else}}
<span>@UI.Search_Movie_Status: </span>
{{/if_eq}}
<span class="label label-success">{{status}}</span>
</div>
<div>
<span>Request status: </span>
{{#if available}}
<span class="label label-success">@UI.Requests_Available</span>
{{else}}
{{#if approved}}
<span class="label label-info">@UI.Search_Processing_Request</span>
{{else if denied}}
<span class="label label-danger">@UI.Search_Request_denied</span>
{{#if deniedReason}}
<span class="customTooltip" title="{{deniedReason}}"><i class="fa fa-info-circle"></i></span>
{{/if}}
{{else}}
<span class="label label-warning">@UI.Search_Pending_approval</span>
{{/if}}
{{/if}}
</div>
{{#if denied}}
<div>
Denied: <i style="color:red;" class="fa fa-check"></i>
</div>
{{/if}}
@ -211,26 +229,7 @@
{{else}}
<div>@UI.Requests_ReleaseDate: {{releaseDate}}</div>
{{/if_eq}}
{{#unless denied}}
<div>
@UI.Common_Approved:
{{#if_eq approved false}}
<i id="{{requestId}}notapproved" class="fa fa-times"></i>
{{/if_eq}}
{{#if_eq approved true}}
<i class="fa fa-check"></i>
{{/if_eq}}
</div>
{{/unless}}
<div>
@UI.Requests_Available
{{#if_eq available false}}
<i id="availableIcon{{requestId}}" class="fa fa-times"></i>
{{/if_eq}}
{{#if_eq available true}}
<i id="availableIcon{{requestId}}" class="fa fa-check"></i>
{{/if_eq}}
</div>
<br/>
{{#if_eq type "tv"}}
{{#if episodes}}
@ -246,7 +245,7 @@
<div>@UI.Requests_RequestedDate: {{requestedDate}}</div>
{{#if admin}}
{{#if currentRootPath}}
<div>Root Path: {{currentRootPath}}</div>
<div class="{{requestId}}rootPathMain">Root Path: <span id="{{requestId}}currentRootPath">{{currentRootPath}}</span></div>
{{/if}}
{{/if}}
<div>
@ -282,18 +281,18 @@
</form>
<form method="POST" action="@formAction/requests/changeRootFolder" id="changeFolder{{requestId}}">
<form method="POST" action="@formAction/requests/changeRootFolder{{#if_eq type "tv"}}tv{{else}}movie{{/if_eq}}" id="changeFolder{{requestId}}">
<input name="requestId" type="text" value="{{requestId}}" hidden="hidden" />
{{#if_eq hasRootFolders true}}
<div class="btn-group btn-split">
<button type="button" class="btn btn-sm btn-success-outline approve" id="{{requestId}}" custom-button="{{requestId}}">@*<i class="fa fa-plus"></i>*@ Change Root Folder</button>
<button type="button" class="btn btn-sm btn-success-outline" id="changeRootFolderBtn{{requestId}}" custom-button="{{requestId}}">@*<i class="fa fa-plus"></i>*@ Change Root Folder</button>
<button type="button" class="btn btn-success-outline dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">@UI.Requests_ToggleDropdown</span>
</button>
<ul class="dropdown-menu">
{{#each rootFolders}}
<li><a href="#" class="change-root-folder" id="{{id}}">{{path}}</a></li>
<li><a href="#" class="change-root-folder" id="{{id}}" requestId="{{requestId}}">{{path}}</a></li>
{{/each}}
</ul>
</div>

View file

@ -8,12 +8,14 @@
{
url = "/" + baseUrl.ToHtmlString();
}
}
<div>
<div hidden="hidden" id="useNewSearch">@Model.CustomizationSettings.NewSearch</div>
<h1 id="searchTitle">@UI.Search_Title</h1>
<h4>@UI.Search_Paragraph</h4>
<h4>@string.Format(UI.Search_Paragraph, Model.Emby ? "Emby" : "Plex")</h4>
<br />
<!-- Nav tabs -->
@ -25,6 +27,13 @@
<a id="movieTabButton" href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-film"></i> @UI.Search_Movies</a>
</li>
@if (Model.Settings.SearchForActors)
{
<li role="presentation">
<a id="actorTabButton" href="#ActorsTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-users"></i> @UI.Search_Actors</a>
</li>
}
}
@if (Model.Settings.SearchForTvShows)
{
@ -70,8 +79,28 @@
<div id="movieList">
</div>
</div>
}
@if (Model.Settings.SearchForActors)
{
<!-- Actors tab -->
<div role="tabpanel" class="tab-pane" id="ActorsTab">
<div class="input-group">
<input id="actorSearchContent" type="text" class="form-control form-control-custom form-control-search form-control-withbuttons">
<div class="input-group-addon">
<i id="actorSearchButton" class="fa fa-search"></i>
</div>
</div>
<div class="checkbox">
<input type="checkbox" id="actorsSearchNew" name="actorsSearchNew"><label for="actorsSearchNew">@UI.Search_NewOnly</label>
</div>
<br />
<br />
<!-- Movie content -->
<div id="actorMovieList">
</div>
</div>
}
}
@if (Model.Settings.SearchForTvShows)
{
@ -121,7 +150,7 @@
}
<script id="search-templateNew" type="text/x-handlebars-template">
<script id="search-templateNew" type="text/x-handlebars-template">
<div class="row">
<div id="{{id}}imgDiv" class="col-sm-2">
@ -161,7 +190,7 @@
<div class="col-md-7 col-xs-7">
{{#if available}}
<span class="label label-success">@UI.Search_Available_on_plex</span>
<span class="label label-success">@UI.Search_Available</span>
{{else}}
{{#if approved}}
<span class="label label-info">@UI.Search_Processing_Request</span>
@ -207,7 +236,9 @@
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button>
<br />
<br />
{{#if url}}
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>
{{/if}}
{{else}}
{{#if_eq requested true}}
<button style="text-align: right" class="btn btn-primary-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Requested</button>
@ -283,7 +314,7 @@
</script>
<!-- Movie and TV Results template -->
<script id="search-template" type="text/x-handlebars-template">
<script id="search-template" type="text/x-handlebars-template">
<div class="row">
<div id="{{id}}imgDiv" class="col-sm-2">
@ -309,13 +340,11 @@
<h4>
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
{{title}} ({{year}})
</a>{{#if status}}<span class="label label-primary" style="font-size:60%" target="_blank">{{status}}</span>{{/if}}
</h4>
{{/if_eq}}
{{#if status}}
<span class="label label-info" target="_blank">{{status}}</span>
{{/if}}
{{#if firstAired}}
<span class="label label-info" target="_blank">Air Date: {{firstAired}}</span>
@ -325,7 +354,7 @@
<span class="label label-info" target="_blank">Release Date: {{releaseDate}}</span>
{{/if}}
{{#if available}}
<span class="label label-success">@UI.Search_Available_on_plex</span>
<span class="label label-success">@UI.Search_Available</span>
{{else}}
{{#if approved}}
<span class="label label-info">@UI.Search_Processing_Request</span>
@ -338,7 +367,7 @@
<span id="{{id}}netflixTab"></span>
{{#if homepage}}
<a href="{{homepage}}" target="_blank"><span class="label label-info">HomePage</span></a>
{{/if}}
@ -357,9 +386,11 @@
{{#if_eq type "movie"}}
{{#if_eq available true}}
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button>
{{#if url}}
<br />
<br />
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>
{{/if}}
{{else}}
{{#if_eq requested true}}
<button style="text-align: right" class="btn btn-primary-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Requested</button>
@ -375,7 +406,7 @@
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button><br />
{{else}}
{{#if_eq enableTvRequestsForOnlySeries true}}
<button id="{{id}}" style="text-align: right" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline{{/if}} btn-primary-outline dropdownTv" season-select="0" type="button"><i class="fa fa-plus"></i> @UI.Search_Request</button>
<button id="{{id}}" style="text-align: right" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline dropdownTv{{/if}} btn-primary-outline" season-select="0" type="button" {{#if available}}disabled{{/if}}><i class="fa fa-plus"></i> {{#if available}}@UI.Search_Available{{else}}@UI.Search_Request{{/if}}</button>
{{else}}
<div class="dropdown">
<button id="{{id}}" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline{{/if}} dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@ -396,9 +427,11 @@
</div>
{{/if_eq}}
{{#if available}}
{{#if url}}
<br />
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>
{{/if}}
{{/if}}
{{/if_eq}}
{{/if_eq}}
@ -432,7 +465,7 @@
<!-- Music Results template -->
<script id="music-template" type="text/x-handlebars-template">
<script id="music-template" type="text/x-handlebars-template">
<div class="row">
<div id="{{id}}imageDiv" class="col-sm-2">
{{#if coverArtUrl}}
@ -458,7 +491,9 @@
<input name="{{type}}Id" type="text" value="{{id}}" hidden="hidden" />
{{#if_eq available true}}
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button><br />
{{#if url}}
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>
{{/if}}
{{else}}
{{#if_eq requested true}}
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Requested</button>
@ -575,3 +610,4 @@
</script>
@Html.LoadSearchAssets()

View file

@ -26,6 +26,23 @@
console.log(e);
}
});
var gravatarUrl = createBaseUrl(base, 'layout/gravatar');
$.ajax({
url: gravatarUrl,
success: function (result) {
if (result.result) {
$('#gravatarImg').html("<img src=\"" + result.message + "\" class=\"gravatar\" width=\"30\" height=\"30\" alt=\"\">");
}
},
error: function (xhr, status, error) {
console.log("error " + error);
}
});
// End Check for update
checkCacheInProgress();

View file

@ -52,6 +52,9 @@
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<a id="gravatarImg" class="navbar-brand" href="#">
</a>
@if (Html.IsAdmin())
{
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
@ -77,7 +80,7 @@
</li>
}
else if (Html.IsPlexUser()) // Logged in but not admin
else if (Html.IsExternalUser()) // Logged in but not admin
{
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> @UI.Layout_Welcome @Context.CurrentUser.UserName <span class="caret"></span></a>
@ -101,19 +104,19 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-language" aria-hidden="true"><span class="caret"></span></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="@url/culture?l=en&u=@Context.Request.Path">@UI.Layout_English</a></li>
<li><a href="@url/culture?l=fr&u=@Context.Request.Path">@UI.Layout_French</a></li>
<li><a href="@url/culture?l=nl&u=@Context.Request.Path">@UI.Layout_Dutch</a></li>
<li><a href="@url/culture?l=es&u=@Context.Request.Path">@UI.Layout_Spanish</a></li>
<li><a href="@url/culture?l=de&u=@Context.Request.Path">@UI.Layout_German</a></li>
<li><a href="@url/culture?l=da&u=@Context.Request.Path">@UI.Layout_Danish</a></li>
<li><a href="@url/culture?l=pt&u=@Context.Request.Path">@UI.Layout_Portuguese</a></li>
<li><a href="@url/culture?l=sv&u=@Context.Request.Path">@UI.Layout_Swedish</a></li>
<li><a href="@url/culture?l=it&u=@Context.Request.Path">@UI.Layout_Italian</a></li>
</ul>
<li />
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-language" aria-hidden="true"><span class="caret"></span></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="@url/culture?l=en&u=@Context.Request.Path">@UI.Layout_English</a></li>
<li><a href="@url/culture?l=fr&u=@Context.Request.Path">@UI.Layout_French</a></li>
<li><a href="@url/culture?l=nl&u=@Context.Request.Path">@UI.Layout_Dutch</a></li>
<li><a href="@url/culture?l=es&u=@Context.Request.Path">@UI.Layout_Spanish</a></li>
<li><a href="@url/culture?l=de&u=@Context.Request.Path">@UI.Layout_German</a></li>
<li><a href="@url/culture?l=da&u=@Context.Request.Path">@UI.Layout_Danish</a></li>
<li><a href="@url/culture?l=pt&u=@Context.Request.Path">@UI.Layout_Portuguese</a></li>
<li><a href="@url/culture?l=sv&u=@Context.Request.Path">@UI.Layout_Swedish</a></li>
<li><a href="@url/culture?l=it&u=@Context.Request.Path">@UI.Layout_Italian</a></li>
</ul>
<li/>
</ul>
</div>
</div>
@ -129,7 +132,7 @@
var donationText = $("#donationText");
donateLink.attr("href", result.url);
if (result.message) {
donationText.text(result.message);
donationText.text(result.message);
}
}
},
@ -138,6 +141,8 @@
$("#customDonate").hide();
}
});
</script>
<div id="updateAvailable" hidden="hidden"></div>

View file

@ -9,6 +9,7 @@
@Html.GetSidebarUrl(Context, "/admin/authentication", "Authentication", "glyphicon glyphicon-lock")
@Html.GetSidebarUrl(Context, "/admin/usermanagementsettings", "User Management Settings", "glyphicon glyphicon-user")
@Html.GetSidebarUrl(Context, "/admin/plex", "Plex", "glyphicon glyphicon-play-circle")
@Html.GetSidebarUrl(Context, "/admin/emby", "Emby", "glyphicon glyphicon-play-circle")
@Html.GetSidebarUrl(Context, "/admin/couchpotato", "CouchPotato", "glyphicon glyphicon-film")
@Html.GetSidebarUrl(Context, "/admin/watcher", "Watcher (beta)", "glyphicon glyphicon-film")
@Html.GetSidebarUrl(Context, "/admin/radarr", "Radarr (beta)", "glyphicon glyphicon-film")
@ -16,6 +17,7 @@
@Html.GetSidebarUrl(Context, "/admin/sickrage", "SickRage", "fa fa-tv")
@Html.GetSidebarUrl(Context, "/admin/headphones", "Headphones (beta)", "glyphicon glyphicon-headphones")
@Html.GetSidebarUrl(Context, "/admin/newsletter", "Newsletter Settings", "fa fa-newspaper-o")
@Html.GetSidebarUrl(Context, "/admin/massemail", "Mass Email", "fa fa-reply-all")
<div id="sidebar" >
<a href="#notifications" class="list-group-item" data-parent="#sidebar">
@ -39,7 +41,7 @@
@Html.GetSidebarUrl(Context, "/admin/logs", "Logs", "fa fa-edit")
@Html.GetSidebarUrl(Context, "/admin/status", "Status", "fa fa-dashboard")
@Html.GetSidebarUrl(Context, "/admin/status", "Updates", "fa fa-dashboard")
@Html.GetSidebarUrl(Context, "/admin/scheduledjobs", "Scheduled Jobs", "fa fa-hand-spock-o")
@Html.GetSidebarUrl(Context, "/admin/faultqueue", "Request Fault Queue", "fa fa-history")
</div>
@ -48,8 +50,12 @@
</div>
<script>
$('#sidebar > a').on('click', function (e) {
e.preventDefault();
$('.customTooltip').tooltipster({
contentCloning: true
});
if (!$(this).hasClass("active")) {
var lastActive = $(this).closest("#sidebar").children(".active");

View file

@ -4,79 +4,131 @@
<div id="lightbox" style="display:none"></div>
<div class="col-sm-8 col-sm-push-1">
<fieldset>
<legend>Status</legend>
<legend>Updates</legend>
<div class="form-group">
<label class="control-label">Current Version: </label>
<label class="control-label">@Model.Status.CurrentVersion</label>
</div>
@if (Model.Status.UpdateAvailable)
{
<div class="form-group">
<label class="control-label">New Version: </label>
<label class="control-label">@Model.Status.NewVersion</label>
</div>
}
<form id="mainForm" method="post" action="save">
<div class="form-group">
<label for="select" class="control-label">Code Branch</label>
<div id="branches">
<select class="form-control form-control-custom" id="select">
@foreach (var b in Model.BranchDropdown)
{
if (b.Selected)
{
<option selected='selected' value='@b.Value'>@b.Name</option>
}
else
{
<option value='@b.Value'>@b.Name</option>
}
}
</select>
</div>
</div>
<button id="saveSettings" class="btn btn-success-outline">Save</button>
</form>
<div class="form-group">
<label class="control-label">Update Available: </label>
@if (Model.Status.UpdateAvailable)
{
<label class="control-label"><a href="@Model.Status.UpdateUri" target="_blank"><i class="fa fa-check"></i></a></label>
<ul class="nav nav-tabs">
<li class="active"><a href="#status" data-toggle="tab" aria-expanded="true">Status</a></li>
<li id="changesTab" class=""><a href="#changes" data-toggle="tab" aria-expanded="false">Recent Changes</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="status">
<br />
<input id="args" class="form-control form-control-custom " placeholder="optional launch arguments e.g. /etc/mono /opt/PlexRequests.exe">
<br/>
<button id="autoUpdate" class="btn btn-success-outline">Automatic Update (beta) <i class="fa fa-download"></i></button>
}
else
{
<label class="control-label"><i class="fa fa-times"></i></label>
}
<div class="form-group">
<label class="control-label">Current Version: </label>
<label class="control-label">@Model.Status.CurrentVersion</label>
</div>
@if (Model.Status.UpdateAvailable)
{
<div class="form-group">
<label class="control-label">New Version: </label>
<label class="control-label">@Model.Status.NewVersion</label>
</div>
}
<hr />
<form id="mainForm" method="post" action="save">
<div class="form-group">
<label for="select" class="control-label">Code Branch</label>
<div id="branches">
<select class="form-control form-control-custom" id="select">
@foreach (var b in Model.BranchDropdown)
{
if (b.Selected)
{
<option selected='selected' value='@b.Value'>@b.Name</option>
}
else
{
<option value='@b.Value'>@b.Name</option>
}
}
</select>
</div>
</div>
<button id="saveSettings" class="btn btn-success-outline">Save</button>
</form>
<hr />
<div class="form-group">
<label class="control-label">Update Available: </label>
@if (Model.Status.UpdateAvailable)
{
<label class="control-label"><a href="@Model.Status.UpdateUri" target="_blank"><i class="fa fa-check"></i></a> @Html.ToolTip("Click the 'tick' to manually go to the page")</label>
<br />
<br />
<label class="control-label">Launch Arguments</label>
@Html.ToolTip("This is if you run Ombi outside of a regular install e.g. you are launching with a custom port. This field will be used after we have updated to launch the application.")
<input id="args" class="form-control form-control-custom " placeholder="/etc/mono /opt/Ombi.exe">
<br />
<button id="autoUpdate" class="btn btn-success-outline">Automatic Update (beta) <i class="fa fa-download"></i></button>
}
else
{
<label class="control-label"><i class="fa fa-times"></i></label>
}
</div>
<hr />
@if (Model.Status.UpdateAvailable)
{
<h2>
<a href="@Model.Status.DownloadUri">@Model.Status.ReleaseTitle</a>
</h2>
<hr />
<label>Release Notes:</label>
@Html.Raw(Model.Status.ReleaseNotes)
}
</div>
<div class="tab-pane fade" id="changes">
<br />
<div id="changesArea"></div>
</div>
</div>
@if (Model.Status.UpdateAvailable)
{
<h2>
<a href="@Model.Status.DownloadUri">@Model.Status.ReleaseTitle</a>
</h2>
<hr />
<label>Release Notes:</label>
@Html.Raw(Model.Status.ReleaseNotes)
}
</fieldset>
</div>
<script>
<script id="changes-template" type="text/x-handlebars-template">
<fieldset>
<div class="col-md-12">
<h4 class="col-md-2">
{{version}}
</h4>
<h5 class="col-md-4">
<span class="date">
- <span title="" data-original-title="Sunday, March 12 2017 10:30am">{{date}}</span>
</span>
</h5>
<h6 class="col-md-6">
<span class="status">
<span class="label label-default">{{branch}}</span>
{{#if installed}}
<span class="label label-success">Installed</span>
{{/if}}
</span>
</h6>
</div><hr />
<div class="col-md-12">
{{message}}
</div>
</fieldset>
<br />
<br />
</script>
<script>
$('.customTooltip').tooltipster({
contentCloning: true
});
var base = '@Html.GetBaseUrl()';
$('#autoUpdate')
.click(function (e) {
@ -131,4 +183,28 @@
}
});
});
var changesSource = $("#changes-template").html();
var changesTemplate = Handlebars.compile(changesSource);
var changesLoaded = false;
$('#changesTab').click(function (e) {
e.preventDefault();
if (changesLoaded) return;
var url = createBaseUrl(base, "/admin/changes");
$area = $('#changesArea');
$.ajax({
type: 'GET',
url: url,
dataType: "json",
success: function (response) {
$(response).each(function (index, item) {
item.date = moment.utc(item.data).local().format('lll');
var html = changesTemplate(item);
$area.append(html);
});
changesLoaded = true;
return;
}
});
});
</script>

View file

@ -6,7 +6,7 @@
<h1>@UI.UserLogin_Title</h1>
<div>
<p>
@UI.UserLogin_Paragraph <span title="@UI.UserLogin_Paragraph_SpanHover"><i class="fa fa-question-circle"></i></span>
@string.Format(UI.UserLogin_Paragraph, Html.GetMediaServerName().ToHtmlString()).ToString()
</p>
</div>
<div id="contentBody">
@ -14,10 +14,10 @@
<input id="dateTimeOffset" name="DateTimeOffset" hidden="hidden" />
<div>
<div>
<label>@UI.UserLogin_Username</label>
<label>Username</label>
</div>
<div>
<input id="username" class="form-control form-control-custom" type="text" name="Username" placeholder="@UI.UserLogin_Username_Placeholder" />
<input id="username" class="form-control form-control-custom" type="text" name="Username" placeholder="Username" />
</div>
</div>
<br />

View file

@ -1,4 +1,4 @@
@using Ombi.UI.Helpers
@using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.UserManagementSettings>
@Html.Partial("Shared/Partial/_Sidebar")
@ -9,7 +9,7 @@
<span>Here you can manage the default permissions and features that your users get</span>
<small>
Note: This will not update your users that are currently there, this is to set the default settings to any users added outside of Ombi e.g. You share your Plex Server with a new user, they will be added into Ombi
Note: This will not update your users that are currently there, this is to set the default settings to any users added outside of Ombi e.g. You share your Server with a new user, they will be added into Ombi
automatically and will take the permissions and features you have selected below.
</small>
@ -25,6 +25,7 @@
@Html.Checkbox(Model.UsersCanViewOnlyOwnIssues, "UsersCanViewOnlyOwnIssues", "Users can only view their own issues")
@Html.Checkbox(Model.UsersCanViewOnlyOwnRequests, "UsersCanViewOnlyOwnRequests", "Users can only view their own requests")
@Html.Checkbox(Model.BypassRequestLimit, "BypassRequestLimit", "Bypass the request limit")
@Html.Checkbox(Model.ViewUsers, "ViewUsers", "User can see who made requests")

View file

@ -13,7 +13,6 @@
<img class="landing-header" src="@formAction/Content/images/logo.png" width="300" />
<div id="area" class="landing-block shadow">
<div class="media">
<div id="contentBody" class="media-body">
<h4 class="media-heading landing-title" id="statusTitle">Welcome to Ombi</h4>
@ -31,6 +30,60 @@
<!--Templates-->
<script id="mediaApplicationChoice" type="text/html">
<div>
<h4 class="media-heading landing-title wizard-heading" id="statusTitle">Please choose your media server</h4>
<div class="form-group">
<div class="row">
<a href="#" id="embyImg">
<img class="wizard-img" src="@formAction/Content/images/emby-logo-dark.jpg" />
</a>
</div>
<div class="row">
<a href="#" id="plexImg">
<img class="wizard-img" src="@formAction/Content/images/plex-logo-reversed.png" />
</a>
</div>
</div>
</div>
</script>
<script id="embyApiKey" type="text/html">
<form method="post" action="@formAction/wizard/embyAuth" id="embyAuthForm">
<h4 class="media-heading landing-title">Emby Authentication</h4>
<div class="form-group">
<label for="Ip" class="control-label">Emby Hostname or IP Address</label>
<div>
<input type="text" class="form-control form-control-custom " id="Ip" name="Ip" placeholder="192.168.1.1">
</div>
</div>
<div class="form-group">
<label for="portNumber" class="control-label">Port</label>
<div>
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="8096">
</div>
</div>
<div class="form-group">
<div class="checkbox">
<input type="checkbox" id="Ssl" name="Ssl"><label for="Ssl">SSL</label>
</div>
</div>
<div class="form-group">
<label for="username" class="control-label">Api Key</label>
<div>
<input type="text" class="form-control form-control-custom" id="apiKey" name="ApiKey" placeholder="ApiKey">
</div>
</div>
<div style="text-align: center; margin-top: 20px">
<a href="#" id="embyApiKeySave" class="btn btn-primary-outline">Next <div id="spinner"></div></a>
</div>
</form>
</script>
<script id="plexAuthArea" type="text/html">
<form method="post" action="@formAction/wizard/plexAuth" id="plexAuthForm">
<h4 class="media-heading landing-title">Plex Authentication</h4>
@ -103,7 +156,7 @@
<input type="checkbox" id="SearchForMusic" name="SearchForMusic"><label id="SearchForMusicLabel" for="SearchForMusic">Allow searching for Music</label>
</div>
</div>
<div class="form-group">
<div style="text-align: center; margin-top: 20px">
<a href="#" id="submitPlexRequest" class="btn btn-primary-outline">Next</a>
@ -139,7 +192,7 @@
<script id="adminArea" type="text/html">
<form method="post" action="@formAction/wizard/createuser" id="adminForm">
<h4 class="media-heading landing-title">Create the Admin account</h4>
<small>This account will be used to configure your settings and also manage all of the requests. Note: this should not be the same as your Plex.Tv account (you can change this later in the User Management Settings)</small>
<small>This account will be used to configure your settings and also manage all of the requests. Note: this should not be the same as your Plex/Emby account (you can change this later in the User Management Settings)</small>
<div class="form-group">
<div>
<label for="adminUsername">Username</label><input type="text" class="form-control form-control-custom" id="adminUsername" name="Username" placeholder="Username">