Merge pull request #2928 from evazion/feat-flagger-commenter-ips
Make commenter/flagger/appealer IPs visible to mods
This commit is contained in:
@@ -4,7 +4,16 @@ module PostAppealsHelper
|
|||||||
html << '<ul>'
|
html << '<ul>'
|
||||||
|
|
||||||
post.appeals.each do |appeal|
|
post.appeals.each do |appeal|
|
||||||
html << '<li>' + DText.parse_inline(appeal.reason).html_safe + ' - ' + link_to_user(appeal.creator) + ' ' + time_ago_in_words_tagged(appeal.created_at) + '</li>'
|
reason = DText.parse_inline(appeal.reason).html_safe
|
||||||
|
user = link_to_user(appeal.creator)
|
||||||
|
if CurrentUser.is_moderator?
|
||||||
|
ip = "(#{link_to_ip(appeal.creator_ip_addr)})"
|
||||||
|
else
|
||||||
|
ip = ""
|
||||||
|
end
|
||||||
|
time = time_ago_in_words_tagged(appeal.created_at)
|
||||||
|
|
||||||
|
html << "<li>#{reason} - #{user} #{ip} #{time}</li>"
|
||||||
end
|
end
|
||||||
|
|
||||||
html << '</ul>'
|
html << '</ul>'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ module PostFlagsHelper
|
|||||||
html << DText.parse_inline(flag.reason).html_safe
|
html << DText.parse_inline(flag.reason).html_safe
|
||||||
|
|
||||||
if CurrentUser.is_moderator?
|
if CurrentUser.is_moderator?
|
||||||
html << ' - ' + link_to_user(flag.creator)
|
html << " - #{link_to_user(flag.creator)} (#{link_to_ip(flag.creator_ip_addr)})"
|
||||||
end
|
end
|
||||||
|
|
||||||
html << ' - ' + time_ago_in_words_tagged(flag.created_at)
|
html << ' - ' + time_ago_in_words_tagged(flag.created_at)
|
||||||
|
|||||||
@@ -36,6 +36,13 @@
|
|||||||
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
||||||
<li id="comment-vote-down-link-for-<%= comment.id %>"><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
<li id="comment-vote-down-link-for-<%= comment.id %>"><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
||||||
<li id="comment-unvote-link-for-<%= comment.id %>" class="unvote-comment-link"><%= link_to "Unvote", comment_votes_path(:comment_id => comment.id), :method => :delete, :remote => true %></li>
|
<li id="comment-unvote-link-for-<%= comment.id %>" class="unvote-comment-link"><%= link_to "Unvote", comment_votes_path(:comment_id => comment.id), :method => :delete, :remote => true %></li>
|
||||||
|
<% if CurrentUser.is_moderator? %>
|
||||||
|
<li>|</li>
|
||||||
|
<li>
|
||||||
|
<strong>IP</strong>
|
||||||
|
<span><%= link_to_ip comment.ip_addr %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</menu>
|
</menu>
|
||||||
<% if comment.editable_by?(CurrentUser.user) %>
|
<% if comment.editable_by?(CurrentUser.user) %>
|
||||||
|
|||||||
Reference in New Issue
Block a user