<% provide :title, t('.title') %>
<h4><%= t('.title') %></h4>

<%= form_tag({:action => "search"}, :method => :get) do %>
  <%= text_field_tag "query", params[:query], :size => 40 %> <%= submit_tag t('.search') %>
<% end %>

<% if @notes %>
  <div style="margin-top: 2em;">
    <% @notes.each do |note| %>
      <div style="float: left; clear: both; margin-bottom: 2em;">
        <div style="float: left; width: 200px;">
          <%= link_to image_tag(note.post.preview_url, :width => note.post.preview_dimensions[0], :height => note.post.preview_dimensions[1]), :controller => "post", :action => "show", :id => note.post_id %>
        </div>
        <div style="float: left;">
          <%= sanitize note.formatted_body %>
        </div>
      </div>
    <% end %>
  </div>

  <div id="paginator">
    <%= will_paginate(@notes) %>
  </div>
<% end %>

<%= render :partial => "footer" %>
