[Posts] Show verified uploaders to everyone (#723)

This commit is contained in:
Tarrgon 2024-09-01 14:32:53 -04:00 committed by GitHub
parent 705254627d
commit 2738ccfb62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -92,13 +92,13 @@ class PostsDecorator < ApplicationDecorator
end
tooltip = "Rating: #{post.rating}\nID: #{post.id}\nDate: #{post.created_at}\nStatus: #{post.status}\nScore: #{post.score}"
if CurrentUser.is_janitor?
if CurrentUser.is_janitor? || post.uploader_linked_artists.any?
tooltip += "\nUploader: #{post.uploader_name}"
if post.is_flagged? || post.is_deleted?
flag = post.flags.order(id: :desc).first
tooltip += "\nFlag Reason: #{flag&.reason}" if post.is_flagged?
tooltip += "\nDel Reason: #{flag&.reason}" if post.is_deleted?
end
end
if CurrentUser.is_janitor? && (post.is_flagged? || post.is_deleted?)
flag = post.flags.order(id: :desc).first
tooltip += "\nFlag Reason: #{flag&.reason}" if post.is_flagged?
tooltip += "\nDel Reason: #{flag&.reason}" if post.is_deleted?
end
tooltip += "\n\n#{post.tag_string}"

View File

@ -13,7 +13,7 @@
Posted: <%= link_to time_ago_in_words_tagged(post.created_at), posts_path(:tags => "date:#{post.created_at.to_date}"), :rel => "nofollow" %>
<meta itemprop="uploadDate" content="<%= post.created_at.iso8601 %>">
</li>
<% if CurrentUser.is_janitor? %>
<% if CurrentUser.is_janitor? || post.uploader_linked_artists.any? %>
<li>
Uploader: <%= link_to_user(post.uploader) %> <%= user_record_meta(post.uploader) %>
<% if post.uploader_linked_artists.any? %>