add saved search category change ui

This commit is contained in:
r888888888
2016-09-11 01:37:10 -07:00
parent 1f3515817c
commit 70fef49e81
5 changed files with 66 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
<div id="c-saved-searches">
<div id="a-edit">
<h1>Change Category</h1>
<%= form_tag(saved_search_category_change_path, :class => "simple_form") do %>
<div class="input">
<label for="old">Old Category</label>
<%= text_field_tag "old", params[:old] %>
</div>
<div class="input">
<label for="new">New Category</label>
<%= text_field_tag "new" %>
</div>
<%= submit_tag %>
<% end %>
</div>
</div>
<%= render "saved_searches/secondary_links" %>
<% content_for(:page_title) do %>
Edit Category - <%= Danbooru.config.app_name %>
<% end %>

View File

@@ -6,6 +6,7 @@
<h2>
<% if category.present? %>
<%= link_to_if SavedSearch.posts_search_available?, category.tr("_", " "), posts_path(:tags => "search:#{category}") %>
(<%= link_to "rename", new_saved_search_category_change_path(:old => category) %>)
<% else %>
<%= link_to_if SavedSearch.posts_search_available?, SavedSearch::UNCATEGORIZED_NAME, posts_path(:tags => "search:all") %>
<% end %>
@@ -13,8 +14,8 @@
<table class="striped" width="100%">
<thead>
<tr>
<th width="90%">Tags</th>
<th width="10%"></th>
<th width="80%">Tags</th>
<th width="20%"></th>
</tr>
</thead>