diff --git a/app/models/tag_relationship.rb b/app/models/tag_relationship.rb index 28e6bacb1..dd6878ebc 100644 --- a/app/models/tag_relationship.rb +++ b/app/models/tag_relationship.rb @@ -66,7 +66,7 @@ class TagRelationship < ApplicationRecord end def search(params) - q = search_attributes(params, :id, :created_at, :updated_at, :antecedent_name, :consequent_name, :creator, :approver, :forum_post, :forum_topic, :antecedent_tag, :consequent_tag, :antecedent_wiki, :consequent_wiki) + q = search_attributes(params, :id, :created_at, :updated_at, :antecedent_name, :consequent_name, :reason, :creator, :approver, :forum_post, :forum_topic, :antecedent_tag, :consequent_tag, :antecedent_wiki, :consequent_wiki) if params[:name_matches].present? q = q.name_matches(params[:name_matches]) diff --git a/app/views/tag_aliases/_listing.html.erb b/app/views/tag_aliases/_listing.html.erb index 277f1fbad..84c67e31e 100644 --- a/app/views/tag_aliases/_listing.html.erb +++ b/app/views/tag_aliases/_listing.html.erb @@ -1,26 +1,31 @@ -<%= table_for tag_aliases, width: "100%" do |t| %> - <% t.column "From", width: "25%" do |tag_alias| %> +<%= table_for tag_aliases, class: "striped autofit" do |t| %> + <% t.column "From", width: "30%" 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| %> + <% t.column "To", td: { class: "col-expand" } 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 "Topic", width: "10%" do |tag_alias| %> + <% t.column "Reason" do |tag_alias| %> + + <%= format_text(tag_alias.reason, inline: true) %> + + <% end %> + <% t.column "Topic" do |tag_alias| %> <% if tag_alias.forum_topic_id %> <%= link_to "topic ##{tag_alias.forum_topic_id}", forum_topic_path(tag_alias.forum_topic_id) %> <% end %> <% end %> - <% t.column "Approver", width: "15%" do |tag_alias| %> + <% t.column "Approver" do |tag_alias| %> <%= link_to_user(tag_alias.approver) if tag_alias.approver %> <% end %> - <% t.column "Status", width: "5%" do |tag_alias| %> + <% t.column "Status" do |tag_alias| %> <%= tag_alias.status %> <% end %> - <% t.column column: "control", width: "15%" do |tag_alias| %> + <% t.column column: "control" do |tag_alias| %> <%= link_to "Show", tag_alias_path(tag_alias) %> <% if policy(tag_alias).destroy? %> diff --git a/app/views/tag_aliases/show.html.erb b/app/views/tag_aliases/show.html.erb index 2c4f194d3..25e6f4e0f 100644 --- a/app/views/tag_aliases/show.html.erb +++ b/app/views/tag_aliases/show.html.erb @@ -10,7 +10,7 @@ <% end %>