forked from External/greenlight
GRN2-6: Added the ability for admins to specify registration method (#520)
* Added the ability to invite users * Small bug fix * Added the ability to approve/decline users * Small bug fixes * More bug fixes * More minor changes * Final changes
This commit is contained in:
committed by
Jesus Federico
parent
adf4b68008
commit
720dac6012
@ -68,11 +68,15 @@
|
||||
<td><%= user.email && user.email != "" ? user.email : user.username%></td>
|
||||
<td><%= user.provider %></td>
|
||||
<td class="text-center">
|
||||
<% roles = user.roles().pluck(:name) %>
|
||||
<% roles = user.roles().pluck(:name) %>
|
||||
<% if roles.include?("denied")%>
|
||||
<div class="user-role btn btn-sm btn-gray-dark">
|
||||
<%= t("roles.banned") %>
|
||||
</div>
|
||||
<% elsif roles.include?("pending") %>
|
||||
<div class="user-role btn btn-sm btn-cyan">
|
||||
<%= t("roles.pending") %>
|
||||
</div>
|
||||
<% elsif roles.include?("super_admin") %>
|
||||
<div class="user-role btn btn-sm btn-red">
|
||||
<%= t("roles.super_admin") %>
|
||||
@ -88,7 +92,21 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% unless roles.include?("super_admin") %>
|
||||
<% if roles.include?("pending") %>
|
||||
<div class="item-action dropdown">
|
||||
<a href="javascript:void(0)" data-toggle="dropdown" class="icon">
|
||||
<i class="fas fa-ellipsis-v px-4"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu">
|
||||
<%= button_to admin_approve_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon far fa-check-circle"></i> <%= t("administrator.users.settings.approve") %>
|
||||
<% end %>
|
||||
<%= button_to admin_ban_path(user_uid: user.uid), class: "dropdown-item" do %>
|
||||
<i class="dropdown-icon far fa-times-circle"></i> <%= t("administrator.users.settings.decline") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% elsif !roles.include?("super_admin") %>
|
||||
<div class="item-action dropdown">
|
||||
<a href="javascript:void(0)" data-toggle="dropdown" class="icon">
|
||||
<i class="fas fa-ellipsis-v px-4"></i>
|
||||
@ -142,3 +160,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "shared/modals/invite_user_modal" %>
|
||||
|
Reference in New Issue
Block a user