/posts: fix saved search dropdown for post show page.

This commit is contained in:
evazion
2017-04-20 17:57:00 -05:00
parent 9718c6e107
commit 5303d1052f
4 changed files with 9 additions and 7 deletions

View File

@@ -8,11 +8,11 @@
if ($("#c-posts").length) {
this.initialize_shortcuts();
this.initialize_saved_searches();
}
if ($("#c-posts").length && $("#a-index").length) {
this.initialize_excerpt();
this.initialize_saved_searches();
}
if ($("#c-posts").length && $("#a-show").length) {

View File

@@ -59,6 +59,10 @@
<% end %>
<%= post_search_count_js %>
<div id="saved-searches-nav">
<%= render "saved_searches/interface" %>
</div>
</div>
</div>

View File

@@ -3,12 +3,6 @@
<%= post_set.presenter.post_previews_html(self) %>
</div>
<% if params[:tags] %>
<div id="saved-searches-nav">
<%= render "saved_searches/interface", :saved_searches => CurrentUser.user.saved_searches %>
</div>
<% end %>
<% if post_set.hidden_posts.present? %>
<div class="tn hidden-posts-notice">
<% if post_set.banned_posts.present? %>

View File

@@ -137,6 +137,10 @@
<div id="add-to-favgroup-dialog" title="Add to favorite group" style="display: none;">
<%= render "favorite_groups/add_to_favgroup_dialog", :post => @post %>
</div>
<div id="saved-searches-nav">
<%= render "saved_searches/interface" %>
</div>
</div>
<% content_for(:page_title) do %>