From 8b91156b9703211c053ae0d54a0f8d4ba537029e Mon Sep 17 00:00:00 2001 From: faucet Date: Tue, 11 Jul 2023 10:44:38 +0100 Subject: [PATCH] [Tags] Use template for MetaSearch relation tables --- app/views/meta_searches/tags.html.erb | 57 +-------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/app/views/meta_searches/tags.html.erb b/app/views/meta_searches/tags.html.erb index 7b76fc8b5..b3db36914 100644 --- a/app/views/meta_searches/tags.html.erb +++ b/app/views/meta_searches/tags.html.erb @@ -47,34 +47,7 @@ <% if @meta_search.tag_aliases.blank? %>

No results

<% else %> - - - - - - - - - - - <% @meta_search.tag_aliases.each do |tag_alias| %> - - - - - - <% end %> - -
FromTo
<%= tag_alias.antecedent_name %><%= tag_alias.consequent_name %> - <%= link_to "Show", tag_alias_path(tag_alias) %> - <% if tag_alias.deletable_by?(CurrentUser.user) %> - | <%= link_to "Delete", tag_alias_path(tag_alias), :method => :delete, :data => {:confirm => "Are you sure you want to delete this alias?"} %> - <% end %> - - <% if CurrentUser.is_admin? && tag_alias.is_pending? %> - | <%= link_to "Approve", approve_tag_alias_path(tag_alias), :method => :post %> - <% end %> -
+ <%= render "tag_relationships/listing", tag_relations: @meta_search.tag_aliases %> <% end %> @@ -83,33 +56,7 @@ <% if @meta_search.tag_implications.blank? %>

No results

<% else %> - - - - - - - - - - - <% @meta_search.tag_implications.each do |tag_implication| %> - - - - - - <% end %> - -
FromTo
<%= tag_implication.antecedent_name %><%= tag_implication.consequent_name %> - <%= link_to "Show", tag_implication_path(tag_implication) %> - <% if tag_implication.deletable_by?(CurrentUser.user) %> - | <%= link_to "Delete", tag_implication_path(tag_implication), :method => :delete, :data => {:confirm => "Are you sure you want to delete this implication?"} %> - <% end %> - <% if CurrentUser.user.is_admin? && tag_implication.is_pending? %> - | <%= link_to "Approve", approve_tag_implication_path(tag_implication), :method => :post %> - <% end %> -
+ <%= render "tag_relationships/listing", tag_relations: @meta_search.tag_implications %> <% end %>