From 5303d1052f138aa379c2282a289e96d386cc260d Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 20 Apr 2017 17:57:00 -0500 Subject: [PATCH] /posts: fix saved search dropdown for post show page. --- app/assets/javascripts/posts.js | 2 +- app/views/posts/index.html.erb | 4 ++++ app/views/posts/partials/index/_posts.html.erb | 6 ------ app/views/posts/show.html.erb | 4 ++++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index a335a23b8..21ede5674 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -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) { diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb index c18f7ed1c..b09354072 100644 --- a/app/views/posts/index.html.erb +++ b/app/views/posts/index.html.erb @@ -59,6 +59,10 @@ <% end %> <%= post_search_count_js %> + +
+ <%= render "saved_searches/interface" %> +
diff --git a/app/views/posts/partials/index/_posts.html.erb b/app/views/posts/partials/index/_posts.html.erb index 6efa892fb..9b831b80f 100644 --- a/app/views/posts/partials/index/_posts.html.erb +++ b/app/views/posts/partials/index/_posts.html.erb @@ -3,12 +3,6 @@ <%= post_set.presenter.post_previews_html(self) %> - <% if params[:tags] %> -
- <%= render "saved_searches/interface", :saved_searches => CurrentUser.user.saved_searches %> -
- <% end %> - <% if post_set.hidden_posts.present? %>
<% if post_set.banned_posts.present? %> diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 535173aca..a70a6d465 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -137,6 +137,10 @@ + +
+ <%= render "saved_searches/interface" %> +
<% content_for(:page_title) do %>