59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
<%= render HeaderComponent.new(title: "Users") %>
|
|
|
|
<%= 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],
|
|
) %>
|
|
<% if @show_contributors %>
|
|
<%= render QuickstatsItemComponent.new(
|
|
type: :number,
|
|
title: Setting.member_status_contributor.pluralize,
|
|
value: @stats[:users_contributing],
|
|
) %>
|
|
<% end %>
|
|
<% if @show_sustainers %>
|
|
<%= render QuickstatsItemComponent.new(
|
|
type: :number,
|
|
title: Setting.member_status_sustainer.pluralize,
|
|
value: @stats[:users_paying],
|
|
) %>
|
|
<% end %>
|
|
<% end %>
|
|
</section>
|
|
|
|
<section>
|
|
<table class="divided mb-8">
|
|
<thead>
|
|
<tr>
|
|
<th>UID</th>
|
|
<th>Status</th>
|
|
<th>Roles</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<td><%= link_to(user.cn, admin_user_path(user.cn), class: 'ks-text-link') %></td>
|
|
<td>
|
|
<%= user.confirmed_at.nil? ? badge("pending", :yellow) : "" %>
|
|
<% if @show_contributors %><%= @contributors.include?(user.cn) ? badge("contributor", :green) : "" %><% end %>
|
|
<% if @show_sustainers %><%= @sustainers.include?(user.cn) ? badge("sustainer", :green) : "" %><% end %>
|
|
</td>
|
|
<td><%= @admins.include?(user.cn) ? badge("admin", :red) : "" %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%== pagy_nav @pagy %>
|
|
</section>
|
|
<% end %>
|