<% title (t "admin_panel.contact_messages") + " - " + @config.website_name %>
<%= render 'admin_panel/sidebar_nav' %>
<%= bootstrap_flash %> <% @contact_messages.each do |msg| %>

<%= ('' + (t "admin_panel.new") + '').html_safe if msg.unread %> <%= link_to msg.title, show_contact_message_path(msg) %> <%= t "contact.by" %> <% if msg.user != nil %> <%= msg.user.full_name %> <% else %> <%= msg.email %> <% end %> , <%= time_ago_in_words(msg.created_at) %> <%= t "blog.ago" %>

<%= truncate( msg.content, length: 120, omission: '...') %>

<% if msg.unread %> <%= link_to ''.html_safe, mark_contact_message_as_readed_path(msg), :class => 'btn' %> <% else %> <%= link_to ''.html_safe, mark_contact_message_as_unread_path(msg), :class => 'btn' %> <% end %> <%= link_to ''.html_safe, msg, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %>
<% end %>