Make WordPress Core


Ignore:
Timestamp:
02/08/2008 01:40:14 AM (19 years ago)
Author:
matt
Message:

Some first pass styling changes for manage pages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r6735 r6755  
    1212list($post_stati, $avail_post_stati) = wp_edit_posts_query();
    1313$wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra )
     14
     15if ( !isset( $_GET['paged'] ) )
     16        $_GET['paged'] = 1;
    1417?>
    1518
    … …  
    3336        printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title));
    3437} else {
    35         $post_status_label = _c('Posts|manage posts header');
     38        $post_status_label = _c('Manage Posts|manage posts header');
    3639        if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
    3740        $post_status_label = $post_stati[$_GET['post_status']][1];
    … …  
    5861}
    5962?></h2>
    60 <p id="post-search">
    61         <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
    62         <input type="submit" value="<?php _e( 'Search Posts' ); ?>" />
    63 </p>
    6463
    65 <ul id="statusmenu">
     64<ul class="subsubsub">
    6665<?php
    6766$status_links = array();
    … …  
    8685</ul>
    8786
    88         <fieldset><legend><?php _e('Status&hellip;'); ?></legend>
    89                 <select name='post_status'>
    90                         <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
    91 <?php   foreach ( $post_stati as $status => $label ) : if ( !in_array($status, $avail_post_stati) ) continue; ?>
    92                         <option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option>
    93 <?php   endforeach; ?>
    94                 </select>
    95         </fieldset>
     87<p id="post-search">
     88        <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
     89        <input type="submit" value="<?php _e( 'Search Posts' ); ?>" />
     90</p>
     91
     92<?php do_action('restrict_manage_posts'); ?>
     93
     94<br style="clear:both;" />
     95
     96<div class="tablenav">
    9697
    9798<?php
    98 $editable_ids = get_editable_user_ids( $user_ID );
    99 if ( $editable_ids && count( $editable_ids ) > 1 ) :
     99$page_links = paginate_links( array(
     100        'base' => add_query_arg( 'paged', '%#%' ),
     101        'format' => '',
     102        'total' => ceil($wp_query->found_posts / 15),
     103        'current' => $_GET['paged']
     104));
     105
     106if ( $page_links )
     107        echo "<div class='tablenav-pages'>$page_links</div>";
    100108?>
    101         <fieldset><legend><?php _e('Author&hellip;'); ?></legend>
    102                 <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
    103         </fieldset>
    104109
     110<div style="float: left">
    105111<?php
    106 endif;
    107112
    108113$arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC";
    … …  
    113118
    114119if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?>
    115 
    116         <fieldset><legend><?php _e('Month&hellip;') ?></legend>
    117                 <select name='m'>
    118                         <option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
    119                 <?php
    120                 foreach ($arc_result as $arc_row) {
    121                         if ( $arc_row->yyear == 0 )
    122                                 continue;
    123                         $arc_row->mmonth = zeroise($arc_row->mmonth, 2);
    124 
    125                         if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
    126                                 $default = ' selected="selected"';
    127                         else
    128                                 $default = '';
    129 
    130                         echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
    131                         echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
    132                         echo "</option>\n";
    133                 }
    134                 ?>
    135                 </select>
    136         </fieldset>
    137 
     120<select name='m'>
     121<option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option>
     122<?php
     123foreach ($arc_result as $arc_row) {
     124        if ( $arc_row->yyear == 0 )
     125                continue;
     126        $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 );
     127       
     128        if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] )
     129                $default = ' selected="selected"';
     130        else
     131                $default = '';
     132       
     133        echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>";
     134        echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
     135        echo "</option>\n";
     136}
     137?>
     138</select>
    138139<?php } ?>
    139140
    140         <fieldset><legend><?php _e('Category&hellip;') ?></legend>
    141                 <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?>
    142         </fieldset>
    143         <input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
     141<?php wp_dropdown_categories('show_option_all='.__('View all categories').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?>
     142<input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
     143
     144</div>
     145
     146<br style="clear:both;" />
     147</div>
    144148</form>
    145 
    146 <?php do_action('restrict_manage_posts'); ?>
    147149
    148150<br style="clear:both;" />
    … …  
    155157
    156158<div id="ajax-response"></div>
     159
     160<div class="tablenav">
     161
     162<?php
     163if ( $page_links )
     164        echo "<div class='tablenav-pages'>$page_links</div>";
     165?>
     166
     167</div>
    157168
    158169<div class="navigation">
Note: See TracChangeset for help on using the changeset viewer.