forked from fixin.me/fixin.me
Add user status update
This commit is contained in:
@@ -12,16 +12,24 @@
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= link_to user.email, user_path(user) %></td>
|
||||
<td><%= user.status %></td>
|
||||
<td class="svg">
|
||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||
</td>
|
||||
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
|
||||
<td class="actions">
|
||||
<% if allow_disguise?(user) %>
|
||||
<%= image_button_to t(".disguise"), "incognito", disguise_user_path(user) %>
|
||||
<td>
|
||||
<% if user == current_user %>
|
||||
<%= user.status %>
|
||||
<% else %>
|
||||
<%= form_for user do |u| %>
|
||||
<%= u.select :status, User.statuses.keys, {}, onchange: "this.form.submit();" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="svg">
|
||||
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
|
||||
</td>
|
||||
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
|
||||
<td class="actions">
|
||||
<% if allow_disguise?(user) %>
|
||||
<%= image_button_to t(".disguise"), "incognito", disguise_user_path(user) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user