mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
organization search page
This commit is contained in:
124
src/Admin/Views/Organizations/Index.cshtml
Normal file
124
src/Admin/Views/Organizations/Index.cshtml
Normal file
@ -0,0 +1,124 @@
|
||||
@model OrganizationsModel
|
||||
@{
|
||||
ViewData["Title"] = "Organizations";
|
||||
}
|
||||
|
||||
<h1>Organizations</h1>
|
||||
|
||||
<form class="form-inline mb-3" method="get">
|
||||
<label class="sr-only" asp-for="Name">Name</label>
|
||||
<input type="text" class="form-control mb-2 mr-2" placeholder="Name" asp-for="Name" name="name">
|
||||
<label class="sr-only" asp-for="UserEmail">User email</label>
|
||||
<input type="text" class="form-control mb-2 mr-2" placeholder="User email" asp-for="UserEmail" name="userEmail">
|
||||
<div class="form-check mr-2 mb-2">
|
||||
<input class="form-check-input" type="checkbox" asp-for="Paid" name="paid">
|
||||
<label class="form-check-label" asp-for="Paid">Paid</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mb-2" title="Search"><i class="fa fa-search"></i> Search</button>
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="width: 190px;">Plan</th>
|
||||
<th style="width: 80px;">Seats</th>
|
||||
<th style="width: 150px;">Created</th>
|
||||
<th style="width: 150px; min-width: 150px;">Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!Model.Items.Any())
|
||||
{
|
||||
<tr>
|
||||
<td colspan="5">No results to list.</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach(var org in Model.Items)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#">@org.Name</a>
|
||||
</td>
|
||||
<td>
|
||||
@org.Plan
|
||||
</td>
|
||||
<td>
|
||||
@org.Seats
|
||||
</td>
|
||||
<td>
|
||||
<span title="@org.CreationDate.ToString()">
|
||||
@org.CreationDate.ToShortDateString()
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@if(!string.IsNullOrWhiteSpace(org.GatewaySubscriptionId))
|
||||
{
|
||||
<i class="fa fa-usd fa-lg fa-fw" title="Paid"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-smile-o fa-lg fa-fw text-muted" title="Freeloader"></i>
|
||||
}
|
||||
@if(org.MaxStorageGb.HasValue && org.MaxStorageGb > 1)
|
||||
{
|
||||
<i class="fa fa-plus-square fa-lg fa-fw"
|
||||
title="Additional Storage, @(org.MaxStorageGb - 1) GB"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-plus-square-o fa-lg fa-fw text-muted"
|
||||
title="No Additional Storage"></i>
|
||||
}
|
||||
@if(org.Enabled)
|
||||
{
|
||||
<i class="fa fa-check-circle fa-lg fa-fw"
|
||||
title="Enabled, expires @(org.ExpirationDate?.ToShortDateString() ?? "-")"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-times-circle-o fa-lg fa-fw text-muted" title="Disabled"></i>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
@if(Model.PreviousPage.HasValue)
|
||||
{
|
||||
<li class="page-item">
|
||||
<a class="page-link" asp-action="Index" asp-route-page="@Model.PreviousPage.Value"
|
||||
asp-route-count="@Model.Count" asp-route-userEmail="@Model.UserEmail"
|
||||
asp-route-name="@Model.Name" asp-route-paid="@Model.Paid">Previous</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
}
|
||||
@if(Model.NextPage.HasValue)
|
||||
{
|
||||
<li class="page-item">
|
||||
<a class="page-link" asp-action="Index" asp-route-page="@Model.NextPage.Value"
|
||||
asp-route-count="@Model.Count" asp-route-userEmail="@Model.UserEmail"
|
||||
asp-route-name="@Model.Name" asp-route-paid="@Model.Paid">Next</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">Next</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
@ -33,6 +33,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" asp-controller="Users">Users</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" asp-controller="Organizations">Organizations</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,12 +7,8 @@
|
||||
|
||||
<form class="form-inline mb-3" method="get">
|
||||
<label class="sr-only" asp-for="Email">Email</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Email" asp-for="Email" name="email">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-primary" title="Search"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" class="form-control mb-2 mr-2" placeholder="Email" asp-for="Email" name="email">
|
||||
<button type="submit" class="btn btn-primary mb-2" title="Search"><i class="fa fa-search"></i> Search</button>
|
||||
</form>
|
||||
|
||||
<div class="table-responsive">
|
||||
@ -21,11 +17,11 @@
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<th style="width: 150px;">Created</th>
|
||||
<th style="width: 150px; min-width: 150px;">Details</th>
|
||||
<th style="width: 170px; min-width: 150px;">Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!Model.Users.Any())
|
||||
@if(!Model.Items.Any())
|
||||
{
|
||||
<tr>
|
||||
<td colspan="4">No results to list.</td>
|
||||
@ -33,7 +29,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@foreach(var user in Model.Users)
|
||||
@foreach(var user in Model.Items)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@ -48,19 +44,29 @@
|
||||
@if(user.Premium)
|
||||
{
|
||||
<i class="fa fa-star fa-lg fa-fw"
|
||||
title="Premium, expires @(user.PremiumExpirationDate?.ToShortDateString() ?? "Never")"></i>
|
||||
title="Premium, expires @(user.PremiumExpirationDate?.ToShortDateString() ?? "-")"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-star-o fa-lg fa-fw text-muted" title="Not Premium"></i>
|
||||
}
|
||||
@if(user.MaxStorageGb.HasValue && user.MaxStorageGb > 1)
|
||||
{
|
||||
<i class="fa fa-plus-square fa-lg fa-fw"
|
||||
title="Additional Storage, @(user.MaxStorageGb - 1) GB"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-plus-square-o fa-lg fa-fw text-muted"
|
||||
title="No Additional Storage"></i>
|
||||
}
|
||||
@if(user.EmailVerified)
|
||||
{
|
||||
<i class="fa fa-check-circle fa-lg fa-fw" title="Email Verified"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-check-circle-o fa-lg fa-fw text-muted" title="Email Not Verified"></i>
|
||||
<i class="fa fa-times-circle-o fa-lg fa-fw text-muted" title="Email Not Verified"></i>
|
||||
}
|
||||
@if(user.TwoFactorIsEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user