<div>
  <h5><%= t('.title') %></h5>
  <ul>
    <li><%= link_to_if @post.previous_id, t('.previous'), :controller => "post", :action => "show", :id => @post.previous_id %></li>
    <li><%= link_to_if @post.next_id, t('.next'), :controller => "post", :action => "show", :id => @post.next_id %></li>
    <% if @post.parent_id %>
      <li><%= link_to t('.parent'), :controller => "post", :action => "show", :id => @post.parent_id %></li>
    <% end %>
    <li><%= link_to t('.random'), :controller => "post", :action => "random" %></li>
    <% if @current_user.is_member_or_higher? %>
    <% unless @post.is_deleted? || !@post.image? %>
      <li><a id="find-dupes"><%= t('.find.duplicate') %></a><%#= link_to "Find dupes", :controller => "post", :action => "similar", :id => @post.id, :services=>"local" %></li>
      <li><a id="find-similar"><%= t('.find.similar') %></a><%#= link_to "Find similar", :controller => "post", :action => "similar", :id => @post.id, :services=>"all" %></li>
      <script type="text/javascript">
        $("find-dupes").href = '<%= escape_javascript(url_for(:controller => 'post', :action => 'similar', :id => @post.id, :services=>'local')) %>';
        $("find-similar").href = '<%= escape_javascript(url_for(:controller => 'post', :action => 'similar', :id => @post.id, :services=>'all')) %>';
      </script>
    <% end %>
    <% end %>
  </ul>
</div>
