btcpayserver/BTCPayServer/Views/PaymentRequest/GetPaymentRequests.cshtml

119 lines
5.7 KiB
Plaintext
Raw Normal View History

2019-01-14 22:43:29 +01:00
@using BTCPayServer.Services.PaymentRequests
@model BTCPayServer.Models.PaymentRequestViewModels.ListPaymentRequestsViewModel
@{
Layout = "_Layout";
ViewData["Title"] = "Payment Requests";
2019-01-14 22:43:29 +01:00
}
<section>
<div class="container">
@if (TempData.HasStatusMessage())
{
<div class="row">
<div class="col-lg-12 text-center">
2020-05-08 12:33:47 +02:00
<partial name="_StatusMessage"/>
</div>
2019-01-14 22:43:29 +01:00
</div>
}
2019-01-14 22:43:29 +01:00
<div class="row">
2019-11-01 21:55:05 +01:00
<div class="col-lg-12 section-heading">
<h2>Payment Requests</h2>
<hr class="primary">
2019-01-14 22:43:29 +01:00
</div>
</div>
2019-11-01 22:15:02 +01:00
<div class="row button-row">
<div class="col-lg-12">
2019-05-12 10:13:26 +02:00
<a asp-action="EditPaymentRequest" class="btn btn-primary" role="button" id="CreatePaymentRequest"><span class="fa fa-plus"></span> Create a new payment request</a>
2020-06-11 16:09:33 +02:00
<a href="https://docs.btcpayserver.org/PaymentRequests/" target="_blank">
2020-05-08 12:33:47 +02:00
<span class="fa fa-question-circle-o" title="More information..."></span>
</a>
2019-01-14 22:43:29 +01:00
</div>
</div>
<div class="row">
2019-11-01 22:15:02 +01:00
<div class="col-lg-12">
<table class="table table-sm table-responsive-md">
<thead>
2020-05-08 12:33:47 +02:00
<tr>
<th>Title</th>
<th>Expiry</th>
<th class="text-right">Price</th>
<th class="text-right">Status</th>
<th class="text-right">Actions</th>
</tr>
2019-11-01 22:15:02 +01:00
</thead>
<tbody>
2020-05-08 12:33:47 +02:00
@foreach (var item in Model.Items)
{
<tr>
<td>@item.Title</td>
<td>@(item.ExpiryDate?.ToString("g") ?? "No Expiry")</td>
<td class="text-right">@item.Amount @item.Currency</td>
<td class="text-right">@item.Status</td>
<td class="text-right">
<a asp-action="EditPaymentRequest" asp-route-id="@item.Id">Edit</a>
<span> - </span>
<a asp-action="ViewPaymentRequest" asp-route-id="@item.Id">View</a>
<span> - </span>
<a target="_blank" asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchterm="@($"orderid:{PaymentRequestRepository.GetOrderIdForPaymentRequest(item.Id)}")">Invoices</a>
<span> - </span>
<a target="_blank" asp-action="PayPaymentRequest" asp-route-id="@item.Id">Pay</a>
<span> - </span>
<a target="_blank" asp-action="ClonePaymentRequest" asp-route-id="@item.Id">Clone</a>
<span> - </span>
<a asp-action="TogglePaymentRequestArchival" asp-route-id="@item.Id">@(item.Archived ? "Unarchive" : "Archive")</a>
</td>
</tr>
}
2019-11-01 22:15:02 +01:00
</tbody>
</table>
2020-05-08 12:33:47 +02:00
<div class="d-flex ">
<nav aria-label="...">
<ul class="pagination">
<li class="page-item @(Model.Skip == 0 ? "disabled" : null)">
<a class="page-link" tabindex="-1" href="@Url.Action("GetPaymentRequests", new
{
skip = Math.Max(0, Model.Skip - Model.Count),
count = Model.Count,
})">
Previous
</a>
</li>
<li class="page-item disabled">
<span class="page-link">@(Model.Skip + 1) to @(Model.Skip + Model.Count) of @Model.Total</span>
</li>
<li class="page-item @(Model.Total > (Model.Skip + Model.Count) ? null : "disabled")">
<a class="page-link" href="@Url.Action("GetPaymentRequests", new
{
skip = Model.Skip + Model.Count,
count = Model.Count,
})">
Next
</a>
</li>
</ul>
</nav>
<a class="ml-2 mt-1" href="@Url.Action("GetPaymentRequests", new
{
skip = Model.Skip,
count = Model.Count,
searchTerm = "includearchived:"+ !Model.IncludeArchived
2020-05-08 12:33:47 +02:00
})">
@if (Model.IncludeArchived)
{
<span> Hide archived payment requests. </span>
}
else
{
<span> Show archived payment requests.</span>
}
</a>
</div>
2019-11-01 22:15:02 +01:00
</div>
2019-01-14 22:43:29 +01:00
</div>
</div>
</section>