Add link to the thread root in comment notification emails.
Patch by 900degrees.
diffs (41 lines):
diff -r 01fa81116200 -r f28dc2867880 bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Sun May 02 05:37:39 2010 +0000
+++ b/bin/upgrading/en.dat Sun May 02 05:42:16 2010 +0000
@@ -1795,6 +1795,8 @@ esn.view_profile=[[openlink]]View [[post
esn.view_thread=[[openlink]]View the thread[[closelink]] starting from this
comment
+esn.view_threadroot=[[openlink]]Go to the top of the thread[[closelink]] this
comment is part of
+
esn.you_can=You can:
esn.you_must_unscreen=You must respond to it or unscreen it before others can
see it.
diff -r 01fa81116200 -r f28dc2867880 cgi-bin/LJ/Comment.pm
--- a/cgi-bin/LJ/Comment.pm Sun May 02 05:37:39 2010 +0000
+++ b/cgi-bin/LJ/Comment.pm Sun May 02 05:42:16 2010 +0000
@@ -1129,6 +1129,7 @@ my @_ml_strings_en = (
'esn.here_you_can',
# 'From here, you can:',
'esn.view_thread',
# '[[openlink]]View the thread[[closelink]] starting from this comment',
+ 'esn.view_threadroot',
# '[[openlink]]Go to the top of the thread[[closelink]] this comment is part
of',
'esn.view_comments',
# '[[openlink]]View all comments[[closelink]] to this entry',
'esn.reply_at_webpage',
# '[[openlink]]Reply[[closelink]] at the webpage',
'esn.unscreen_comment',
# '[[openlink]]Unscreen the comment[[closelink]]',
@@ -1479,11 +1480,12 @@ sub _format_mail_both {
$body .= LJ::Event::format_options(undef, $is_html, $lang, $vars,
{
'esn.view_thread' => [ 1, $self->thread_url ],
- 'esn.view_comments' => [ 2, $talkurl ],
- 'esn.reply_at_webpage' => [ 3, $self->reply_url ],
- 'esn.unscreen_comment' => [ $can_unscreen ? 4 : 0,
$self->unscreen_url ],
- 'esn.delete_comment' => [ $self->user_can_delete($targetu) ? 5
: 0, $self->delete_url ],
- 'esn.edit_comment' => [ $self->user_can_edit($targetu) ? 6 :
0, $self->edit_url ],
+ 'esn.view_threadroot' => [ $self->parenttalkid != 0 ? 2 : 0,
$self->threadroot_url ],
+ 'esn.view_comments' => [ 3, $talkurl ],
+ 'esn.reply_at_webpage' => [ 4, $self->reply_url ],
+ 'esn.unscreen_comment' => [ $can_unscreen ? 5 : 0,
$self->unscreen_url ],
+ 'esn.delete_comment' => [ $self->user_can_delete($targetu) ? 6
: 0, $self->delete_url ],
+ 'esn.edit_comment' => [ $self->user_can_edit($targetu) ? 7 :
0, $self->edit_url ],
});
my $want_form = $is_html && ($self->is_active || $can_unscreen); # this
should probably be a preference, or maybe just always off.
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog