|
<%= link_to admin_user_path(user), target: "_top" do %>
<%= user.id %>
<% end %>
|
<%= highlight(user.firstname, [ params.dig(:q, :firstname_or_lastname_or_email_cont).to_s, params.dig(:q, :firstname_cont).to_s ]) %>
<%#= user.firstname %>
|
<%= highlight user.lastname, [params.dig(:q, :firstname_or_lastname_or_email_cont).to_s, params.dig(:q, :lastname_cont).to_s] %>
|
<%= icon bool_icon(user.verified), class: "icon #{user.verified ? "text-green-600" : "text-red-600"}", title: "E-Mail-Adresse verifiziert" %>
<%= highlight user.email, [params.dig(:q, :firstname_or_lastname_or_email_cont).to_s, params.dig(:q, :email_start).to_s] %>
|
<%= user.created_jobs.not_canceled.size %>
|
<%= l user.created_at.localtime.to_date %>
|
<% User.roles.keys.each do |role| %>
<% if allowed_to? :change_role?, user %>
<% if user.role == role.to_s %>
<%= button_to role, admin_user_path(user), method: :patch, params: { user: { role: role }}, form_class: "inline", class: "inline-block px-4 py-2 text-sm uppercase font-medium focus:relative bg-role-#{role}-light text-#{role}" %>
<% else %>
<%= button_to role, admin_user_path(user), method: :patch, params: { user: { role: role }}, form_class: "inline", class: "inline-block px-4 py-2 text-sm uppercase font-medium focus:relative hover:bg-role-#{role}-light text-#{role}" %>
<% end %>
<% else %>
<% if user.role == role.to_s %>
<%= role %>
<% else %>
<%= role %>
<% end %>
<% end %>
<% end %>
|