<commit_before><h1><%= t 'activerecord.models.contacts' %></h1>

<%= render 'tab_admin_menu' %>

<table class='table table-striped'>
	<thead>
  <tr>
	    <th><%= t 'activerecord.attributes.contacts.sender_name' %></th>
	    <th><%= t 'activerecord.attributes.contacts.sender_email' %></th>
			<th><%= t 'activerecord.attributes.contacts.body' %></th>
			<th><%= t 'contacts.sent' %></th>
	    <th><%= t('actions') %></th>
	  </tr>
	</thead>
	
	<tbody>
		<% @contacts.each do |contact| %>
		  <tr>
		    <td><%= contact.sender_name %></td>
				<td><%= link_to contact.sender_email, "mailto:#{contact.sender_email}" %></td>
		    <td><%= truncate contact.body, length: 85, separator: ' ...' %></td>
				<td><%= l contact.created_at, :format => :tkh_default %></td>
		    <td><%= link_to t('view'), contact %></td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= will_paginate @contacts %>

<%= render 'shared/admin_sidebar' %>
<commit_msg>In contacts index, the view action link is a button.<commit_after><h1><%= t 'activerecord.models.contacts' %></h1>
<%= render 'tab_admin_menu' %>

<table class='table table-striped'>
	<thead>
  <tr>
	    <th><%= t 'activerecord.attributes.contacts.sender_name' %></th>
	    <th><%= t 'activerecord.attributes.contacts.sender_email' %></th>
			<th><%= t 'activerecord.attributes.contacts.body' %></th>
			<th><%= t 'contacts.sent' %></th>
	    <th><%= t('actions') %></th>
	  </tr>
	</thead>

	<tbody>
		<% @contacts.each do |contact| %>
		  <tr>
		    <td><%= contact.sender_name %></td>
				<td><%= link_to contact.sender_email, "mailto:#{contact.sender_email}" %></td>
		    <td><%= truncate contact.body, length: 85, separator: ' ...' %></td>
				<td><%= l contact.created_at, :format => :tkh_default %></td>
		    <td><%= link_to "<span class=\"glyphicon glyphicon-eye-open\"></span>&nbsp;#{t('view')}".html_safe, contact, class: 'btn btn-xs btn-default' %></td>
		  </tr>
		<% end %>
	</tbody>
</table>

<%= will_paginate @contacts %>

<%= render 'shared/admin_sidebar' %>

{'fraction_non_alphanumeric': 0.2444113263785395, 'fraction_numerical': 0.003974167908594138, 'mean_word_length': 3.8297362110311752, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 103, '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': '4802440', 'n_tokens_mistral': 881, 'n_tokens_neox': 755, 'n_words': 157}