-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeremy Walker
committed
Dec 5, 2012
1 parent
5767a12
commit e3b0ca4
Showing
3 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Admin::BlogCommentsHelper | ||
def admin_blog_comment_class(comment) | ||
"comment " + | ||
if comment.verified? | ||
'verified' | ||
elsif comment.probably_spam? | ||
'probably_spam' | ||
else | ||
"" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
%tr{id:"comment_#{comment.id}"} | ||
%tr{id:"comment_#{comment.id}", class: admin_blog_comment_class(comment)} | ||
%td= comment.id | ||
%td= truncate(comment.blog_post.title, length: 100) | ||
%td #{comment.user_name} (#{comment.user_email}) | ||
%td | ||
%div{style:"word-wrap: break-word;width:266px"}= comment.content | ||
%td | ||
-unless comment.verified? | ||
= link_to "Verify ·".html_safe, verify_admin_blog_comment_path(comment), method: :put, remote:true | ||
%td= link_to "Verify ·".html_safe, verify_admin_blog_comment_path(comment), method: :put, remote:true, class: "verify" | ||
%td= link_to "Delete", admin_blog_comment_path(comment), method: :delete, confirm:"You really want to delete this comment?", remote:true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters