add post status borders to listing
This commit is contained in:
@@ -29,6 +29,23 @@
|
||||
Danbooru.Post.initialize_title_for = function(post) {
|
||||
var $post = $(post);
|
||||
$post.attr("title", $post.data("tags") + " uploader:" + $post.data("uploader") + " rating:" + $post.data("rating"));
|
||||
|
||||
var status = $post.data("flags");
|
||||
if (status.match(/pending/)) {
|
||||
$post.addClass("post-status-pending");
|
||||
}
|
||||
|
||||
if (status.match(/flagged/)) {
|
||||
$post.addClass("post-status-flagged");
|
||||
}
|
||||
|
||||
if ($post.data("parent-id")) {
|
||||
$post.addClass("post-status-has-parent");
|
||||
}
|
||||
|
||||
if ($post.data("has-children")) {
|
||||
$post.addClass("post-status-has-children");
|
||||
}
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_image_resize = function() {
|
||||
|
||||
@@ -28,6 +28,26 @@ article.post-preview.blacklisted-active {
|
||||
display: none;
|
||||
}
|
||||
|
||||
article.post-preview {
|
||||
border: 3px solid white;
|
||||
}
|
||||
|
||||
article.post-preview.post-status-has-parent {
|
||||
border: 3px solid #CC0;
|
||||
}
|
||||
|
||||
article.post-preview.post-status-has-children {
|
||||
border: 3px solid #0F0;
|
||||
}
|
||||
|
||||
article.post-preview.post-status-pending {
|
||||
border: 3px solid #00F;
|
||||
}
|
||||
|
||||
article.post-preview.post-status-flagged {
|
||||
border: 3px solid #F00;
|
||||
}
|
||||
|
||||
div#c-posts {
|
||||
li.category-1 a {
|
||||
color: #A00;
|
||||
|
||||
@@ -5,7 +5,7 @@ class PostPresenter < Presenter
|
||||
flags << "flagged" if post.is_flagged?
|
||||
flags << "deleted" if post.is_deleted?
|
||||
|
||||
html = %{<article class="post-preview" id="post_#{post.id}" data-id="#{post.id}" data-tags="#{h(post.tag_string)}" data-uploader="#{h(post.uploader_name)}" data-rating="#{post.rating}" data-width="#{post.image_width}" data-height="#{post.image_height}" data-flags="#{flags.join(' ')}">}
|
||||
html = %{<article class="post-preview" id="post_#{post.id}" data-id="#{post.id}" data-tags="#{h(post.tag_string)}" data-uploader="#{h(post.uploader_name)}" data-rating="#{post.rating}" data-width="#{post.image_width}" data-height="#{post.image_height}" data-flags="#{flags.join(' ')}" data-parent-id="#{post.parent_id}" data-has-children="#{post.has_children?}">}
|
||||
html << %{<a href="/posts/#{post.id}">}
|
||||
|
||||
if post.is_image?
|
||||
|
||||
Reference in New Issue
Block a user