improved ui for saved searches #2523

This commit is contained in:
r888888888
2015-11-17 17:36:22 -08:00
parent ac617544b8
commit 156165a86f
5 changed files with 68 additions and 16 deletions

View File

@@ -1,3 +1,17 @@
<% if CurrentUser.show_saved_searches? %>
<%= button_tag "Save search", :id => "save-search" %>
<% end %>
<div id="save-search-dialog" title="Save Search" style="display: none;">
<%= form_tag(saved_searches_path, :class => "simple_form", :remote => true) do %>
<%= hidden_field_tag "saved_search_tags", params[:tags] %>
<div class="input">
<label>
<%= text_field_tag "saved_search_category", "", :placeholder => "Category" %>
</label>
</div>
<p><label><%= check_box_tag "saved_search_disable_categories" %> Disable categorization</label></p>
<% end %>
</div>

View File

@@ -2,6 +2,4 @@
Danbooru.error("<%= j @saved_search.errors.full_messages.join(', ') %>");
<% else %>
Danbooru.notice("Search '<%= j @saved_search.tag_query %>' was saved");
$("#saved-searches-nav").html("<%= j render('saved_searches/interface', :saved_searches => CurrentUser.user.saved_searches) %>");
Danbooru.Post.initialize_saved_searches();
<% end %>