kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-11-03 04:36 am

[dw-free] Note which of your comments have replies on Manage Comments

[commit: http://hg.dwscoalition.org/dw-free/rev/bc5ceaf8b7c4]

http://bugs.dwscoalition.org/show_bug.cgi?id=2003

Star comments on Manage Comments page that have been replied to.

Patch by [personal profile] yvi.

Files modified:
  • htdocs/tools/recent_comments.bml
  • htdocs/tools/recent_comments.bml.text
--------------------------------------------------------------------------------
diff -r dd9f380a08de -r bc5ceaf8b7c4 htdocs/tools/recent_comments.bml
--- a/htdocs/tools/recent_comments.bml	Tue Nov 03 02:00:48 2009 +0000
+++ b/htdocs/tools/recent_comments.bml	Mon Nov 02 22:36:37 2009 -0600
@@ -278,6 +278,8 @@ body<=
             my $lrow = $logrow{"$ju->{userid} $r->{nodeid}"} ||= LJ::get_log2_row($ju, $r->{'nodeid'});
             my $talkid = ($r->{'jtalkid'} << 8) + $lrow->{'anum'};
 
+            my $comment = LJ::Comment->new( $ju, dtalkid => $talkid );
+
             my $logurl = $ju->journal_base . "/$lrow->{ditemid}.html";
             my $commentanchor = LJ::Talk::comment_anchor( $talkid );
             my $talkurl = "$logurl?thread=$talkid$commentanchor";
@@ -290,6 +292,9 @@ body<=
                 $subject = $log_text->{"$r->{journalid} $r->{nodeid}"}[0] || "$lrow->{ditemid}.html";
                 LJ::CleanHTML::clean_subject(\$subject);
                 $subject = "$subject <a href='$logurl'>(link)</a>";
+                # add a sign if the comment has replies
+                $subject .= "*" if $comment->has_nondeleted_children;
+                # delete link, very helpful for when the user does not have access to that entry anymore
                 $delete = "&nbsp;<a href='$LJ::SITEROOT/delcomment?journal=$ju->{'user'}&amp;id=$talkid'>$ML{ '.delete.link' }</a>";
             } else {
                 $subject = $ML{ '.post.deleted' };
@@ -299,6 +304,8 @@ body<=
         }
         $ret .= "</table>";
     }
+
+    $ret .= $ML{ '.reply' };
 
     my $js_screen_color = "\"" . LJ::ejs(BML::get_template_def("screenedbarcolor")) . "\"";
     $ret .= "<script>var LJ_cmtinfo = " . LJ::js_dumper(\%LJ_cmtinfo) . ";\n" .
diff -r dd9f380a08de -r bc5ceaf8b7c4 htdocs/tools/recent_comments.bml.text
--- a/htdocs/tools/recent_comments.bml.text	Tue Nov 03 02:00:48 2009 +0000
+++ b/htdocs/tools/recent_comments.bml.text	Mon Nov 02 22:36:37 2009 -0600
@@ -36,6 +36,8 @@
 
 .post.deleted=Post Deleted
 
+.reply=*: This comment has been replied to.
+
 .time=Time
 
 .title=Manage Comments
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org