Update mod queue post previews for consistency with rest of site
Fixes display of borders on the previews and such. Also fix the yellow duplicate background not always working because Post#has_dup_tag? didn't return a boolean.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
Danbooru.ModQueue.initialize_hilights = function() {
|
||||
$.each($("article.post"), function(i, v) {
|
||||
$.each($("div.post"), function(i, v) {
|
||||
var $post = $(v);
|
||||
var score = parseInt($post.data("score"));
|
||||
if (score >= 3) {
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
@import "../common/000_vars.css.scss";
|
||||
|
||||
div#c-moderator-post-queues {
|
||||
article {
|
||||
div.post {
|
||||
margin-bottom: 4em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
article.post-has-dup {
|
||||
&.post-has-dup {
|
||||
background: rgb(255, 255, 100);
|
||||
}
|
||||
|
||||
article.post-neg-score {
|
||||
&.post-neg-score {
|
||||
background: rgb(255, 230, 230);
|
||||
}
|
||||
|
||||
article.post-pos-score {
|
||||
&.post-pos-score {
|
||||
background: rgb(230, 255, 230);
|
||||
}
|
||||
|
||||
@@ -29,6 +28,7 @@ div#c-moderator-post-queues {
|
||||
float: left;
|
||||
width: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
div#moderation-guideline {
|
||||
width: 900px;
|
||||
|
||||
@@ -636,7 +636,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def has_tag?(tag)
|
||||
tag_string =~ /(?:^| )#{tag}(?:$| )/
|
||||
!!(tag_string =~ /(?:^| )#{tag}(?:$| )/)
|
||||
end
|
||||
|
||||
def has_dup_tag?
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
|
||||
<% @posts.each do |post| %>
|
||||
<article class="post" id="post-<%= post.id %>" data-score="<%= post.score %>" data-has-children="<%= post.has_children? %>" data-has-dup="<%= post.has_dup_tag? %>">
|
||||
<div id="post-<%= post.id %>" class="post <%= PostPresenter.preview_class(post) %>" <%= PostPresenter.data_attributes(post) %> data-has-dup="<%= post.has_dup_tag? %>">
|
||||
<aside>
|
||||
<%= link_to(image_tag(post.preview_file_url), post_path(post), :target => "_blank") %>
|
||||
</aside>
|
||||
@@ -42,7 +42,7 @@
|
||||
(<%= post.image_width %>x<%= post.image_height %>)
|
||||
<% end %>
|
||||
</li>
|
||||
<li><strong>Uploader</strong>: <%= link_to(post.uploader.name, user_path(post.uploader_id)) %> <%= time_ago_in_words_tagged(post.created_at) %></li>
|
||||
<li><strong>Uploader</strong>: <%= link_to_user(post.uploader) %> <%= time_ago_in_words_tagged(post.created_at) %></li>
|
||||
<% if post.is_flagged? %>
|
||||
<li><strong>Flagged</strong>: <%= post_flag_reasons(post) %></li>
|
||||
<% end %>
|
||||
@@ -53,7 +53,7 @@
|
||||
<li><strong>Tags</strong>: <%= post.tag_string %></li>
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user