[dw-free] Comment headers should indicate if a comment is screened
[commit: http://hg.dwscoalition.org/dw-free/rev/624cbb39f2ca]
http://bugs.dwscoalition.org/show_bug.cgi?id=706
Add (screened) in front of screened comments subjects.
Patch by
yvi.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=706
Add (screened) in front of screened comments subjects.
Patch by
Files modified:
- bin/upgrading/s2layers/core2.s2
- htdocs/talkread.bml
- htdocs/talkread.bml.text
--------------------------------------------------------------------------------
diff -r c264a63ae857 -r 624cbb39f2ca bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2 Thu Aug 27 16:30:55 2009 +0000
+++ b/bin/upgrading/s2layers/core2.s2 Thu Aug 27 17:59:12 2009 +0000
@@ -2332,7 +2332,7 @@ set text_comment_edittime = "Edited at";
property string text_screened {
des = "The text used when a comment is screened";
- example = "(screened)";
+ example = "(screened) ";
}
property string text_poster_anonymous {
@@ -2366,7 +2366,7 @@ property string text_reply_nocomments {
property string text_website_default_name { noui = 1; des = "If an account's website is specified, but there's no website name, use this text instead"; }
-set text_screened = "screened";
+set text_screened = "(screened) ";
set text_poster_anonymous = "(Anonymous)";
set text_openid_from = "from";
set text_reply_back = "Read Comments";
@@ -3928,7 +3928,11 @@ function EntryLite::print_subject() [fix
function EntryLite::print_subject( string{} opts ) [fixed] {
if ($this isa Comment) {
+ var Comment c = $this as Comment;
"""<div class="comment-title">""";
+ if ($c.screened) {
+ print $*text_screened;
+ }
print $this->formatted_subject( $opts );
"</div>";
}
diff -r c264a63ae857 -r 624cbb39f2ca htdocs/talkread.bml
--- a/htdocs/talkread.bml Thu Aug 27 16:30:55 2009 +0000
+++ b/htdocs/talkread.bml Thu Aug 27 17:59:12 2009 +0000
@@ -572,7 +572,11 @@ body<=
}
my $cleansubject = LJ::ehtml($post->{'subject'});
- $ret .= "<span class='commentsubject'><b>$cleansubject</b></span> $icon";
+ if ( $post->{state} eq 'S' ) {
+ $ret .= "<span class='commentsubject'>" . BML::ml( '.comment.screened.subject' ) . "<b>$cleansubject</b></span> $icon";
+ } else {
+ $ret .= "<span class='commentsubject'><b>$cleansubject</b></span> $icon";
+ }
$ret .= "<br />$user\n";
$ret .= " " . BML::ml( '.from_external', {site=>$post->{props}->{imported_from}} ) if $post->{props}->{imported_from};
$ret .= "<br /><span class='datepost'>$datepost</span>\n";
diff -r c264a63ae857 -r 624cbb39f2ca htdocs/talkread.bml.text
--- a/htdocs/talkread.bml.text Thu Aug 27 16:30:55 2009 +0000
+++ b/htdocs/talkread.bml.text Thu Aug 27 17:59:12 2009 +0000
@@ -6,6 +6,8 @@
.button.post=Post Comment
.confirm.action=Are you sure you wish to delete the selected comments?
+
+.comment.screened.subject=(screened)
.deletedpost=<b>(Deleted post)</b>
--------------------------------------------------------------------------------
