<commit_before><% 
	add_body_class "users"
	@page_title = "Users" 
%>

<h2 class="section"><%= link_to "Users", users_path %></h2>
<% if @online_users && @online_users.length > 0 %>
	<p>
		<% if @online_users.length == 1 %>
			<strong>1</strong> user is online right now:
		<% else %>
			<strong><%= @online_users.length %></strong> user are online right now:
		<% end %>
		<%= @online_users.map{|u| profile_link(u)}.to_sentence %>.
	</p>
<% else %>
	<p>No users are online!</p>
<% end %>

<table class="list users_list">
	<tr>
		<th>Username</th>
		<th>Location</th>
		<th>Last active</th>
		<th>Member since</th>
		<th>Discussions/Posts</th>
		<th></th>
	</tr>
	<% @users.each do |user| %><tr>
		<td class="username"><%= profile_link(user) %></td>
		<td class="location"><%= h user.location %></td>
		<td class="last_active"><%= (user.online?) ? "<strong>Online now</strong>" : formatted_time(user.last_active) %></td>
		<td class="member_since"><%= formatted_time user.created_at %></td>
		<td class="post_count"><%= user.discussions_count %>/<%= user.posts_count %></td>
		<td class="status">
			<% if user.banned? %>
				<span class="banned">Banned!</span>
			<% elsif user.admin? %>
				<span class="admin">Admin</span>
			<% end %>
		</td><commit_msg>Invite link<commit_after><% 
	add_body_class "users"
	@page_title = "Users" 
%>

<h2 class="section"><%= link_to "Users", users_path %></h2>
<% if @online_users && @online_users.length > 0 %>
	<p>
		<% if @online_users.length == 1 %>
			<strong>1</strong> user is online right now:
		<% else %>
			<strong><%= @online_users.length %></strong> user are online right now:
		<% end %>
		<%= @online_users.map{|u| profile_link(u)}.to_sentence %>.
	</p>
<% else %>
	<p>No users are online!</p>
<% end %>

<% if @current_user.user_admin? %>
	<p>You are a user administrator, you can <%= link_to "invite a new person", new_user_path %>.</p>
<% end %>

<table class="list users_list">
	<tr>
		<th>Username</th>
		<th>Location</th>
		<th>Last active</th>
		<th>Member since</th>
		<th>Discussions/Posts</th>
		<th></th>
	</tr>
	<% @users.each do |user| %><tr>
		<td class="username"><%= profile_link(user) %></td>
		<td class="location"><%= h user.location %></td>
		<td class="last_active"><%= (user.online?) ? "<strong>Online now</strong>" : formatted_time(user.last_active) %></td>
		<td class="member_since"><%= formatted_time user.created_at %></td>
		<td class="post_count"><%= user.discussions_count %>/<%= user.posts_count %></td>
		<td class="status">
			<% if user.banned? %>
				<span class="banned">Banned!</span>
			<% elsif user.admin? %>
				<span class="admin">Admin</span>
			<% end %>
		</td>
{'fraction_non_alphanumeric': 0.23016171493042498, 'fraction_numerical': 0.00376081233546446, 'mean_word_length': 4.352112676056338, 'pattern_counts': {'":': 0, '<': 136, '<?xml version=': 0, '>': 138, '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': '4600875', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1010, 'n_words': 215}