WIP Add member/contributor status to users
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-27 13:32:58 +04:00
parent 4bf6985b87
commit 393f85e45c
9 changed files with 116 additions and 30 deletions

View File

@@ -13,6 +13,16 @@
title: 'Pending',
value: @stats[:users_pending],
) %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Contributors',
value: @stats[:users_contributing],
) %>
<%= render QuickstatsItemComponent.new(
type: :number,
title: 'Sustainers',
value: @stats[:users_paying],
) %>
<% end %>
</section>
@@ -29,8 +39,12 @@
<% @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) : "" %></td>
<td><%= user.is_admin? ? badge("admin", :red) : "" %></td>
<td>
<%= user.confirmed_at.nil? ? badge("pending", :yellow) : "" %>
<%= @contributors.include?(user.cn) ? badge("contributor", :green) : "" %>
<%= @sustainers.include?(user.cn) ? badge("sustainer", :green) : "" %>
</td>
<td><%= @admins.include?(user.cn) ? badge("admin", :red) : "" %></td>
</tr>
<% end %>
</tbody>

View File

@@ -32,6 +32,13 @@
<th>Roles</th>
<td><%= @user.is_admin? ? badge("admin", :red) : "—" %></td>
</tr>
<tr>
<th>Status</th>
<td>
<%= @user.is_contributing_member? ? badge("contributor", :green) : "" %>
<%= @user.is_paying_member? ? badge("sustainer", :green) : "" %>
</td>
</tr>
<tr>
<th>Invited by</th>
<td>