<%= content_for :head do %> <%= javascript_include_tag 'georgia_mailer/application' %> <%= stylesheet_link_tag 'georgia_mailer/application' %> <% end -%>
<%= form_for :search, url: search_messages_path, method: :get, html: {role: 'search'} do |f| %> <%= hidden_field_tag :s, params[:s] if params[:s] %>
<%= text_field_tag :query, params[:query], class: 'form-control input-search', placeholder: 'Search' %>
<% end -%>
<%= link_to "#{icon_tag('reply')} Reply".html_safe, "mailto:#{@message.email}", class: 'btn btn-warning' if @message %>
<%= link_to 'Inbox', search_messages_path, class: "inbox-category-link#{' active' unless params[:spam].present?}" %> <%= link_to 'Spam', search_messages_path(spam: 1), class: "inbox-category-link#{' active' if params[:spam] == '1'}" %> <%= link_to 'All', search_messages_path(spam: 0), class: "inbox-category-link#{' active' if params[:spam] == '0'}" %>
<% if params[:spam] == '1' and @messages and @messages.any? %> <% end %> <% if @messages and @messages.any? %> <%= render @messages %> <% else %> <% end %>
<%= checkboxable_all_tag :messages %> <% if params[:spam] == '1' %> <%= link_to "#{icon_tag('thumbs-up')} Move to Inbox".html_safe, '#', class: 'btn btn-default btn-xs js-ham disabled' %> <% else %> <%= link_to "#{icon_tag('thumbs-down')} Report spam".html_safe, '#', class: 'btn btn-default btn-xs js-spam disabled' %> <% end %> <%= link_to "#{icon_tag('trash-o')} Delete".html_safe, '#', class: 'btn btn-default btn-xs js-delete disabled' %> <%= pagination_tag(@search) %>
<%= link_to 'delete all spam messages now', destroy_all_spam_messages_path %>
<%# FIXME: Should work with I18n %> <% if params[:spam] == '1' %> Hooray, no spam here! <% else %> Your inbox is empty. <% end %>