|
|
@ -1,6 +1,7 @@
|
|
|
|
@using Nancy.Security
|
|
|
|
@using Nancy.Security
|
|
|
|
@using Nancy.Session
|
|
|
|
@using Nancy.Session
|
|
|
|
@using Nancy;
|
|
|
|
@using Nancy;
|
|
|
|
|
|
|
|
@using PlexRequests.Core.SettingModels
|
|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
@using PlexRequests.UI.Helpers
|
|
|
|
@using PlexRequests.UI.Models
|
|
|
|
@using PlexRequests.UI.Models
|
|
|
|
@using PlexRequests.UI.Resources
|
|
|
|
@using PlexRequests.UI.Resources
|
|
|
@ -38,10 +39,11 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<li><a id="donate" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: red"></i> @UI.Layout_Donate</a></li>
|
|
|
|
<li><a id="donate" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: red"></i> @UI.Layout_Donate</a></li>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
<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>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if (!Context.CurrentUser.IsAuthenticated() && Context.Request.Session[SessionKeys.UsernameKey] == null) // TODO replace with IsAdmin
|
|
|
|
@if (!Context.CurrentUser.IsAuthenticated() && Context.Request.Session[SessionKeys.UsernameKey] == null) // TODO replace with IsAdmin
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -91,5 +93,28 @@
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
var base = '@Html.GetBaseUrl()';
|
|
|
|
|
|
|
|
var url = createBaseUrl(base, '/customDonation');
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: url,
|
|
|
|
|
|
|
|
success: function (result) {
|
|
|
|
|
|
|
|
console.log("we win + " + result.url);
|
|
|
|
|
|
|
|
if (result.url && result.url != "donationLinkError") {
|
|
|
|
|
|
|
|
$("#customDonate").show();
|
|
|
|
|
|
|
|
var donateLink = $("#customDonateHref");
|
|
|
|
|
|
|
|
var donationText = $("#donationText");
|
|
|
|
|
|
|
|
donateLink.attr("href", result.url);
|
|
|
|
|
|
|
|
if(result.message) {
|
|
|
|
|
|
|
|
donationText.text(result.message);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function(xhr, status, error) {
|
|
|
|
|
|
|
|
console.log("error " + error);
|
|
|
|
|
|
|
|
$("#customDonate").hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<div id="updateAvailable" hidden="hidden"></div>
|
|
|
|
<div id="updateAvailable" hidden="hidden"></div>
|
|
|
|
</nav>
|
|
|
|
</nav>
|