replace uploader information post previews and comment listing, rename tagger to top tagger
This commit is contained in:
@@ -336,7 +336,11 @@
|
|||||||
} else {
|
} else {
|
||||||
score = " score:" + $post.data("score");
|
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) {
|
Danbooru.Post.expand_image = function(e) {
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ class PostPresenter < Presenter
|
|||||||
data-has-sound="#{post.has_tag?('video_with_sound|flash_with_sound')}"
|
data-has-sound="#{post.has_tag?('video_with_sound|flash_with_sound')}"
|
||||||
data-tags="#{h(post.tag_string)}"
|
data-tags="#{h(post.tag_string)}"
|
||||||
data-pools="#{post.pool_string}"
|
data-pools="#{post.pool_string}"
|
||||||
data-uploader="#{h(post.uploader_name)}"
|
|
||||||
data-approver-id="#{post.approver_id}"
|
data-approver-id="#{post.approver_id}"
|
||||||
data-rating="#{post.rating}"
|
data-rating="#{post.rating}"
|
||||||
data-width="#{post.image_width}"
|
data-width="#{post.image_width}"
|
||||||
@@ -103,6 +102,12 @@ class PostPresenter < Presenter
|
|||||||
data-is-favorited="#{post.favorited_by?(CurrentUser.user.id)}"
|
data-is-favorited="#{post.favorited_by?(CurrentUser.user.id)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if CurrentUser.is_moderator?
|
||||||
|
attributes += %{
|
||||||
|
data-uploader="#{h(post.uploader_name)}"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
if post.visible?
|
if post.visible?
|
||||||
attributes += %{
|
attributes += %{
|
||||||
data-md5="#{post.md5}"
|
data-md5="#{post.md5}"
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
<strong>Date</strong>
|
<strong>Date</strong>
|
||||||
<%= compact_time(post.created_at) %>
|
<%= compact_time(post.created_at) %>
|
||||||
</span>
|
</span>
|
||||||
<span class="info">
|
<% if CurrentUser.is_moderator? %>
|
||||||
<strong>User</strong>
|
<span class="info">
|
||||||
<%= link_to_user(post.uploader) %>
|
<strong>User</strong>
|
||||||
</span>
|
<%= link_to_user(post.uploader) %>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
<span class="info">
|
<span class="info">
|
||||||
<strong>Rating</strong>
|
<strong>Rating</strong>
|
||||||
<%= post.rating %>
|
<%= post.rating %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<ul itemscope itemtype="http://schema.org/ImageObject">
|
<ul itemscope itemtype="http://schema.org/ImageObject">
|
||||||
<li>ID: <%= post.id %></li>
|
<li>ID: <%= post.id %></li>
|
||||||
<li>Tagger: <%= link_to_user(post.keeper) %></li>
|
<li>Top Tagger: <%= link_to_user(post.keeper) %></li>
|
||||||
<% if CurrentUser.is_moderator? %>
|
<% if CurrentUser.is_moderator? %>
|
||||||
<li>Uploader: <%= link_to_user(post.uploader) %></li>
|
<li>Uploader: <%= link_to_user(post.uploader) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user