btcpayserver/BTCPayServer/Views/UIServer/ListStores.cshtml
d11n 0f8da123b8
UI: Move section navigation to sidebar (#5744)
* UI: Move section navigation to sidebar

* Scroll active nav link into view

* Move CTAs to top right

* Server Settings: Make Policies first page

* Responsive table fixes

* Spacing fixes

* Add breadcrumb samples

* store settings fixes

* payment request fixes

* updates pull payment title

* adds invoice detail fix

* updates server settings breadcrumbs + copy fix

* Don't open Server Settings on Plugins page

* Add breadcrumbs to pull payment views

* adds breadcrumbs to account

* server and store breadcrumb fixes

* fixes access tokens

* Fix payment processor breadcrumbs

* fixes webhook 404

* Final touches

* Fix test

* Add breadcrumb for email rules page

* Design system updates

---------

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2024-06-19 15:23:10 +02:00

76 lines
3 KiB
Text

@model BTCPayServer.Models.StoreViewModels.ListStoresViewModel
@{
Layout = "_Layout";
ViewData.SetActivePage(ServerNavPages.Stores, "Store Overview");
}
<div class="sticky-header">
<h2 class="my-1">@ViewData["Title"]</h2>
</div>
<partial name="_StatusMessage" />
@if (Model.Stores.Any())
{
<table class="table table-hover">
<thead>
<tr>
<th>Store</th>
<th>Users</th>
</tr>
</thead>
<tbody>
@foreach (var store in Model.Stores)
{
var detailsId = $"store_details_{store.StoreId}";
<tr id="store_@store.StoreId" class="mass-action-row">
<td>
<a asp-controller="UIStores" asp-action="Index" asp-route-storeId="@store.StoreId" id="Store-@store.StoreId">
@store.StoreName
</a>
@if (store.Archived)
{
<span class="badge bg-info ms-2">archived</span>
}
</td>
<td>@store.Users.Count User@(store.Users.Count == 1 ? "" : "s")</td>
<td class="text-end">
<div class="d-inline-flex align-items-center gap-2">
<button class="accordion-button collapsed only-for-js ms-0 d-inline-block" type="button" data-bs-toggle="collapse" data-bs-target="#@detailsId" aria-expanded="false" aria-controls="@detailsId">
<vc:icon symbol="caret-down" />
</button>
</div>
</td>
</tr>
<tr id="@detailsId" class="store-details-row collapse">
<td colspan="5" class="border-top-0">
@if (store.Users.Any())
{
<ul class="mb-0 p-0">
@foreach (var user in store.Users)
{
<li class="py-1 d-flex gap-2">
<a asp-controller="UIServer" asp-action="User" asp-route-userId="@user.ApplicationUser.Id">@user.ApplicationUser.Email</a>
<span class="badge bg-light">@user.StoreRoleId</span>
@if (store.Archived)
{
<span class="badge bg-info">archived</span>
}
</li>
}
</ul>
}
else
{
<span class="text-secondary">No users</span>
}
</td>
</tr>
}
</tbody>
</table>
}
else
{
<p class="text-secondary mt-3">
There are no stores yet.
</p>
}