Ticket #7721: 7722-v1.patch
File 7722-v1.patch, 10.2 KB (added by , 7 years ago) |
---|
-
src/bp-core/admin/css/common-rtl.css
18 18 2.1 Top level menus 19 19 2.2 Settings - Components 20 20 2.3 Tools 21 3.0 User's Lists 21 3.0 Users 22 3.1 Users List 23 3.2 Site Notices 22 24 4.0 Emails - Edit page 23 25 5.0 Tools - BuddyPress 24 26 6.0 Plugins page … … 569 571 570 572 571 573 /*------------------------------------------------------------------------------ 572 * 3.0 User 's Lists574 * 3.0 Users 573 575 *----------------------------------------------------------------------------*/ 576 577 /* 578 * 3.1 Users List 579 */ 574 580 body.site-users-php th#role, 575 581 body.users-php th#role, 576 582 body.users_page_bp-signups th#count_sent { … … 607 613 font-weight: 700; 608 614 } 609 615 616 /* 617 * 3.2 Site Notices 618 */ 619 .bp-new-notice-panel { 620 background: #fff; 621 border: 1px solid #e5e5e5; 622 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); 623 font-size: 13px; 624 line-height: 2.1; 625 margin: 1.5em 0 3em; 626 overflow: auto; 627 padding: 10px 25px 25px; 628 position: relative; 629 } 630 631 .bp-new-notice-panel label { 632 clear: both; 633 float: right; 634 margin-left: 3%; 635 width: 20%; 636 } 637 638 .bp-new-notice-panel input, 639 .bp-new-notice-panel textarea { 640 clear: none; 641 margin-bottom: 1em; 642 width: 75%; 643 } 644 645 .bp-new-notice-panel input[type="text"]:after, 646 .bp-new-notice-panel textarea:after { 647 clear: both; 648 content: " "; 649 display: table; 650 } 651 652 .bp-new-notice-panel .button-primary { 653 margin-right: 23%; 654 width: auto; 655 } 656 657 .bp-notice-about { 658 font-size: 1em; 659 margin-bottom: 1em; 660 } 661 662 .bp-new-notice { 663 margin-bottom: 1em; 664 margin-top: 0; 665 } 666 667 .bp-notices-list { 668 margin-bottom: 0; 669 } 670 671 @media screen and (max-width: 782px) { 672 673 .bp-new-notice-panel { 674 margin-bottom: 1.5em; 675 } 676 677 .bp-new-notice-panel input, 678 .bp-new-notice-panel textarea { 679 margin-right: 0; 680 width: 100%; 681 } 682 683 .bp-new-notice-panel .button-primary { 684 margin-right: 0; 685 width: auto; 686 } 687 688 .bp-new-notice-panel .button { 689 max-width: 45%; 690 word-wrap: break-word; 691 } 692 693 .bp-notice-about { 694 margin-top: 0; 695 margin-bottom: 1em; 696 } 697 698 .bp-new-notice { 699 margin-bottom: 0.5em; 700 } 701 } 702 610 703 /*------------------------------------------------------------------------------ 611 704 * 4.0 Emails - Edit Page 612 705 *----------------------------------------------------------------------------*/ -
src/bp-core/admin/css/common.css
18 18 2.1 Top level menus 19 19 2.2 Settings - Components 20 20 2.3 Tools 21 3.0 User's Lists 21 3.0 Users 22 3.1 Users List 23 3.2 Site Notices 22 24 4.0 Emails - Edit page 23 25 5.0 Tools - BuddyPress 24 26 6.0 Plugins page … … 569 571 570 572 571 573 /*------------------------------------------------------------------------------ 572 * 3.0 User 's Lists574 * 3.0 Users 573 575 *----------------------------------------------------------------------------*/ 576 577 /* 578 * 3.1 Users List 579 */ 574 580 body.site-users-php th#role, 575 581 body.users-php th#role, 576 582 body.users_page_bp-signups th#count_sent { … … 607 613 font-weight: 700; 608 614 } 609 615 616 /* 617 * 3.2 Site Notices 618 */ 619 .bp-new-notice-panel { 620 background: #fff; 621 border: 1px solid #e5e5e5; 622 box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); 623 font-size: 13px; 624 line-height: 2.1; 625 margin: 1.5em 0 3em; 626 overflow: auto; 627 padding: 10px 25px 25px; 628 position: relative; 629 } 630 631 .bp-new-notice-panel label { 632 clear: both; 633 float: left; 634 margin-right: 3%; 635 width: 20%; 636 } 637 638 .bp-new-notice-panel input, 639 .bp-new-notice-panel textarea { 640 clear: none; 641 margin-bottom: 1em; 642 width: 75%; 643 } 644 645 .bp-new-notice-panel input[type="text"]:after, 646 .bp-new-notice-panel textarea:after { 647 clear: both; 648 content: " "; 649 display: table; 650 } 651 652 .bp-new-notice-panel .button-primary { 653 margin-left: 23%; 654 width: auto; 655 } 656 657 .bp-notice-about { 658 font-size: 1em; 659 margin-bottom: 1em; 660 } 661 662 .bp-new-notice { 663 margin-bottom: 1em; 664 margin-top: 0; 665 } 666 667 .bp-notices-list { 668 margin-bottom: 0; 669 } 670 671 @media screen and (max-width: 782px) { 672 673 .bp-new-notice-panel { 674 margin-bottom: 1.5em; 675 } 676 677 .bp-new-notice-panel input, 678 .bp-new-notice-panel textarea { 679 margin-left: 0; 680 width: 100%; 681 } 682 683 .bp-new-notice-panel .button-primary { 684 margin-left: 0; 685 width: auto; 686 } 687 688 .bp-new-notice-panel .button { 689 max-width: 45%; 690 word-wrap: break-word; 691 } 692 693 .bp-notice-about { 694 margin-top: 0; 695 margin-bottom: 1em; 696 } 697 698 .bp-new-notice { 699 margin-bottom: 0.5em; 700 } 701 } 702 610 703 /*------------------------------------------------------------------------------ 611 704 * 4.0 Emails - Edit Page 612 705 *----------------------------------------------------------------------------*/ -
src/bp-messages/classes/class-bp-messages-component.php
323 323 $wp_admin_nav[] = array( 324 324 'parent' => 'my-account-' . $this->id, 325 325 'id' => 'my-account-' . $this->id . '-notices', 326 'title' => __( ' All MemberNotices', 'buddypress' ),326 'title' => __( 'Site Notices', 'buddypress' ), 327 327 'href' => trailingslashit( $messages_link . 'notices' ), 328 328 'position' => 90 329 329 ); -
src/bp-messages/classes/class-bp-messages-notices-admin.php
36 36 * @var object 37 37 */ 38 38 public $list_table = ''; 39 40 39 40 41 41 /** 42 42 * Create a new instance or access the current instance of this class. 43 43 * … … 87 87 } 88 88 89 89 /** 90 * Add the ' All MemberNotices' admin menu item.90 * Add the 'Site Notices' admin menu item. 91 91 * 92 92 * @since 3.0.0 93 93 */ … … 98 98 } 99 99 100 100 $this->screen_id = add_users_page( 101 _x( ' All MemberNotices', 'Notices admin page title', 'buddypress' ),102 _x( ' All MemberNotices', 'Admin Users menu', 'buddypress' ),101 _x( 'Site Notices', 'Notices admin page title', 'buddypress' ), 102 _x( 'Site Notices', 'Admin Users menu', 'buddypress' ), 103 103 'manage_options', 104 104 'bp-notices', 105 105 array( $this, 'admin_index' ) … … 154 154 case 'delete': 155 155 $notice = new BP_Messages_Notice( $notice_id ); 156 156 $success = $notice->delete(); 157 break; 157 break; 158 158 } 159 159 if ( $success ) { 160 160 $redirect_to = add_query_arg( 'success', 'update', $this->url ); … … 185 185 <div class="wrap"> 186 186 <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?> 187 187 188 <h1 class="wp-heading-inline"><?php echo esc_html_x( 'All Member Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 189 190 <a id="add_notice" class="page-title-action" href="#"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></a> 191 188 <h1 class="wp-heading-inline"><?php echo esc_html_x( 'Site Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 192 189 <hr class="wp-header-end"> 193 190 194 191 <?php else : ?> 195 192 196 <h1> 197 <?php echo esc_html_x( 'All Member Notices', 'Notices admin page title', 'buddypress' ); ?> 198 <a id="add_notice" class="add-new-h2" href="#"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></a> 199 </h1> 193 <h1><?php echo esc_html_x( 'Site Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 200 194 201 195 <?php endif; ?> 202 196 203 <form action=<?php echo esc_url( wp_nonce_url( $this->url, 'new-notice', 'ns-nonce' ) ); ?> method="post"> 204 <table class="widefat"> 205 <tr> 206 <td><label for="bp_notice_subject"><?php esc_html_e( 'Subject', 'buddypress' ); ?></label></td> 207 <td><input type="text" class="widefat" id="bp_notice_subject" name="bp_notice[subject]"/></td> 208 </tr> 209 <tr> 210 <td><label for="bp_notice_content"><?php esc_html_e( 'Content', 'buddypress' ); ?></label></td> 211 <td><textarea class="widefat" id="bp_notice_content" name="bp_notice[content]"></textarea></td> 212 </tr> 213 <tr class="submit"> 214 <td> </td> 215 <td style="float:right"> 216 <input type="reset" value="<?php esc_attr_e( 'Cancel Notice', 'buddypress' ); ?>" class="button-secondary"> 217 <input type="submit" value="<?php esc_attr_e( 'Save Notice', 'buddypress' ); ?>" name="bp_notice[send]" class="button-primary"> 218 </td> 219 </tr> 220 </table> 221 <form> 197 <p class="bp-notice-about"><?php esc_html_e( 'Manage notices shown at front end of your site to all logged-in users.', 'buddypress' ); ?></p> 222 198 199 <div class="bp-new-notice-panel"> 200 201 <h2 class="bp-new-notice"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></h2> 202 203 <form action="<?php echo esc_url( wp_nonce_url( $this->url, 'new-notice', 'ns-nonce' ) ); ?>" method="post"> 204 205 <div> 206 <label for="bp_notice_subject"><?php esc_html_e( 'Subject', 'buddypress' ); ?></label> 207 <input type="text" class="bp-panel-input" id="bp_notice_subject" name="bp_notice[subject]"/> 208 209 <label for="bp_notice_content"><?php esc_html_e( 'Content', 'buddypress' ); ?></label> 210 <textarea class="bp-panel-textarea" id="bp_notice_content" name="bp_notice[content]"></textarea> 211 </div> 212 213 <input type="submit" value="<?php esc_attr_e( 'Publish Notice', 'buddypress' ); ?>" name="bp_notice[send]" class="button button-primary save alignleft"> 214 215 </form> 216 217 </div> 218 223 219 <?php if ( isset( $_GET['success'] ) || isset( $_GET['error'] ) ) : ?> 224 220 225 221 <div id="message" class="<?php echo isset( $_GET['success'] ) ? 'updated' : 'error'; ?>"> … … 230 226 if ( 'create' === $_GET['error'] ) { 231 227 esc_html_e( 'Notice was not created. Please try again.', 'buddypress' ); 232 228 } else { 233 esc_html_e( 'Notice was not updated. Please try again.', 'buddypress' ); 229 esc_html_e( 'Notice was not updated. Please try again.', 'buddypress' ); 234 230 } 235 231 } else { 236 232 if ( 'create' === $_GET['success'] ) { … … 246 242 247 243 <?php endif; ?> 248 244 245 <h2 class="bp-notices-list"><?php esc_html_e( 'Notices List', 'buddypress' ); ?></h2> 246 249 247 <?php $this->list_table->display(); ?> 250 248 251 249 </div>