Changeset 8685

Show
Ignore:
Timestamp:
08/20/08 05:24:29 (3 months ago)
Author:
ryan
Message:

crazyhorse: Lose fixed bottom bar. Add submit meta box. For links and comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/crazyhorse/wp-admin/edit-form-advanced.php

    r8683 r8685  
    6565 
    6666function post_submit_meta_box($post) { 
     67    global $action; 
    6768?> 
    6869<div class="submitbox" id="submitpost"> 
     
    401402?></h2> 
    402403 
    403 <!--<p id="big-add-button"> 
    404 <span id="previewview"> 
    405 <?php if ( 'publish' == $post->post_status ) { ?> 
    406 <a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank" tabindex="4"><?php _e('View this Post'); ?></a> 
    407 <?php } elseif ( 'edit' == $action ) { ?> 
    408 <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 Post'); ?></a> 
    409 <?php } ?> 
    410 </span> 
    411 </p>--> 
    412  
    413404<?php 
    414405 
  • branches/crazyhorse/wp-admin/edit-form-comment.php

    r8680 r8685  
    2424<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" /> 
    2525<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> 
     26<?php 
     27// All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). 
    2628 
    27 <div id="poststuff"> 
     29function comment_submit_meta_box($comment) { 
     30?> 
     31<div class="submitbox" id="submitcomment"> 
    2832 
    29 <!-- 
    30 <p id="big-add-button"> 
    31 <span id="previewview"> 
    32 <a href="<?php echo get_comment_link(); ?>" class="button" target="_blank"><?php _e('View this Comment'); ?></a> 
    33 </span> 
     33<div id="previewview"> 
     34<a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a> 
     35</div> 
     36 
     37<div class="inside"> 
     38 
     39<p><strong><label for='comment_status'><?php _e('Approval Status') ?></label></strong></p> 
     40<p> 
     41<select name='comment_status' id='comment_status'> 
     42<option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option> 
     43<option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option> 
     44<option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option> 
     45</select> 
    3446</p> 
    35 --> 
    3647 
    37 <!-- crazyhorse 
    38 <div class="side-info"> 
    39 <h5><?php _e('Related') ?></h5> 
     48<?php 
     49$stamp = __('%1$s at %2$s'); 
     50$date = mysql2date(get_option('date_format'), $comment->comment_date); 
     51$time = mysql2date(get_option('time_format'), $comment->comment_date); 
     52?> 
     53<p class="curtime"><?php printf($stamp, $date, $time); ?> 
     54&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p> 
    4055 
    41 <ul> 
    42 <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li> 
    43 <li><a href="edit-comments.php?comment_status=moderated"><?php _e('Moderate Comments') ?></a></li> 
    44 <?php do_action('comment_relatedlinks_list'); ?> 
    45 </ul> 
     56<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div> 
     57 
    4658</div> 
    47 <?php do_action('submitcomment_box'); ?> 
     59 
     60<p class="submit"> 
     61<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> 
     62<?php 
     63echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; 
     64?> 
     65</p> 
    4866</div> 
    49 --> 
     67<?php 
     68
     69add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core'); 
     70?> 
    5071 
    5172<div id="side-info-column" class="inner-sidebar"> 
     73 
     74<?php $side_meta_boxes = do_meta_boxes('comment', 'side', $comment); ?> 
     75 
     76</div> 
     77 
     78<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>"> 
     79<div id="post-body-content" class="has-sidebar-content"> 
     80 
     81<div id="namediv" class="stuffbox"> 
     82<h3><label for="name"><?php _e('Name') ?></label></h3> 
     83<div class="inside"> 
     84<input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /> 
     85</div> 
     86</div> 
     87 
     88<div id="postdiv" class="postarea"> 
     89<h3><?php _e('Comment') ?></h3> 
     90<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?> 
     91<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
     92</div> 
    5293 
    5394<div id="emaildiv" class="stuffbox"> 
     
    65106</div> 
    66107 
    67 <div id="statusdiv" class="stuffbox"> 
    68 <h3><label for='comment_status'><?php _e('Approval Status') ?></label></h3> 
    69 <div class="inside"> 
    70 <select name='comment_status' id='comment_status'> 
    71 <option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option> 
    72 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option> 
    73 <option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option> 
    74 </select> 
    75 </div> 
    76 </div> 
    77  
    78 </div> 
    79  
    80 <div id="post-body" class="has-sidebar"> 
    81 <div id="post-body-content" class="has-sidebar-content"> 
    82  
    83 <div id="namediv" class="stuffbox"> 
    84 <h3><label for="name"><?php _e('Name') ?></label></h3> 
    85 <div class="inside"> 
    86 <input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /> 
    87 </div> 
    88 </div> 
    89  
    90  
    91 <div id="postdiv" class="postarea"> 
    92 <h3><?php _e('Comment') ?></h3> 
    93 <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?> 
    94 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
    95 </div> 
    96  
    97108<?php do_meta_boxes('comment', 'normal', $comment); ?> 
    98109 
     
    107118</div> 
    108119</div> 
    109  
    110 </div><!-- wpbody-content (fixedbar) --> 
    111  
    112 <div id="fixedbar"> 
    113 <table id="fixedbar-wrap"><tbody><tr> 
    114  
    115 <td id="preview-link">&nbsp; 
    116 <span> 
    117 <a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a> 
    118 </span> 
    119 </td> 
    120  
    121 <td id="submitpost" class="submitbox"> 
    122 <div id="comment-time-info" class="alignleft"> 
    123 <?php 
    124 $stamp = __('Timestamp: <span class="timestamp">%1$s at %2$s %3$s</span>'); 
    125 $date = mysql2date(get_option('date_format'), $comment->comment_date); 
    126 $time = mysql2date(get_option('time_format'), $comment->comment_date); 
    127 $edit = '(<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js">' . __('Change') . '</a>)'; 
    128  
    129 ?> 
    130 <p id="curtime"><?php printf($stamp, $date, $time, $edit); ?></p> 
    131  
    132 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div> 
    133120</div> 
    134  
    135 <p class="submit alignright"> 
    136 <?php 
    137 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>&nbsp;"; 
    138 ?> 
    139 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> 
    140 </p> 
    141 </td></tr></tbody></table> 
    142 </div><!-- /fixedbar --> 
    143  
    144  
    145  
    146  
    147121 
    148122</form> 
  • branches/crazyhorse/wp-admin/edit-link-form.php

    r8680 r8685  
    3838?> 
    3939 
    40 <?php function link_categories_meta_box($link) { ?> 
     40<?php function link_submit_meta_box($link) { ?> 
     41<div class="submitbox" id="submitlink"> 
     42 
     43<div id="previewview"> 
     44<?php if ( !empty($link->link_id) ) { ?> 
     45<a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a> 
     46<?php } ?> 
     47</div> 
     48 
     49<div class="inside"> 
     50<p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p> 
     51</div> 
     52 
     53<p class="submit"> 
     54<input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" /> 
     55<?php 
     56if ( ( 'edit' == $action) && current_user_can('manage_links') ) 
     57    echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;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&nbsp;link') . "</a>"; 
     58?> 
     59</p> 
     60<?php do_action('submitlink_box'); ?> 
     61</div> 
     62<?php 
     63
     64add_meta_box('linksubmitdiv', __('Save'), 'link_submit_meta_box', 'link', 'side', 'core'); 
     65 
     66function link_categories_meta_box($link) { ?> 
    4167<div id="category-adder" class="wp-hidden-children"> 
    4268    <h4><a id="category-add-toggle" href="#category-add"><?php _e( '+ Add New Category' ); ?></a></h4> 
     
    337363</div> 
    338364 
    339 <br class="clear" /></div><!-- wpbody-content (fixedbar) --> 
    340  
    341 <div id="fixedbar"> 
    342 <table id="fixedbar-wrap"><tbody><tr> 
    343  
    344 <td id="preview-link">&nbsp; 
    345 <span> 
    346 <?php if ( !empty($link_id) ) { ?> 
    347 <a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a> 
    348 <?php } ?> 
    349 </span> 
    350 </td> 
    351  
    352 <td id="submitlink" class="submitbox"> 
    353 <p class="submit alignright"> 
    354 <?php 
    355 if ( ( 'edit' == $action) && current_user_can('manage_links') ) 
    356     echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link_id", 'delete-bookmark_' . $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&nbsp;link') . "</a>&nbsp;"; 
    357 ?> 
    358 <input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" /> 
    359 </p> 
    360 </td> 
    361 </tr></tbody></table> 
    362 </div><!-- /fixedbar --> 
     365<br class="clear" /> 
     366</div> 
    363367 
    364368</form> 
  • branches/crazyhorse/wp-admin/edit-page-form.php

    r8684 r8685  
    5858 
    5959<?php 
    60 function page_submit_meta_box($post){ 
     60function page_submit_meta_box($post) { 
     61    global $action; 
    6162?> 
    6263<div class="submitbox" id="submitpage"> 
     
    265266?></h2> 
    266267 
    267 <!-- 
    268 <p id="big-add-button"> 
    269 <span id="previewview"> 
    270 <?php if ( 'publish' == $post->post_status ) { ?> 
    271 <a class="button" href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank"  tabindex="4"><?php _e('View this Page'); ?></a> 
    272 <?php } elseif ( 'edit' == $action ) { ?> 
    273 <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> 
    274 <?php } ?> 
    275 </span> 
    276 </p> 
    277 --> 
    278  
    279268<?php 
    280269wp_nonce_field($nonce_action);