mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 22:58:28 +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>
90 lines
2.7 KiB
Text
90 lines
2.7 KiB
Text
@model UsersViewModel
|
|
@{
|
|
ViewData.SetActivePageAndTitle(ServerNavPages.Users);
|
|
var nextUserEmailSortOrder = (string)ViewData["NextUserEmailSortOrder"];
|
|
String userEmailSortOrder = null;
|
|
switch (nextUserEmailSortOrder)
|
|
{
|
|
case "asc":
|
|
userEmailSortOrder = "desc";
|
|
break;
|
|
case "desc":
|
|
userEmailSortOrder = "asc";
|
|
break;
|
|
}
|
|
|
|
var sortIconClass = "fa-sort";
|
|
if (userEmailSortOrder != null)
|
|
{
|
|
sortIconClass = $"fa-sort-alpha-{userEmailSortOrder}";
|
|
}
|
|
|
|
var sortByDesc = "Sort by descending...";
|
|
var sortByAsc = "Sort by ascending...";
|
|
}
|
|
|
|
<div class="d-flex align-items-center justify-content-between mb-4">
|
|
<h2 class="mb-0">@ViewData["Title"]</h2>
|
|
<a asp-action="CreateUser" class="btn btn-primary" role="button" id="CreateUser">
|
|
<span class="fa fa-plus"></span> Add User
|
|
</a>
|
|
</div>
|
|
<form
|
|
asp-action="ListUsers"
|
|
asp-route-sortOrder="@(userEmailSortOrder)"
|
|
>
|
|
<div class="input-group">
|
|
<input asp-for="SearchTerm" class="form-control" placeholder="Search by email..." />
|
|
<div class="input-group-append">
|
|
<button type="submit" class="btn btn-secondary" title="Search by email">
|
|
<span class="fa fa-search"></span> Search
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<span asp-validation-for="SearchTerm" class="text-danger"></span>
|
|
</form>
|
|
|
|
<table class="table table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a
|
|
asp-action="ListUsers"
|
|
asp-route-sortOrder="@(nextUserEmailSortOrder ?? "asc")"
|
|
class="text-nowrap"
|
|
title="@(nextUserEmailSortOrder == "desc" ? sortByAsc : sortByDesc)"
|
|
>
|
|
Email
|
|
<span class="fa @(sortIconClass)" />
|
|
</a>
|
|
</th>
|
|
<th>Created</th>
|
|
<th>Verified</th>
|
|
<th class="text-right">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var user in Model.Users)
|
|
{
|
|
<tr>
|
|
<td>@user.Email</td>
|
|
<td>@user.Created?.ToBrowserDate()</td>
|
|
<td class="text-center">
|
|
@if (user.Verified)
|
|
{
|
|
<span class="text-success fa fa-check"></span>
|
|
}
|
|
else
|
|
{
|
|
<span class="text-danger fa fa-times"></span>
|
|
}
|
|
</td>
|
|
<td class="text-right">
|
|
<a asp-action="User" asp-route-userId="@user.Id">Edit</a> <span> - </span> <a asp-action="DeleteUser" asp-route-userId="@user.Id">Remove</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
<vc:pager view-model="Model"></vc:pager>
|