<%= t('activerecord.models.message') -%>

<%= form_for :messages, :url => messages_path, :html => {:method => 'get'} do -%>

<%= t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:id => 'search_form_top', :class => 'search_form', :placeholder => t('page.search_term')} -%> <%= submit_tag t('page.search') -%>

<%- end -%> <%= form_for :message, :url => destroy_selected_messages_path do |form| -%> <%- @messages.each do |message| -%> "> <%- end -%>
<%= t('activerecord.attributes.message.subject') -%> <%= t('activerecord.attributes.message.sender') -%> <%= t('message.sent_at') -%>
<% if can? :delete, message %> <% end %> <% unless message.read? %><% end %> <%= link_to message.subject, message -%> <% unless message.read? %><% end %> <%= link_to message.sender.username, message.sender -%> <%= l(message.created_at) -%>
<%= submit_tag t('message.delete') -%>
<%- end -%> <%= will_paginate(@messages) -%>