mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 06:47:50 +01:00
* Improve and unify page headers * Altcoin test fixes * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Fix missing store name in pairing view * Fix CanUsePairing test * Bump header navigation font size * Use partial tag instead of Html.PartialAsync in views As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper). * Fix docs link As in #2432. * Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
95 lines
5 KiB
Text
95 lines
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-sm">
|
|
<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">@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">Remove</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
There are no stores yet.
|
|
</p>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|