Add a link to the post a comment is for when editing a comment. Fixes #4345 props mgrouchy,

git-svn-id: http://svn.automattic.com/wordpress/trunk@6432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2007-12-20 20:31:46 +00:00
parent ff4b271a82
commit 7a8c378a07
2 changed files with 15 additions and 3 deletions

View File

@ -42,9 +42,16 @@ addLoadEvent(focusit);
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?>
</fieldset>
<p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
</p>
<?php
$post = get_post($comment->comment_post_ID); //get the post
$post_title = $post->post_title; // and its title
?>
<div>
<a href="<?php echo get_permalink($comment->comment_post_ID); ?>" class="view-comment-post-link" target="_blank"><?php echo sprintf('%s &raquo;',$post_title); ?></a>
<p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
</p>
</div>
</div>

View File

@ -1383,4 +1383,9 @@ a.view-link {
#pass-strength-result.strong {
background-color: #59ef86;
border: 1px solid #319f52;
}
a.view-comment-post-link {
position: absolute;
text-decoration:underline;
}