diff --git a/app/models/tag_implication.rb b/app/models/tag_implication.rb
index d65cc5fcf..9317dc5dd 100644
--- a/app/models/tag_implication.rb
+++ b/app/models/tag_implication.rb
@@ -48,6 +48,24 @@ class TagImplication < TagRelationship
end
end
+ concerning :SearchMethods do
+ class_methods do
+ def search(params)
+ q = super
+
+ if params[:implied_from].present?
+ q = q.where(id: ancestors_of(params[:implied_from]).select(:id))
+ end
+
+ if params[:implied_to].present?
+ q = q.where(id: descendants_of(params[:implied_to]).select(:id))
+ end
+
+ q
+ end
+ end
+ end
+
module ValidationMethods
def absence_of_circular_relation
return if is_rejected?
diff --git a/app/views/tag_aliases/_listing.html.erb b/app/views/tag_aliases/_listing.html.erb
index 09867f87e..eb43d8a4a 100644
--- a/app/views/tag_aliases/_listing.html.erb
+++ b/app/views/tag_aliases/_listing.html.erb
@@ -1,10 +1,12 @@
<%= table_for tag_aliases, width: "100%" do |t| %>
<% t.column "From", width: "25%" do |tag_alias| %>
<%= link_to tag_alias.antecedent_name, posts_path(tags: tag_alias.antecedent_name), class: tag_class(tag_alias.antecedent_tag) %>
+ <%= link_to "»", tag_aliases_path(search: { antecedent_name_ilike: tag_alias.antecedent_name }) %>
<%= tag_alias.antecedent_tag&.post_count.to_i %>
<% end %>
<% t.column "To", width: "25%" do |tag_alias| %>
<%= link_to tag_alias.consequent_name, posts_path(tags: tag_alias.consequent_name), class: tag_class(tag_alias.consequent_tag) %>
+ <%= link_to "»", tag_aliases_path(search: { consequent_name_ilike: tag_alias.consequent_name }) %>
<%= tag_alias.consequent_tag&.post_count.to_i %>
<% end %>
<% t.column "Reference", width: "10%" do |tag_alias| %>
diff --git a/app/views/tag_implications/_listing.html.erb b/app/views/tag_implications/_listing.html.erb
index 09a969cc0..457818e8a 100644
--- a/app/views/tag_implications/_listing.html.erb
+++ b/app/views/tag_implications/_listing.html.erb
@@ -1,15 +1,17 @@
<%= table_for tag_implications, width: "100%" do |t| %>
<% t.column "From", width: "25%" do |tag_implication| %>
<%= link_to tag_implication.antecedent_name, posts_path(tags: tag_implication.antecedent_name), class: tag_class(tag_implication.antecedent_tag) %>
+ <%= link_to "»", tag_implications_path(search: { implied_from: tag_implication.antecedent_name }) %>
<%= tag_implication.antecedent_tag&.post_count.to_i %>
<% end %>
<% t.column "To", width: "25%" do |tag_implication| %>
<%= link_to tag_implication.consequent_name, posts_path(tags: tag_implication.consequent_name), class: tag_class(tag_implication.consequent_tag) %>
+ <%= link_to "»", tag_implications_path(search: { implied_to: tag_implication.consequent_name }) %>
<%= tag_implication.consequent_tag&.post_count.to_i %>
<% end %>
- <% t.column "Reference", width: "10%" do |tag_implication| %>
+ <% t.column "Topic", width: "10%" do |tag_implication| %>
<% if tag_implication.forum_topic_id %>
- <%= link_to tag_implication.forum_topic_id, forum_topic_path(tag_implication.forum_topic_id) %>
+ <%= link_to "topic ##{tag_implication.forum_topic_id}", forum_topic_path(tag_implication.forum_topic_id) %>
<% end %>
<% end %>
<% t.column "Approver", width: "15%" do |tag_implication| %>