<commit_before><h1><%= t('activerecord.models.users') %></h1>

<%= render 'details/tab_admin_menu' %>

<table class='table table-striped'>
	<thead>
  <tr>
			<th><%= t 'authentication.name' %></th>
	    <th><%= t 'activerecord.attributes.user.email' %></th>
			<th><%= t('question_mark_inverted') %><%= t('activerecord.attributes.user.admin') %><%= t('question_mark') %></th>
			<th><%= t('actions') %></th>
	  </tr>
	</thead>

	<tbody>
		<% @users.each do |user| %>
		  <tr>
		    <td><%= link_to user.name, detail_path(user) %></td>
				<td><%= user.email %></td>
				<td>
					<% unless user.admin? %>
					  <span class="label label-important">X</span> <%= link_to t('authentication.enable_admin'), make_admin_user_path(user), class: 'btn btn-mini', method: :post %>
					<% else %>
						<span class="label label-success">✓</span> <%= link_to t('authentication.disable_admin'), remove_admin_user_path(user), class: 'btn btn-mini', method: :post %>
					<% end -%>
				</td>
				<td><%= link_to t('edit'), edit_detail_path(user), class: 'btn btn-mini' %><%= link_to t('delete'), Detail.find(user.id), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-mini btn-danger' %></td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= render 'shared/admin_sidebar' %><commit_msg>Improved design of user index buttons.<commit_after><h1><%= t('activerecord.models.users') %></h1>

<%= render 'details/tab_admin_menu' %>

<table class='table table-striped'>
	<thead>
  <tr>
			<th><%= t 'authentication.name' %></th>
	    <th><%= t 'activerecord.attributes.user.email' %></th>
			<th><%= t('question_mark_inverted') %><%= t('activerecord.attributes.user.admin') %><%= t('question_mark') %></th>
			<th><%= t('actions') %></th>
	  </tr>
	</thead>

	<tbody>
		<% @users.each do |user| %>
		  <tr>
		    <td><%= link_to user.name, detail_path(user) %></td>
				<td><%= user.email %></td>
				<td>
					<% unless user.admin? %>
					  <span class="label label-danger">X</span> <%= link_to t('authentication.enable_admin'), make_admin_user_path(user), class: 'btn btn-xs btn-default', method: :post %>
					<% else %>
						<span class="label label-success">✓</span> <%= link_to t('authentication.disable_admin'), remove_admin_user_path(user), class: 'btn btn-xs btn-primary', method: :post %>
					<% end -%>
				</td>
				<td><%= link_to t('edit'), edit_detail_path(user), class: 'btn btn-xs btn-default' %><%= link_to t('delete'), Detail.find(user.id), method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-xs btn-danger' %></td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= render 'shared/admin_sidebar' %>
{'fraction_non_alphanumeric': 0.2393617021276596, 'fraction_numerical': 0.001519756838905775, 'mean_word_length': 4.132553606237817, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4600876', 'n_tokens_mistral': 1145, 'n_tokens_neox': 961, 'n_words': 198}