<%= link_to "View profile", admin_profile_path(@user) %>
<%= link_to "Send new support ticket", admin_new_ticket_path(user_id: @user.id) %>
<%= link_to "View conversations", admin_conversations_path(@user) %>
<% if @user.is_vendor? %><%= link_to "Products (#{@user.products.count})", admin_products_path(filter_vendor: @user.displayname) %>
Total sales revenue: <%= currency_format(@revenue) %> <%= admin_user.currency %>
<%end%>Disabled means the authenticated user's requests to pages that require authentication will not work but their session remains valid. They will see an error message on every request. Even logging out will not be possible. This is a way to deal with a problem user or browser and could be implemented programatically (App sensor).
However, if current time is past disabled_until, then the disabled setting has no effect. This allows restoring access without making a database update.
<%= form_for([:admin, @user], method: 'patch', url: admin_user_path(@user), html: { class: 'form-horizontal' }) do |f| %>Current setting is <%= @user.disabled_until || 'nil'%>. Nil means permanently disabled.
Fraction to use for commission. If nil, system setting is used (<%=Rails.configuration.commission%>).