mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Move Show Settings into header and rename Advanced Options. Move preview links into submit box. see #7552
git-svn-id: http://svn.automattic.com/wordpress/trunk@8883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
727c0fc3d5
commit
460f30e7dd
@ -412,6 +412,19 @@ endif;
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('post') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<h2><?php
|
||||
if ( !isset($post_ID) || 0 == $post_ID)
|
||||
printf( __( '<a href="%s">Posts</a> / Write New Post' ), 'edit.php' );
|
||||
@ -447,18 +460,6 @@ $saveasdraft = '<input name="save" type="submit" id="save" class="button" tabind
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('post') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<div id="side-info" style="display: none;"><?php // TODO ?>
|
||||
|
||||
<h5><?php _e('Related') ?></h5>
|
||||
|
@ -46,6 +46,11 @@ function xfn_check($class, $value = '', $deprecated = '') {
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" />
|
||||
|
||||
<?php if ( !empty($link->link_id) ) { ?>
|
||||
<a class="preview button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( ( 'edit' == $action) && current_user_can('manage_links') )
|
||||
echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete link') . "</a>";
|
||||
@ -265,13 +270,20 @@ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php echo $heading; ?></h2>
|
||||
|
||||
<?php if ( !empty($link->link_id) ) { ?>
|
||||
<div id="previewview">
|
||||
<a class="button" href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a>
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('link') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<h2><?php echo $heading; ?></h2>
|
||||
|
||||
<!--
|
||||
<p id="big-add-button">
|
||||
@ -302,18 +314,6 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('link') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
<?php
|
||||
|
||||
|
@ -61,17 +61,41 @@ function page_submit_meta_box($post) {
|
||||
<div class="submitbox" id="submitpage">
|
||||
|
||||
<div class="inside-submitbox">
|
||||
<p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p>
|
||||
<p>
|
||||
<select name='post_status' tabindex='4' id='post_status'>
|
||||
<?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages')
|
||||
// 'publish' option will be selected for published AND private posts (checkbox overrides dropdown)
|
||||
if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) :
|
||||
|
||||
<p><label for='post_status'><?php _e('This post is') ?></label>
|
||||
<strong><span id="post-status-display">
|
||||
<?php
|
||||
switch ( $post->post_status ) {
|
||||
case 'publish':
|
||||
case 'private':
|
||||
_e('Published');
|
||||
break;
|
||||
case 'future':
|
||||
_e('Scheduled');
|
||||
break;
|
||||
case 'pending':
|
||||
_e('Pending Review');
|
||||
break;
|
||||
case 'draft':
|
||||
_e('Unpublished');
|
||||
break;
|
||||
}
|
||||
?>
|
||||
</span></strong>
|
||||
<a href="#edit_post_status" class="edit-post-status hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
|
||||
</p>
|
||||
|
||||
<p id='post-status-select' class="hide-if-js">
|
||||
<select name='post_status' id='post_status' tabindex='4'>
|
||||
<?php
|
||||
// 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)
|
||||
if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : ?>
|
||||
<?php if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { ?>
|
||||
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
|
||||
<?php endif; ?>
|
||||
<?php } ?>
|
||||
<?php if ( 'future' == $post->post_status ) : ?>
|
||||
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option>
|
||||
<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
|
||||
<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option>
|
||||
@ -97,16 +121,29 @@ if ( 0 != $post->ID ) {
|
||||
$time = mysql2date(get_option('time_format'), current_time('mysql'));
|
||||
}
|
||||
?>
|
||||
<?php if ( current_user_can( 'publish_pages' ) ) : // Contributors don't get to choose the date of publish ?>
|
||||
<p class="curtime"><?php printf($stamp, $date, $time); ?>
|
||||
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p>
|
||||
|
||||
<div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="submit">
|
||||
<?php do_action('page_submitbox_start'); ?>
|
||||
<input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" />
|
||||
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a class="preview button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>
|
||||
<?php } else { ?>
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) )
|
||||
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>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
<?php
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->ID ) {
|
||||
?>
|
||||
@ -117,11 +154,7 @@ if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post->
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ( ('edit' == $action) && current_user_can('delete_page', $post->ID) )
|
||||
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>";
|
||||
?>
|
||||
<br class="clear" />
|
||||
|
||||
<!-- moved under the editor
|
||||
<?php if ( 0 != $post->ID ) : ?>
|
||||
@ -248,6 +281,19 @@ endif;
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('page') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<h2><?php
|
||||
if ( !isset($post_ID) || 0 == $post_ID )
|
||||
printf( __( '<a href="%s">Pages</a> / Write New Page' ), 'edit-pages.php' );
|
||||
@ -255,14 +301,6 @@ endif;
|
||||
printf( __( '<a href="%s">Pages</a> / Edit Page' ), 'edit-pages.php' );
|
||||
?></h2>
|
||||
|
||||
<div id="previewview">
|
||||
<?php if ( 'publish' == $post->post_status ) { ?>
|
||||
<a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Page'); ?></a>
|
||||
<?php } elseif ( 'edit' == $action ) { ?>
|
||||
<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>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
wp_nonce_field($nonce_action);
|
||||
|
||||
@ -315,18 +353,6 @@ if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND
|
||||
|
||||
<div id="poststuff">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
<h5><?php _e('Show on screen') ?></h5>
|
||||
<div class="metabox-prefs">
|
||||
<?php meta_box_prefs('page') ?>
|
||||
<br class="clear" />
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<div id="side-info-column" class="inner-sidebar">
|
||||
|
||||
<?php
|
||||
|
@ -88,8 +88,8 @@ require_once('admin-header.php');
|
||||
<div class="wrap">
|
||||
<form id="posts-filter" action="" method="get">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
|
@ -83,8 +83,8 @@ else
|
||||
|
||||
<form id="posts-filter" action="" method="get">
|
||||
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
|
||||
<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a>
|
||||
<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div>
|
||||
|
||||
<div id="edit-settings" class="hide-if-js hide-if-no-js">
|
||||
<div id="edit-settings-wrap">
|
||||
|
@ -60,4 +60,14 @@ jQuery(document).ready( function($) {
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery('.edit-post-status').click(function () {
|
||||
if (jQuery('#post-status-select').is(":hidden")) {
|
||||
jQuery('#post-status-select').slideDown("normal");
|
||||
} else {
|
||||
jQuery('#post-status-select').slideUp("normal");
|
||||
jQuery('#post-status-display').html(jQuery('#post_status :selected').text());
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user