Changeset 8883
- Timestamp:
- 09/13/2008 07:12:55 PM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r8875 r8883 413 413 414 414 <div class="wrap"> 415 416 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 417 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 418 419 <div id="edit-settings" class="hide-if-js hide-if-no-js"> 420 <div id="edit-settings-wrap"> 421 <h5><?php _e('Show on screen') ?></h5> 422 <div class="metabox-prefs"> 423 <?php meta_box_prefs('post') ?> 424 <br class="clear" /> 425 </div></div> 426 </div> 427 415 428 <h2><?php 416 429 if ( !isset($post_ID) || 0 == $post_ID) … … 447 460 448 461 <div id="poststuff"> 449 450 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>451 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>452 453 <div id="edit-settings" class="hide-if-js hide-if-no-js">454 <div id="edit-settings-wrap">455 <h5><?php _e('Show on screen') ?></h5>456 <div class="metabox-prefs">457 <?php meta_box_prefs('post') ?>458 <br class="clear" />459 </div></div>460 </div>461 462 462 463 <div id="side-info" style="display: none;"><?php // TODO ?> -
trunk/wp-admin/edit-link-form.php
r8753 r8883 47 47 <p class="submit"> 48 48 <input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" /> 49 50 <?php if ( !empty($link->link_id) ) { ?> 51 <a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a> 52 <?php } ?> 53 49 54 <?php 50 55 if ( ( 'edit' == $action) && current_user_can('manage_links') ) … … 266 271 267 272 <div class="wrap"> 273 274 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 275 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 276 277 <div id="edit-settings" class="hide-if-js hide-if-no-js"> 278 <div id="edit-settings-wrap"> 279 <h5><?php _e('Show on screen') ?></h5> 280 <div class="metabox-prefs"> 281 <?php meta_box_prefs('link') ?> 282 <br class="clear" /> 283 </div></div> 284 </div> 285 268 286 <h2><?php echo $heading; ?></h2> 269 270 <?php if ( !empty($link->link_id) ) { ?>271 <div id="previewview">272 <a class="button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>273 </div>274 <?php } ?>275 287 276 288 <!-- … … 303 315 <div id="poststuff"> 304 316 305 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>306 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>307 308 <div id="edit-settings" class="hide-if-js hide-if-no-js">309 <div id="edit-settings-wrap">310 <h5><?php _e('Show on screen') ?></h5>311 <div class="metabox-prefs">312 <?php meta_box_prefs('link') ?>313 <br class="clear" />314 </div></div>315 </div>316 317 317 <div id="side-info-column" class="inner-sidebar"> 318 318 <?php -
trunk/wp-admin/edit-page-form.php
r8862 r8883 62 62 63 63 <div class="inside-submitbox"> 64 <p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p> 65 <p> 66 <select name='post_status' tabindex='4' id='post_status'> 67 <?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages') 68 // 'publish' option will be selected for published AND private posts (checkbox overrides dropdown) 69 if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : 70 ?> 64 65 <p><label for='post_status'><?php _e('This post is') ?></label> 66 <strong><span id="post-status-display"> 67 <?php 68 switch ( $post->post_status ) { 69 case 'publish': 70 case 'private': 71 _e('Published'); 72 break; 73 case 'future': 74 _e('Scheduled'); 75 break; 76 case 'pending': 77 _e('Pending Review'); 78 break; 79 case 'draft': 80 _e('Unpublished'); 81 break; 82 } 83 ?> 84 </span></strong> 85 <a href="#edit_post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> 86 </p> 87 88 <p id='post-status-select' class="hide-if-js"> 89 <select name='post_status' id='post_status' tabindex='4'> 90 <?php 91 // only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability) 92 if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : ?> 93 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { ?> 71 94 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 72 <?php endif;?>95 <?php } ?> 73 96 <?php if ( 'future' == $post->post_status ) : ?> 74 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option> 97 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> 98 <?php endif; ?> 75 99 <?php endif; ?> 76 100 <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> … … 98 122 } 99 123 ?> 124 <?php if ( current_user_can( 'publish_pages' ) ) : // Contributors don't get to choose the date of publish ?> 100 125 <p class="curtime"><?php printf($stamp, $date, $time); ?> 101 126 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p> 102 127 103 128 <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div> 129 <?php endif; ?> 104 130 105 131 </div> … … 108 134 <?php do_action('page_submitbox_start'); ?> 109 135 <input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" /> 136 137 <?php if ( 'publish' == $post->post_status ) { ?> 138 <a class="preview button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a> 139 <?php } else { ?> 140 <a class="preview button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview'); ?></a> 141 <?php } ?> 142 143 <?php if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) ) 144 echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post->ID", 'delete-page_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>"; 145 ?> 146 <br class="clear" /> 110 147 <?php 111 148 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) { … … 118 155 <?php 119 156 } 120 121 if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) ) 122 echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&post=$post->ID", 'delete-page_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete page') . "</a>"; 123 ?> 124 <br class="clear" /> 157 ?> 125 158 126 159 <!-- moved under the editor … … 249 282 250 283 <div class="wrap"> 284 285 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 286 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 287 288 <div id="edit-settings" class="hide-if-js hide-if-no-js"> 289 <div id="edit-settings-wrap"> 290 <h5><?php _e('Show on screen') ?></h5> 291 <div class="metabox-prefs"> 292 <?php meta_box_prefs('page') ?> 293 <br class="clear" /> 294 </div></div> 295 </div> 296 251 297 <h2><?php 252 298 if ( !isset($post_ID) || 0 == $post_ID ) … … 255 301 printf( __( '<a href="%s">Pages</a> / Edit Page' ), 'edit-pages.php' ); 256 302 ?></h2> 257 258 <div id="previewview">259 <?php if ( 'publish' == $post->post_status ) { ?>260 <a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>261 <?php } elseif ( 'edit' == $action ) { ?>262 <a class="button" href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a>263 <?php } ?>264 </div>265 303 266 304 <?php … … 316 354 <div id="poststuff"> 317 355 318 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>319 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>320 321 <div id="edit-settings" class="hide-if-js hide-if-no-js">322 <div id="edit-settings-wrap">323 <h5><?php _e('Show on screen') ?></h5>324 <div class="metabox-prefs">325 <?php meta_box_prefs('page') ?>326 <br class="clear" />327 </div></div>328 </div>329 330 356 <div id="side-info-column" class="inner-sidebar"> 331 357 -
trunk/wp-admin/edit-pages.php
r8867 r8883 89 89 <form id="posts-filter" action="" method="get"> 90 90 91 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e(' Show Settings') ?></a>92 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>91 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 92 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 93 93 94 94 <div id="edit-settings" class="hide-if-js hide-if-no-js"> -
trunk/wp-admin/edit.php
r8867 r8883 84 84 <form id="posts-filter" action="" method="get"> 85 85 86 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e(' Show Settings') ?></a>87 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>86 <div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 87 <a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 88 88 89 89 <div id="edit-settings" class="hide-if-js hide-if-no-js"> -
trunk/wp-admin/js/page.js
r8752 r8883 61 61 return false; 62 62 }); 63 64 jQuery('.edit-post-status').click(function () { 65 if (jQuery('#post-status-select').is(":hidden")) { 66 jQuery('#post-status-select').slideDown("normal"); 67 } else { 68 jQuery('#post-status-select').slideUp("normal"); 69 jQuery('#post-status-display').html(jQuery('#post_status :selected').text()); 70 } 71 return false; 72 }); 63 73 });
Note: See TracChangeset
for help on using the changeset viewer.