forked from fixin.me/fixin.me
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| <table class="main items" id="users">
 | |
|   <thead>
 | |
|     <tr>
 | |
|       <th><%= User.human_attribute_name(:email).capitalize %></th>
 | |
|       <th><%= User.human_attribute_name(:status).capitalize %></th>
 | |
|       <th><%= User.human_attribute_name(:confirmed_at).capitalize %></th>
 | |
|       <th>
 | |
|         <%= User.human_attribute_name(:created_at).capitalize %> <sup>UTC</sup>
 | |
|       </th>
 | |
|       <th><%= t :actions %></th>
 | |
|     </tr>
 | |
|   </thead>
 | |
|   <tbody>
 | |
|     <% @users.each do |user| %>
 | |
|       <tr>
 | |
|         <td class="link"><%= link_to user, user_path(user) %></td>
 | |
|         <td>
 | |
|           <% if user == current_user %>
 | |
|             <%= user.status %>
 | |
|           <% else %>
 | |
|             <%= form_for user do |u| %>
 | |
|               <%= u.select :status, User.statuses.keys, {}, autocomplete: "off",
 | |
|                 onchange: "this.form.requestSubmit();" %>
 | |
|             <% 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_link_to t(".disguise"), "incognito", disguise_user_path(user) %>
 | |
|           <% end %>
 | |
|         </td>
 | |
|       </tr>
 | |
|     <% end %>
 | |
|   </tbody>
 | |
| </table>
 |