akkounts/app/views/admin/ldap_users/index.html.erb
Râu Cao d9e767298b
All checks were successful
continuous-integration/drone/push Build is passing
Refactor admin users page, add quick stats
2023-02-13 16:32:28 +08:00

55 lines
1.3 KiB
Plaintext

<%= render HeaderComponent.new(title: "LDAP Users: #{@ou}") %>
<%= render MainSimpleComponent.new do %>
<section>
<%= render QuickstatsContainerComponent.new do %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Confirmed',
value: @stats[:users_confirmed],
) %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Pending',
value: @stats[:users_pending],
) %>
<% end %>
</section>
<% if @orgs.length > 1 %>
<section>
<h3 class="hidden">Domains</h3>
<ul>
<% @orgs.each do |org| %>
<li class="inline-block">
<%= link_to org[:ou], admin_ldap_users_path(ou: org[:ou]), class: "ks-text-link" %>
</li>
<% end %>
</ul>
</section>
<% end %>
<section>
<table>
<thead>
<tr>
<th>UID</th>
<th>E-Mail</th>
<th>Admin</th>
<!-- <th>Password</th> -->
</tr>
</thead>
<tbody>
<% @entries.each do |entry| %>
<tr>
<td><%= entry[:uid] %></td>
<td><%= entry[:mail] %></td>
<td><%= entry[:admin] %></td>
<!-- <td><%= entry[:password] %></td> -->
</tr>
<% end %>
</tbody>
</table>
</section>
<% end %>