<% if presenter.has_uploads? %>
  <div class="box user-uploads">
    <h2>
      <%= link_to "Uploads", posts_path(:tags => "user:#{user.name}") %>
    </h2>
    <div>
      <% presenter.uploads.each do |post| %>
        <%= PostPresenter.preview(post, :tags => "user:#{user.name}") %>
      <% end %>
    </div>
  </div>
<% end %>

<% if presenter.has_favorites? %>
  <div class="box user-favorites">
    <h2>
      <%= link_to "Favorites", favorites_path(:user_id => user.id) %>
    </h2>
    <div>
      <% presenter.favorites.each do |post| %>
        <%= PostPresenter.preview(post, :tags => "fav:#{user.name}") %>
      <% end %>
    </div>
  </div>
<% end %>

<% if CurrentUser.user.id == @user.id && @user.has_saved_searches? && @user.is_gold? %>
  <% presenter.saved_search_labels.each do |label| %>
    <div class="box user-saved-search" data-label="<%= label %>">
      <h2>
        Saved Search: <%= link_to label, posts_path(:tags => "search:#{label}") %>
        (<%= link_to "manage", saved_searches_path(label: label) %>)
      </h2>

      <div class="box">
        <% presenter.posts_for_saved_search_category(label).each do |post| %>
          <%= PostPresenter.preview(post, :tags => "search:#{label}") %>
        <% end %>
      </div>
    </div>
  <% end %>
<% end %>