diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js
index 9f807c6fa..e4d3ccdf7 100644
--- a/app/assets/javascripts/posts.js
+++ b/app/assets/javascripts/posts.js
@@ -336,7 +336,11 @@
} else {
score = " score:" + $post.data("score");
}
- $img.attr("title", $post.attr("data-tags") + " user:" + $post.attr("data-uploader").replace(/_/g, " ") + " rating:" + $post.data("rating") + score);
+ var uploader = " ";
+ if ($post.attr("data-uploader")) {
+ uploader += "user:" + $post.attr("data-uploader").replace(/_/g, " ");
+ }
+ $img.attr("title", $post.attr("data-tags") + uploader + " rating:" + $post.data("rating") + score);
}
Danbooru.Post.expand_image = function(e) {
diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb
index e0c70520a..4d72d2517 100644
--- a/app/presenters/post_presenter.rb
+++ b/app/presenters/post_presenter.rb
@@ -85,7 +85,6 @@ class PostPresenter < Presenter
data-has-sound="#{post.has_tag?('video_with_sound|flash_with_sound')}"
data-tags="#{h(post.tag_string)}"
data-pools="#{post.pool_string}"
- data-uploader="#{h(post.uploader_name)}"
data-approver-id="#{post.approver_id}"
data-rating="#{post.rating}"
data-width="#{post.image_width}"
@@ -103,6 +102,12 @@ class PostPresenter < Presenter
data-is-favorited="#{post.favorited_by?(CurrentUser.user.id)}"
}
+ if CurrentUser.is_moderator?
+ attributes += %{
+ data-uploader="#{h(post.uploader_name)}"
+ }
+ end
+
if post.visible?
attributes += %{
data-md5="#{post.md5}"
diff --git a/app/views/comments/partials/index/_header.html.erb b/app/views/comments/partials/index/_header.html.erb
index 1815dc23b..c54ba3777 100644
--- a/app/views/comments/partials/index/_header.html.erb
+++ b/app/views/comments/partials/index/_header.html.erb
@@ -4,10 +4,12 @@
Date
<%= compact_time(post.created_at) %>
-
- User
- <%= link_to_user(post.uploader) %>
-
+ <% if CurrentUser.is_moderator? %>
+
+ User
+ <%= link_to_user(post.uploader) %>
+
+ <% end %>
Rating
<%= post.rating %>
diff --git a/app/views/posts/partials/show/_information.html.erb b/app/views/posts/partials/show/_information.html.erb
index f6fad113f..078d30987 100644
--- a/app/views/posts/partials/show/_information.html.erb
+++ b/app/views/posts/partials/show/_information.html.erb
@@ -1,6 +1,6 @@
- ID: <%= post.id %>
- - Tagger: <%= link_to_user(post.keeper) %>
+ - Top Tagger: <%= link_to_user(post.keeper) %>
<% if CurrentUser.is_moderator? %>
- Uploader: <%= link_to_user(post.uploader) %>
<% end %>