<commit_before><h2><%= current_user.admin? ? "Mailing Lists" : "My Lists" %></h2>

<table>
<% @lists.each do |list| %>
	<tr>
		<td>
			<%= link_to h(list.name), list %>
		</td>
		<td>
			<%= mail_to h(list.email) %>
		</td>
		<td>
			(<%= pluralize(list.subscriptions.size, 'subscriber') %>)
		</td>
        <% unless current_user.admin? %>
        <td>
            <%= link_to h("[unsubscribe]"), unsubscribe_list_path(list), :confirm => "Are you sure you want to unsubscribe?" %>
        </td>
        <% end %>
	</tr>
<% end %>
</table>

<% unless current_user.admin? %>
<h3>Available Lists</h3>
<table>
  <% @available_lists.each do |list| %>
  <%# <dph> This probably doesn't belong here %>
  <% next if list.subscribers.include?(current_user) %>
		<td>
			<%= link_to h(list.name), list %>
		</td>
		<td>
			<%= mail_to h(list.email) %>
		</td>
		<td>
			(<%= pluralize(list.subscriptions.size, 'subscriber') %>)
		</td>
        <td>
            <%= link_to h("[subscribe]"), subscribe_list_path(list), :confirm => "Are you sure you want to subscribe?" %>
        </td>
  <% end %>
<% end %>
</table>

<br />

<%= link_to 'New list', new_list_path %>
<commit_msg>Added [topic] links to list index<commit_after><h2><%= current_user.admin? ? "Mailing Lists" : "My Lists" %></h2>

<table>
<% @lists.each do |list| %>
	<tr>
		<td>
			<%= link_to h(list.name), list %>
		</td>
		<td>
			<%= mail_to h(list.email) %>
		</td>
		<td>
			(<%= pluralize(list.subscriptions.size, 'subscriber') %>)
		</td>
        <td>
            <%= link_to h("[topics]"), list_topics_path(list)  %>
        </td>
        <% unless current_user.admin? %>
        <td>
            <%= link_to h("[unsubscribe]"), unsubscribe_list_path(list), :confirm => "Are you sure you want to unsubscribe?" %>
        </td>
        <% end %>
	</tr>
<% end %>
</table>

<% unless current_user.admin? %>
<h3>Available Lists</h3>
<table>
  <% @available_lists.each do |list| %>
  <%# <dph> This probably doesn't belong here %>
  <% next if list.subscribers.include?(current_user) %>
		<td>
			<%= link_to h(list.name), list %>
		</td>
		<td>
			<%= mail_to h(list.email) %>
		</td>
		<td>
			(<%= pluralize(list.subscriptions.size, 'subscriber') %>)
		</td>
        <td>
            <%= link_to h("[topics]"), list_topics_path(list)  %>
        </td>
        <td>
            <%= link_to h("[subscribe]"), subscribe_list_path(list), :confirm => "Are you sure you want to subscribe?" %>
        </td>
  <% end %>
<% end %>
</table>

<br />

<%= link_to 'New list', new_list_path %>

{'fraction_non_alphanumeric': 0.21776729559748428, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 2.798507462686567, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 109, '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': '3926094', 'n_tokens_mistral': 1098, 'n_tokens_neox': 971, 'n_words': 205}