btcpayserver/BTCPayServer/Views/Stores/StoreUsers.cshtml

56 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-03-23 08:24:57 +01:00
@model StoreUsersViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Users, "Manage users", Context.GetStoreData().StoreName);
2018-03-23 08:24:57 +01:00
}
<div class="row">
<div class="col-lg-8">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<p>
Add access to your store to other users (Guest will not be able to see and modify the store settings)<br/>
Note that the user must have a registered account on this BTCPay Server.
</p>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
2018-03-23 08:24:57 +01:00
<div class="form-inline">
<form method="post">
<input asp-for="Email" type="text" class="form-control" placeholder="user@example.com">
<select asp-for="Role" class="form-control">
<option value="@StoreRoles.Owner">Owner</option>
<option value="@StoreRoles.Guest">Guest</option>
</select>
2018-04-08 07:25:00 +02:00
<button type="submit" role="button" class="form-control btn btn-primary"><span class="fa fa-plus"></span> Add user</button>
2018-03-23 08:24:57 +01:00
</form>
</div>
<div class="form-group">
<table class="table table-sm table-responsive-md">
2018-04-06 06:20:12 +02:00
<thead>
<tr>
<th>Email</th>
<th>Role</th>
<th style="text-align:right">Actions</th>
</tr>
2018-03-23 08:24:57 +01:00
</thead>
<tbody>
@foreach (var user in Model.Users)
{
<tr>
<td>@user.Email</td>
<td>@user.Role</td>
<td style="text-align:right">
<a asp-action="DeleteStoreUser" asp-route-storeId="@Model.StoreId" asp-route-userId="@user.Id">Remove</a>
</td>
</tr>
}
2018-03-23 08:24:57 +01:00
</tbody>
</table>
</div>
</div>
</div>