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() {
|
Danbooru.ModQueue.initialize_hilights = function() {
|
||||||
$.each($("article.post"), function(i, v) {
|
$.each($("div.post"), function(i, v) {
|
||||||
var $post = $(v);
|
var $post = $(v);
|
||||||
var score = parseInt($post.data("score"));
|
var score = parseInt($post.data("score"));
|
||||||
if (score >= 3) {
|
if (score >= 3) {
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
@import "../common/000_vars.css.scss";
|
@import "../common/000_vars.css.scss";
|
||||||
|
|
||||||
div#c-moderator-post-queues {
|
div#c-moderator-post-queues {
|
||||||
article {
|
div.post {
|
||||||
margin-bottom: 4em;
|
margin-bottom: 4em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
|
||||||
|
|
||||||
article.post-has-dup {
|
&.post-has-dup {
|
||||||
background: rgb(255, 255, 100);
|
background: rgb(255, 255, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
article.post-neg-score {
|
&.post-neg-score {
|
||||||
background: rgb(255, 230, 230);
|
background: rgb(255, 230, 230);
|
||||||
}
|
}
|
||||||
|
|
||||||
article.post-pos-score {
|
&.post-pos-score {
|
||||||
background: rgb(230, 255, 230);
|
background: rgb(230, 255, 230);
|
||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
float: left;
|
float: left;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
float: left;
|
float: left;
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
div#moderation-guideline {
|
div#moderation-guideline {
|
||||||
|
|||||||
@@ -636,7 +636,7 @@ class Post < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def has_tag?(tag)
|
def has_tag?(tag)
|
||||||
tag_string =~ /(?:^| )#{tag}(?:$| )/
|
!!(tag_string =~ /(?:^| )#{tag}(?:$| )/)
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_dup_tag?
|
def has_dup_tag?
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% @posts.each do |post| %>
|
<% @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>
|
<aside>
|
||||||
<%= link_to(image_tag(post.preview_file_url), post_path(post), :target => "_blank") %>
|
<%= link_to(image_tag(post.preview_file_url), post_path(post), :target => "_blank") %>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
(<%= post.image_width %>x<%= post.image_height %>)
|
(<%= post.image_width %>x<%= post.image_height %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</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? %>
|
<% if post.is_flagged? %>
|
||||||
<li><strong>Flagged</strong>: <%= post_flag_reasons(post) %></li>
|
<li><strong>Flagged</strong>: <%= post_flag_reasons(post) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<li><strong>Tags</strong>: <%= post.tag_string %></li>
|
<li><strong>Tags</strong>: <%= post.tag_string %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user