diff --git a/app/javascript/src/styles/specific/forum.scss b/app/javascript/src/styles/specific/forum.scss
index abff67a19..8e1f212cf 100644
--- a/app/javascript/src/styles/specific/forum.scss
+++ b/app/javascript/src/styles/specific/forum.scss
@@ -38,18 +38,26 @@ div.list-of-forum-posts {
menu {
margin-top: 0.5em;
- ul.votes {
- margin: 0.5em 0;
- }
-
li {
margin-right: 1em;
}
}
+
+ .forum-post-votes-list {
+ margin-top: 0.5em;
+ margin-left: 0.2em;
+ }
}
}
}
+.forum-post-votes-list {
+ li {
+ display: inline;
+ margin-right: 1em;
+ }
+}
+
div#c-forum-topics {
span.new {
font-size: 80%;
diff --git a/app/views/bulk_update_requests/show.html.erb b/app/views/bulk_update_requests/show.html.erb
index 9090d4efb..dab800a33 100644
--- a/app/views/bulk_update_requests/show.html.erb
+++ b/app/views/bulk_update_requests/show.html.erb
@@ -3,9 +3,7 @@
Bulk Update Request: <%= @bulk_update_request.title %>
- <% if @bulk_update_request.forum_topic_id %>
- - Reference <%= link_to "topic ##{@bulk_update_request.forum_topic_id}", forum_topic_path(@bulk_update_request.forum_topic_id) %>
- <% end %>
+ <%= render "tag_change_requests/reference", tag_change_request: @bulk_update_request %>
- Creator <%= link_to_user @bulk_update_request.user %>
- Date <%= @bulk_update_request.created_at %>
- Status: <%= @bulk_update_request.status %>
@@ -18,6 +16,8 @@
<%= render "bur_edit_links", bur: @bulk_update_request %>
+
+ <%= render "tag_change_requests/votes", tag_change_request: @bulk_update_request %>
diff --git a/app/views/forum_post_votes/_list.html.erb b/app/views/forum_post_votes/_list.html.erb
index 97324a0ca..2fe0f0b02 100644
--- a/app/views/forum_post_votes/_list.html.erb
+++ b/app/views/forum_post_votes/_list.html.erb
@@ -1,19 +1,18 @@
-<%-
-# votes
-# forum_post
-%>
+<%# locals: (votes:, forum_post:, votable: true) -%>
<% own_vote = votes.find { |vote| vote.creator == CurrentUser.user } %>
<% other_votes = votes.reject { |vote| vote.creator == CurrentUser.user } %>
-<% if own_vote %>
- <%= render "forum_post_votes/vote", vote: own_vote, forum_post: forum_post %>
-<% end %>
+
+ <% if own_vote %>
+ <%= render "forum_post_votes/vote", vote: own_vote, forum_post: forum_post, votable: votable %>
+ <% end %>
-<% other_votes.each do |vote| %>
- <%= render "forum_post_votes/vote", vote: vote, forum_post: forum_post %>
-<% end %>
+ <% other_votes.each do |vote| %>
+ <%= render "forum_post_votes/vote", vote: vote, forum_post: forum_post, votable: false %>
+ <% end %>
-<% if forum_post.tag_change_request&.is_pending? && !own_vote %>
- <%= render "forum_post_votes/add_vote", forum_post: forum_post %>
-<% end %>
+ <% if forum_post.tag_change_request&.is_pending? && !own_vote && votable %>
+ <%= render "forum_post_votes/add_vote", forum_post: forum_post %>
+ <% end %>
+
diff --git a/app/views/forum_post_votes/_vote.html.erb b/app/views/forum_post_votes/_vote.html.erb
index 77ce9759c..cbc86d746 100644
--- a/app/views/forum_post_votes/_vote.html.erb
+++ b/app/views/forum_post_votes/_vote.html.erb
@@ -1,10 +1,7 @@
-<%-
-# vote
-# forum_post
-%>
+<%# locals: (vote:, forum_post:, votable:) -%>
-
- <% if forum_post.tag_change_request&.is_pending? && vote.creator_id == CurrentUser.id %>
+ <% if votable && forum_post.tag_change_request&.is_pending? && vote.creator_id == CurrentUser.id %>
<%= link_to tag.i(class: "fa-regular #{vote.fa_class}"), "#", class: "forum-vote-remove", 'data-forum-id': forum_post.id %>
<%= link_to_user vote.creator %>
<% else %>
diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb
index 0abd6a5a9..bb1de1552 100644
--- a/app/views/forum_posts/_forum_post.html.erb
+++ b/app/views/forum_posts/_forum_post.html.erb
@@ -73,12 +73,10 @@
<%= link_to_ip forum_post.creator_ip_addr %>
<% end %>
- <% if forum_post.votable? %>
-
- <%= render "forum_post_votes/list", votes: forum_post.votes, forum_post: forum_post %>
-
- <% end %>
+ <% if forum_post.votable? %>
+ <%= render "forum_post_votes/list", votes: forum_post.votes, forum_post: forum_post %>
+ <% end %>
<% if forum_post.editable_by?(CurrentUser.user) %>
<% if forum_post.is_original_post?(original_forum_post_id) %>
<%= render "forum_topics/form", :forum_topic => forum_post.topic %>
diff --git a/app/views/tag_aliases/show.html.erb b/app/views/tag_aliases/show.html.erb
index 14ee2b17a..63e1e68fd 100644
--- a/app/views/tag_aliases/show.html.erb
+++ b/app/views/tag_aliases/show.html.erb
@@ -5,9 +5,7 @@
- From <%= link_to @tag_alias.antecedent_name, show_or_new_wiki_pages_path(:title => @tag_alias.antecedent_name) %>
- To <%= link_to @tag_alias.consequent_name, show_or_new_wiki_pages_path(:title => @tag_alias.consequent_name) %>
- <% if @tag_alias.forum_topic_id %>
- - Reference <%= link_to "topic ##{@tag_alias.forum_topic_id}", forum_topic_path(@tag_alias.forum_topic_id) %>
- <% end %>
+ <%= render "tag_change_requests/reference", tag_change_request: @tag_alias %>
- Creator <%= link_to_user @tag_alias.creator %>
- Date <%= @tag_alias.created_at %>
<% if @tag_alias.respond_to?(:reason) && @tag_alias.reason.present? %>
@@ -32,6 +30,8 @@
<%= render "tag_relationships/command_buttons", tag_relation: @tag_alias, with_show_link: false %>
+
+ <%= render "tag_change_requests/votes", tag_change_request: @tag_alias %>
diff --git a/app/views/tag_change_requests/_reference.html.erb b/app/views/tag_change_requests/_reference.html.erb
new file mode 100644
index 000000000..caf1a73cc
--- /dev/null
+++ b/app/views/tag_change_requests/_reference.html.erb
@@ -0,0 +1,9 @@
+<% if tag_change_request.forum_topic_id %>
+ - Reference
+ <% if tag_change_request.forum_post_id %>
+ <%= link_to "forum ##{tag_change_request.forum_post_id}", forum_topic_path(tag_change_request.forum_topic_id, page: tag_change_request.forum_post.forum_topic_page, anchor: "forum_post_#{tag_change_request.forum_post_id}") %>
+ <% else %>
+ <%= link_to "topic ##{tag_change_request.forum_topic_id}", forum_topic_path(tag_change_request.forum_topic_id) %>
+ <% end %>
+
+<% end %>
diff --git a/app/views/tag_change_requests/_votes.html.erb b/app/views/tag_change_requests/_votes.html.erb
new file mode 100644
index 000000000..ad48cb5eb
--- /dev/null
+++ b/app/views/tag_change_requests/_votes.html.erb
@@ -0,0 +1,6 @@
+<% if tag_change_request.forum_post&.votes&.any? %>
+
+
Votes
+ <%= render "forum_post_votes/list", votes: tag_change_request.forum_post.votes, forum_post: tag_change_request.forum_post, votable: false %>
+
+<% end %>
diff --git a/app/views/tag_implications/show.html.erb b/app/views/tag_implications/show.html.erb
index 281db64cd..f5aae831b 100644
--- a/app/views/tag_implications/show.html.erb
+++ b/app/views/tag_implications/show.html.erb
@@ -5,9 +5,7 @@
- From <%= link_to @tag_implication.antecedent_name, show_or_new_wiki_pages_path(:title => @tag_implication.antecedent_name) %>
- To <%= link_to @tag_implication.consequent_name, show_or_new_wiki_pages_path(:title => @tag_implication.consequent_name) %>
- <% if @tag_implication.forum_topic_id %>
- - Reference <%= link_to "topic ##{@tag_implication.forum_topic_id}", forum_topic_path(@tag_implication.forum_topic_id) %>
- <% end %>
+ <%= render "tag_change_requests/reference", tag_change_request: @tag_implication %>
- Creator <%= link_to_user @tag_implication.creator %>
- Date <%= @tag_implication.created_at %>
<% if @tag_implication.respond_to?(:reason) && @tag_implication.reason.present? %>
@@ -20,6 +18,8 @@
<%= render "tag_relationships/command_buttons", tag_relation: @tag_implication, with_show_link: false %>
+
+ <%= render "tag_change_requests/votes", tag_change_request: @tag_implication %>