Improve the comment browsing UI a bit
git-svn-id: http://svn.automattic.com/wordpress/trunk@3720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2f0c1f6f50
commit
6af7f62f92
|
@ -117,9 +117,13 @@ if ('view' == $mode) {
|
|||
|
||||
<p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A');
|
||||
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
||||
echo " | <a href=\"comment.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
|
||||
echo " | <a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . "</a> ";
|
||||
echo " | <a href=\"comment.php?action=deletecomment&delete_type=spam&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> ";
|
||||
echo " [ <a href='comment.php?action=editcomment&comment=".$comment->comment_ID."\'>" . __('Edit') . '</a>';
|
||||
echo ' | <a href="comment.php?action=deletecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars($comment->comment_author, 1)) . "' );\">" . __('Delete') . '</a> ';
|
||||
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
|
||||
echo '<span class="unapprove"> | <a href="comment.php?action=unapprovecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Unapprove') . '</a> </span>';
|
||||
echo '<span class="approve"> | <a href="comment.php?action=approvecomment&p=' . $post->ID . '&comment=' . $comment->comment_ID . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\' );">' . __('Approve') . '</a> </span>';
|
||||
}
|
||||
echo " | <a href=\"comment.php?action=deletecomment&delete_type=spam&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Mark Comment as Spam') . "</a> ]";
|
||||
} // end if any comments to show
|
||||
// Get post title
|
||||
$post = get_post($comment->comment_post_ID);
|
||||
|
@ -127,12 +131,12 @@ if ('view' == $mode) {
|
|||
$post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title;
|
||||
if ( 'page' == $post->post_type ) {
|
||||
if ( current_user_can('edit_page', $comment->comment_post_ID) ) ?>
|
||||
| <a href="page.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page “%s”'), $post_title); ?></a>
|
||||
[ <a href="page.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Page “%s”'), $post_title); ?></a>
|
||||
<?php } else {
|
||||
if ( current_user_can('edit_post', $comment->comment_post_ID) ) ?>
|
||||
| <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), $post_title); ?></a>
|
||||
[ <a href="post.php?action=edit&post=<?php echo $comment->comment_post_ID; ?>"><?php printf(__('Edit Post “%s”'), $post_title); ?></a>
|
||||
<?php } ?>
|
||||
| <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a></p>
|
||||
| <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php _e('View Post') ?></a> ]</p>
|
||||
</li>
|
||||
|
||||
<?php } // end foreach($comment) ?>
|
||||
|
|
Loading…
Reference in New Issue