aliases/implications: add status/tag type/order search options.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<tbody>
|
||||
<% tag_aliases.each do |tag_alias| %>
|
||||
<tr id="tag-alias-<%= tag_alias.id %>">
|
||||
<td class="category-<%= tag_alias.antecedent_tag.category %>"><%= link_to tag_alias.antecedent_name, posts_path(:tags => tag_alias.antecedent_name) %> <span class="count"><%= tag_alias.antecedent_tag.post_count rescue 0 %></span></td>
|
||||
<td class="category-<%= tag_alias.antecedent_tag.try(:category) %>"><%= link_to tag_alias.antecedent_name, posts_path(:tags => tag_alias.antecedent_name) %> <span class="count"><%= tag_alias.antecedent_tag.post_count rescue 0 %></span></td>
|
||||
<td class="category-<%= tag_alias.consequent_tag.try(:category) %>"><%= link_to tag_alias.consequent_name, posts_path(:tags => tag_alias.consequent_name) %> <span class="count"><%= tag_alias.consequent_tag.post_count rescue 0 %></span></td>
|
||||
<td>
|
||||
<% if tag_alias.forum_topic_id %>
|
||||
@@ -45,4 +45,4 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<div id="c-tag-aliases">
|
||||
<div id="a-index">
|
||||
<%= simple_form_for(:search, method: :get, url: tag_aliases_path, defaults: { required: false }) do |f| %>
|
||||
<%= simple_form_for(:search, method: :get, url: tag_aliases_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= f.input :name_matches, label: "Name", input_html: { value: params[:search][:name_matches], data: { autocomplete: "tag" } } %>
|
||||
<%= f.input :status, label: "Status", collection: ["", "Approved", "Pending"], selected: params[:search][:status] %>
|
||||
<%= f.input :category, label: "Category", collection: Danbooru.config.canonical_tag_category_mapping.to_a, include_blank: true, selected: params[:search][:category] %>
|
||||
<%= f.input :order, label: "Order", collection: [%w[Status status], %w[Recently\ created created_at], %w[Recently\ updated updated_at], %w[Name name], %w[Tag\ count tag_count]], selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
@@ -16,4 +19,3 @@
|
||||
<% content_for(:page_title) do %>
|
||||
Tag Aliases - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<div id="c-tag-implications">
|
||||
<div id="a-index">
|
||||
<%= simple_form_for(:search, method: :get, url: tag_implications_path, defaults: { required: false }) do |f| %>
|
||||
<%= simple_form_for(:search, method: :get, url: tag_implications_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= f.input :name_matches, label: "Name", input_html: { value: params[:search][:name_matches], data: { autocomplete: "tag" } } %>
|
||||
<%= f.input :status, label: "Status", collection: ["", "Approved", "Pending"], selected: params[:search][:status] %>
|
||||
<%= f.input :category, label: "Category", collection: Danbooru.config.canonical_tag_category_mapping.to_a, include_blank: true, selected: params[:search][:category] %>
|
||||
<%= f.input :order, label: "Order", collection: [%w[Status status], %w[Recently\ created created_at], %w[Recently\ updated updated_at], %w[Name name], %w[Tag\ count tag_count]], selected: params[:search][:order] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user