improved ui for saved searches #2523
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user