mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 06:47:50 +01:00
* Refactor confirm view: separate modal * Add delete confirmation modals for apps and FIDO2 * Add delete confirmation modals for 2FA actions * Add delete confirmation modals for api keys and webhooks * Add delete confirmation modals for stores and store users * Add delete confirmation modals for LND seed and SSH * Add delete confirmation modals for rate rule scripting * Test fixes and improvements * Add delete confirmation modals for dynamic DNS * Add delete confirmation modals for store access tokens * Add confirmation modals for pull payment archiving * Refactor confirm modal code * Add confirmation input, update wording * Update modal styles * Upgrade ChromeDriver * Simplify and unify confirmation input * Test fixes * Fix wording * Add modals for wallet replace and removal
97 lines
5.5 KiB
Text
97 lines
5.5 KiB
Text
@model StoresViewModel
|
|
@{
|
|
ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Stores");
|
|
var storeNameSortOrder = (string)ViewData["StoreNameSortOrder"];
|
|
var storeWebsiteSortOrder = (string)ViewData["StoreWebsiteSortOrder"];
|
|
var sortByDesc = "Sort by descending...";
|
|
var sortByAsc = "Sort by ascending...";
|
|
}
|
|
|
|
<section>
|
|
<div class="container">
|
|
<partial name="_StatusMessage" />
|
|
|
|
<div class="d-sm-flex align-items-center justify-content-between mb-2">
|
|
<h2 class="mb-0">@ViewData["PageTitle"]</h2>
|
|
<a asp-action="CreateStore" class="btn btn-primary mt-3 mt-sm-0" role="button" id="CreateStore"><span class="fa fa-plus"></span> Create a new store</a>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
@if (Model.Stores.Any())
|
|
{
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a asp-action="ListStores"
|
|
asp-route-sortOrder="@(storeNameSortOrder ?? "asc")"
|
|
asp-route-sortOrderColumn="StoreName"
|
|
class="text-nowrap"
|
|
title="@(storeNameSortOrder == "desc" ? sortByDesc : sortByAsc)">
|
|
Name
|
|
<span class="fa @(storeNameSortOrder == "asc" ? "fa-sort-alpha-desc" : storeNameSortOrder == "desc" ? "fa-sort-alpha-asc" : "fa-sort")" />
|
|
</a>
|
|
</th>
|
|
<th>
|
|
<a asp-action="ListStores"
|
|
asp-route-sortOrder="@(storeWebsiteSortOrder ?? "asc")"
|
|
asp-route-sortOrderColumn="StoreWebsite"
|
|
class="text-nowrap"
|
|
title="@(storeWebsiteSortOrder == "desc" ? sortByDesc : sortByAsc)">
|
|
Website
|
|
<span class="fa @(storeWebsiteSortOrder == "asc" ? "fa-sort-alpha-desc" : storeWebsiteSortOrder == "desc" ? "fa-sort-alpha-asc" : "fa-sort")" />
|
|
</a>
|
|
</th>
|
|
<th style="text-align:right">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var store in Model.Stores)
|
|
{
|
|
<tr id="store-@store.Id">
|
|
<td>
|
|
@if (store.IsOwner)
|
|
{
|
|
<a asp-action="UpdateStore" asp-controller="Stores" asp-route-storeId="@store.Id">@store.Name</a>
|
|
}
|
|
else
|
|
{
|
|
@store.Name
|
|
}
|
|
@if (store.HintWalletWarning)
|
|
{
|
|
<span class="fa fa-warning text-warning" title="Wallet not setup for this store" id="warninghint_@store.Id"></span>
|
|
}
|
|
</td>
|
|
<td>
|
|
@if (!string.IsNullOrEmpty(store.WebSite))
|
|
{
|
|
<a href="@store.WebSite" rel="noreferrer noopener">@store.WebSite</a>
|
|
}
|
|
</td>
|
|
<td style="text-align:right">
|
|
<a asp-action="ListInvoices" asp-controller="Invoice" asp-route-searchTerm="storeid:@store.Id">Invoices</a><span> - </span>
|
|
@if (store.IsOwner)
|
|
{
|
|
<a asp-action="UpdateStore" asp-controller="Stores" asp-route-storeId="@store.Id" id="update-store-@store.Id">Settings</a><span> - </span>
|
|
}
|
|
<a asp-action="DeleteStore" asp-controller="Stores" asp-route-storeId="@store.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="The store <strong>@store.Name</strong> will be permanently deleted. This action will also delete all invoices, apps and data associated with the store." data-confirm-input="DELETE">Delete</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
There are no stores yet.
|
|
</p>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<partial name="_Confirm" model="@(new ConfirmModel("Delete store", "The store will be permanently deleted. This action will also delete all invoices, apps and data associated with the store.", "Delete"))" />
|