<%= render 'admin/shared/spree_mail_sub_nav' %>

<%= t('listing_emails') %>

<%= hook :admin_emails_index_headers do %> <% end %> <% @emails.each do |email|%> <%- locals = {:email => email} %> <%= hook :admin_emails_index_rows, locals do %> <% end %> <% end %>
<%= sort_link @search, :subject, t('subject') %> <%= sort_link @search, :body, t('message_body') %> <%= hook :admin_emails_index_header_actions %>
<%=link_to email.subject, object_url(email) %> <%= mail_to email.body.truncate(100) %> <%= hook :admin_emails_index_row_actions, locals do %> <%= link_to_edit email %>   <%= link_to_delete email %>   <% end %>
<%= will_paginate(:previous_label => "« #{t('previous')}", :next_label => "#{t('next')} »") %> <% content_for :sidebar do %>

<%= t('search') %>

<% @email = Email.metasearch %> <%= form_for [:admin, @email] do |f| %> <%- locals = {:f => f} %> <%= hook :admin_emails_index_search, locals do %>


<%= f.text_field :to_like, :size => 25 %>


<%= f.text_field :subject_like, :size => 25 %>

<% end %> <%= hook :admin_emails_index_search_buttons, locals do %>

<%= button t('search') %>

<% end %> <% end %>
<% end %>