tweaks to similar posts

This commit is contained in:
Albert Yi
2018-07-20 15:05:51 -07:00
parent 6fb20fca89
commit df6e86551a
5 changed files with 32 additions and 7 deletions

View File

@@ -82,22 +82,30 @@
</div>
<% end %>
<% if RecommenderService.available?(@post) %>
<%= render "posts/partials/index/similar", post: @post %>
<% end %>
<% if @post.presenter.has_nav_links?(self) %>
<%= render "posts/partials/show/nav_links", :post => @post, :position => "bottom" %>
<% end %>
<menu id="post-sections">
<% if RecommenderService.available?(@post) %>
<li><a href="#similar">Similar</a></li>
<% end %>
<li><a href="#comments">Comments</a></li>
<% if CurrentUser.is_member? && @post.visible? %>
<li><a href="#edit" id="post-edit-link">Edit</a></li>
<% end %>
<li><a href="#share">Share</a></li>
</menu>
<% if RecommenderService.available?(@post) %>
<section id="similar">
<%= render "posts/partials/index/similar", post: @post %>
</section>
<% end %>
<section id="comments">
<% if !CurrentUser.user.is_builder? %>
<h2>Before commenting, read the <%= link_to "how to comment guide", wiki_pages_path(:search => {:title => "howto:comment"}) %>.</h2>