Ticket #32152: 32152.6.diff
| File 32152.6.diff, 10.0 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/css/list-tables.css
1 /* List table styles */ 2 .post-com-count-wrapper { 3 min-width: 22px; 4 } 5 6 .post-com-count { 7 background: none; 8 height: 1.3em; 9 line-height: 1.1em; 1 .response-links { 10 2 display: block; 11 text-decoration: none; 12 padding: 0 0 6px; 13 cursor: pointer; 14 background-position: center -80px; 15 background-repeat: no-repeat; 16 color: #fff; 3 margin-bottom: 1em; 17 4 } 18 5 19 .post-com-count:after { /* draw bubble connector using CSS! */ 20 content: ""; 6 .response-links a { 21 7 display: block; 22 width: 0;23 height: 0;24 margin-left: 8px;25 border-top: 5px solid #b4b9be;26 border-right: 5px solid transparent;27 8 } 28 9 29 .post-com-count span { 30 font-size: 11px; 10 .response-links a.comments-edit-item-link { 31 11 font-weight: 600; 32 height: 1.4em;33 line-height: 1.4em;34 min-width: 0.7em;35 padding: 0 6px;36 display: inline-block;37 -webkit-border-radius: 5px;38 border-radius: 5px;39 background-color: #b4b9be;40 color: #fff;41 12 } 42 13 43 . post-com-count:hover{44 background-position: center -3px;14 .response-links a.comments-view-item-link { 15 font-size: 12px; 45 16 } 46 17 47 .post-com-count:hover span { 48 background-color: #00a0d2; 18 .column-response .post-com-count .screen-reader-text { 19 position: static; 20 width: auto; 21 height: auto; 22 margin: 0; 49 23 } 50 24 51 . post-com-count:hover:after{52 border-top: 5px solid #00a0d2;25 .column-response .post-com-count [aria-hidden="true"] { 26 display: none; 53 27 } 54 28 55 strong .post-com-count{56 background-position: center -55px;29 .post-com-count-wrapper strong { 30 font-weight: 400; 57 31 } 58 32 59 strong .post-com-count span{60 background-color: #0073aa;33 .column-response .post-com-count.post-com-count-pending { 34 color: #bf461d; 61 35 } 62 36 63 strong .post-com-count:after { 64 border-top: 5px solid #0073aa; 37 .comments-view-item-link { 38 display: inline-block; 39 clear: both; 65 40 } 66 41 42 .fixed .column-comments { 43 width: 6em; 44 } 45 46 .column-comments .post-com-count-wrapper { 47 white-space: nowrap; 48 word-wrap: normal; 49 } 50 51 /* comments bubble common */ 52 .column-comments .post-com-count { 53 display: inline-block; 54 vertical-align: top; 55 } 56 67 57 .column-response .post-com-count { 68 float: left; 69 margin-right: 5px; 58 display: block; 59 } 60 61 /* comments bubble approved */ 62 .column-comments .post-com-count-no-comments, 63 .column-comments .post-com-count-approved { 64 margin-top: 5px; 65 } 66 67 .column-comments .comment-count-no-comments, 68 .column-comments .comment-count-approved { 69 display: block; 70 min-width: 24px; 71 height: 2em; 72 padding: 0 8px; 73 line-height: 1.90909090; /* 1.92857142 */ 74 font-size: 11px; 70 75 text-align: center; 76 background-color: #72777c; 77 color: #fff; 78 -webkit-box-sizing: border-box; 79 -moz-box-sizing: border-box; 80 box-sizing: border-box; 81 -webkit-border-radius: 5px; 82 border-radius: 5px; 71 83 } 72 84 73 .response-links { 74 float: left; 85 .ie8 .column-comments .comment-count-no-comments, 86 .ie8 .column-comments .comment-count-approved { 87 min-width: 0; 75 88 } 76 89 90 .column-comments .post-com-count-no-comments:after, 91 .column-comments .post-com-count-approved:after { 92 content: ""; 93 display: block; 94 width: 0; 95 height: 0; 96 margin-left: 8px; 97 border-top: 5px solid #72777c; 98 border-right: 5px solid transparent; 99 } 100 101 .column-comments .post-com-count-approved:hover .comment-count-approved, 102 .column-comments .post-com-count-approved:focus .comment-count-approved { 103 background: #0073aa; 104 } 105 106 .column-comments .post-com-count-approved:hover:after, 107 .column-comments .post-com-count-approved:focus:after { 108 border-top-color: #0073aa; 109 } 110 111 /* comments bubble pending */ 112 .column-comments .post-com-count-pending { 113 position: relative; 114 left: -3px; 115 min-width: 7px; 116 height: 17px; 117 border: 2px solid #fff; 118 padding: 0 5px; 119 line-height: 17px; 120 font-size: 9px; 121 text-align: center; 122 background: #ca4a1f; 123 color: #fff; 124 -webkit-border-radius: 11px; 125 border-radius: 11px; 126 } 127 77 128 /* comments */ 78 129 79 130 .commentlist li { … … 283 334 } 284 335 285 336 .fixed .column-comments { 286 width: 4em;287 337 padding: 8px 0; 288 338 text-align: left; 289 339 } … … 292 342 padding-left: 3px; 293 343 } 294 344 295 .fixed .column-comments a {296 float: left;297 }298 345 299 346 td.column-title strong, 300 347 td.plugin-title strong { … … 1452 1499 } 1453 1500 } 1454 1501 1455 @media screen and ( max-width: 782px ) {1456 .plugin-card {1457 margin-left: 0;1458 margin-right: 0;1459 width: 100%;1460 }1461 }1462 1463 1502 .plugin-card-top { 1464 1503 position: relative; 1465 1504 padding: 20px 20px 10px; … … 2020 2059 -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); 2021 2060 box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); 2022 2061 } 2062 2063 .plugin-card { 2064 margin-left: 0; 2065 margin-right: 0; 2066 width: 100%; 2067 } 2068 2069 .post-com-count .screen-reader-text { 2070 position: static; 2071 width: auto; 2072 height: auto; 2073 margin: 0; 2074 } 2075 2076 .column-comments .post-com-count-no-comments:after, 2077 .column-comments .post-com-count-approved:after { 2078 content: none; 2079 } 2080 2081 .column-comments .post-com-count [aria-hidden="true"] { 2082 display: none; 2083 } 2084 2085 .column-comments .post-com-count-wrapper { 2086 white-space: normal; 2087 } 2088 2089 .column-comments .post-com-count-no-comments, 2090 .column-comments .post-com-count-approved { 2091 margin-top: 0; 2092 margin-right: 0.5em; 2093 } 2094 2095 .column-comments .post-com-count-pending { 2096 position: static; 2097 min-width: 0; 2098 height: auto; 2099 border: none; 2100 padding: 0; 2101 font-size: inherit; 2102 line-height: inherit; 2103 text-align: left; 2104 background: none; 2105 color: #bf461d; 2106 -webkit-border-radius: 0; 2107 border-radius: 0; 2108 } 2023 2109 } -
src/wp-admin/includes/class-wp-comments-list-table.php
678 678 } 679 679 680 680 if ( current_user_can( 'edit_post', $post->ID ) ) { 681 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' >";681 $post_link = "<a href='" . get_edit_post_link( $post->ID ) . "' class='comments-edit-item-link'>"; 682 682 $post_link .= esc_html( get_the_title( $post->ID ) ) . '</a>'; 683 683 } else { 684 684 $post_link = esc_html( get_the_title( $post->ID ) ); 685 685 } 686 686 687 echo '<div class="response-links"><span class="post-com-count-wrapper">'; 688 echo $post_link . '<br />'; 687 echo '<div class="response-links">'; 688 echo $post_link; 689 $post_type_object = get_post_type_object( $post->post_type ); 690 echo "<a href='" . get_permalink( $post->ID ) . "' class='comments-view-item-link'>" . $post_type_object->labels->view_item . '</a>'; 691 if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) { 692 echo $thumb; 693 } 694 echo '</div>'; 695 echo '<span class="post-com-count-wrapper">'; 689 696 $this->comments_bubble( $post->ID, $pending_comments ); 690 697 echo '</span> '; 691 $post_type_object = get_post_type_object( $post->post_type );692 echo "<a href='" . get_permalink( $post->ID ) . "'>" . $post_type_object->labels->view_item . '</a>';693 echo '</div>';694 if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) )695 echo $thumb;696 698 } 697 699 698 700 /** -
src/wp-admin/includes/class-wp-list-table.php
614 614 * @param int $pending_comments Number of pending comments. 615 615 */ 616 616 protected function comments_bubble( $post_id, $pending_comments ) { 617 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 617 $approved_comments = get_comments_number(); 618 $approved_comments_number = number_format_i18n( $approved_comments ); 619 $pending_comments_number = number_format_i18n( $pending_comments ); 620 $approved_only_phrase = sprintf( _n( '%s comment', '%s comments', $approved_comments ), $approved_comments_number ); 621 $approved_phrase = sprintf( _n( '%s approved comment', '%s approved comments', $approved_comments ), $approved_comments_number ); 622 $pending_phrase = sprintf( _n( '%s pending comment', '%s pending comments', $pending_comments ), $pending_comments_number ); 618 623 619 if ( $pending_comments )620 echo '<strong>';624 // No comments at all. 625 if ( ! $approved_comments && ! $pending_comments ) { 621 626 622 echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>"; 627 printf( '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>', 628 __( 'No comments' ) 629 ); 623 630 624 if ( $pending_comments ) 625 echo '</strong>'; 631 // Approved comments have different display depending on some conditions. 632 } elseif ( $approved_comments ) { 633 634 printf( '<a href="%s" class="post-com-count post-com-count-approved"><span class="comment-count-approved" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 635 esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'approved' ), admin_url( 'edit-comments.php' ) ) ), 636 $approved_comments_number, 637 $pending_comments ? $approved_phrase : $approved_only_phrase 638 ); 639 640 } else { 641 642 printf( '<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>', 643 $approved_comments_number, 644 $pending_comments ? __( 'No approved comments' ) : __( 'No comments' ) 645 ); 646 647 } 648 649 // If there are pending comments, just print them. 650 if ( $pending_comments ) { 651 652 printf( '<a href="%s" class="post-com-count post-com-count-pending"><span class="comment-count-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></a>', 653 esc_url( add_query_arg( array( 'p' => $post_id, 'comment_status' => 'moderated' ), admin_url( 'edit-comments.php' ) ) ), 654 $pending_comments_number, 655 $pending_phrase 656 ); 657 658 } 626 659 } 627 660 628 661 /**