btcpayserver/BTCPayServer/Views/UIPayoutProcessors/ConfigureStorePayoutProcessors.cshtml
Dennis Reimann d7faa0a0fd Improve payout processors UI
Some quick fixes, closes #3697.
2022-05-10 15:27:39 +02:00

65 lines
2.8 KiB
Text

@using BTCPayServer.Abstractions.Extensions
@model List<BTCPayServer.PayoutProcessors.UIPayoutProcessorsController.StorePayoutProcessorsView>
@{
ViewData["NavPartialName"] = "../UIStores/_Nav";
Layout = "../Shared/_NavLayout.cshtml";
var storeId = Context.GetStoreData().Id;
ViewData.SetActivePage("PayoutProcessors", "Payout Processors", storeId);
}
<div class="row">
<div class="col-xl-8 col-xxl-constrain">
<div class="d-flex align-items-center justify-content-between mb-3">
<h3 class="mb-0">@ViewData["Title"]</h3>
</div>
<p>Payout Processors allow BTCPay Server to handle payouts in an automated way.</p>
@if (Model.Any())
{
foreach (var processorsView in Model)
{
<h4 class="mt-5">@processorsView.Factory.FriendlyName</h4>
<table class="table table-hover mt-0">
<thead>
<tr>
<th>Payment Method</th>
<th class="text-end">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var conf in processorsView.Configured)
{
<tr>
<td>
@conf.Key.ToPrettyString()
</td>
<td class="text-end">
@if (conf.Value is null)
{
<a href="@processorsView.Factory.ConfigureLink(storeId, conf.Key, Context.Request)">Configure</a>
}
else
{
<a href="@processorsView.Factory.ConfigureLink(storeId, conf.Key, Context.Request)">Modify</a>
<span>-</span>
<a asp-action="Remove" asp-route-storeId="@storeId" asp-route-id="@conf.Value.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="The Payout Processor @processorsView.Factory.Processor for @conf.Key.CryptoCode will be removed from your store.">Remove</a>
}
</td>
</tr>
}
</tbody>
</table>
}
}
else
{
<p class="text-secondary mt-3">
There are no processors available.
</p>
}
</div>
</div>
<partial name="_Confirm" model="@(new ConfirmModel("Delete payout processor", "This payout processor will be removed from this store.", "Delete"))" />
@section PageFootContent {
<partial name="_ValidationScriptsPartial"/>
}