Changeset 23371
- Timestamp:
- 02/02/2013 01:31:06 AM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/wp-admin.css
r23370 r23371 2528 2528 } 2529 2529 2530 tr.wp-locked .locked-indicator { 2531 background: url('../images/lock16.png') no-repeat; 2532 margin: -2px 0 0 8px; 2533 height: 16px; 2534 width: 16px; 2535 } 2536 2537 tr.wp-locked .check-column label, 2538 tr.wp-locked .check-column input[type="checkbox"], 2539 tr.wp-locked .row-actions .inline, 2540 tr.wp-locked .row-actions .trash, 2541 .lock-holder { 2542 display: none; 2543 } 2544 2545 tr.wp-locked .lock-holder { 2546 display: inline; 2547 } 2548 2530 2549 .fixed .column-comments .sorting-indicator { 2531 2550 margin-top: 3px; -
trunk/wp-admin/includes/class-wp-posts-list-table.php
r23354 r23371 473 473 $post_type_object = get_post_type_object( $post->post_type ); 474 474 $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID ); 475 $lock_holder_id = wp_check_post_lock( $post->ID ); 476 $lock_holder = ''; 475 477 476 478 $alternate = 'alternate' == $alternate ? '' : 'alternate'; 477 479 $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); 480 481 if ( $lock_holder_id ) { 482 $classes .= ' wp-locked'; 483 $lock_holder_data = get_user_by( 'id', $lock_holder_id ); 484 485 if ( $lock_holder_data ) 486 $lock_holder = esc_html( sprintf( __('Currently edited by %s'), $lock_holder_data->data->display_name ) ); 487 } 478 488 ?> 479 489 <tr id="post-<?php echo $post->ID; ?>" class="<?php echo implode( ' ', get_post_class( $classes, $post->ID ) ); ?>" valign="top"> … … 496 506 ?> 497 507 <th scope="row" class="check-column"> 498 <?php if ( $can_edit_post ) { ?> 508 <?php 509 if ( $can_edit_post ) { 510 511 ?> 499 512 <label class="screen-reader-text" for="cb-select-<?php the_ID(); ?>"><?php printf( __( 'Select %s' ), $title ); ?></label> 500 513 <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" /> 501 <?php } ?> 514 <div class="locked-indicator"></div> 515 <?php 516 } 517 ?> 502 518 </th> 503 519 <?php … … 526 542 527 543 $pad = str_repeat( '— ', $level ); 528 ?> 529 <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); echo isset( $parent_name ) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?></strong> 530 <?php 531 } 532 else { 544 545 ?> 546 <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); echo isset( $parent_name ) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name ) : ''; ?></strong> 547 <?php 548 549 if ( $can_edit_post && $post->post_status != 'trash' ) { 550 ?> 551 <span class="lock-holder"><?php echo $lock_holder; ?></span> 552 <?php 553 } 554 } else { 533 555 $attributes = 'class="post-title page-title column-title"' . $style; 534 556 535 557 $pad = str_repeat( '— ', $level ); 536 ?> 537 <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); ?></strong> 538 <?php 558 559 ?> 560 <td <?php echo $attributes ?>><strong><?php if ( $can_edit_post && $post->post_status != 'trash' ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $title ) ); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states( $post ); ?></strong> 561 <?php 562 563 if ( $can_edit_post && $post->post_status != 'trash' ) { 564 ?> 565 <span class="lock-holder"><?php echo $lock_holder; ?></span> 566 <?php 567 } 568 539 569 if ( 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) ) 540 570 the_excerpt();
Note: See TracChangeset
for help on using the changeset viewer.