Make WordPress Core


Ignore:
Timestamp:
02/12/2008 05:51:53 AM (18 years ago)
Author:
ryan
Message:

Manage->Pages design update

File:
1 edited

Legend:

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

    r6726 r6796  
    77
    88$post_stati  = array(   //  array( adj, noun )
    9             'publish' => array(__('Published'), __('Published pages')),
    10             'draft'   => array(__('Draft'), __('Draft pages')),
    11             'private' => array(__('Private'), __('Private pages'))
    12         );
    13 
     9        'publish' => array(__('Published'), __('Published pages'), __('Published (%s)')),
     10        'future' => array(__('Scheduled'), __('Scheduled pages'), __('Scheduled (%s)')),
     11        'pending' => array(__('Pending Review'), __('Pending pages'), __('Pending Review (%s)')),
     12        'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _c('Draft (%s)|manage posts header')),
     13        'private' => array(__('Private'), __('Private pages'), __('Private (%s)'))
     14    );
    1415
    1516$post_status_label = __('Pages');
     
    2728</script>
    2829<div class="wrap">
     30<form id="posts-filter" action="" method="get">
    2931<h2><?php
    3032// Use $_GET instead of is_ since they can override each other
     
    3840?></h2>
    3941
    40 <p><?php _e('Pages are like posts except they live outside of the normal blog chronology and can be hierarchical. You can use pages to organize and manage any amount of content.'); ?> <a href="page-new.php"><?php _e('Create a new page &raquo;'); ?></a></p>
     42<ul class="subsubsub">
     43<?php
    4144
    42 <form name="searchform" id="searchform" action="" method="get">
    43     <fieldset><legend><?php _e('Search Terms&hellip;') ?></legend>
    44         <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />
    45     </fieldset>
     45$avail_post_stati = get_available_post_statuses('page');
     46   
     47$status_links = array();
     48foreach ( $post_stati as $status => $label ) {
     49    $class = '';
    4650
     51    if ( !in_array($status, $avail_post_stati) )
     52        continue;
    4753
    48     <fieldset><legend><?php _e('Page Type&hellip;'); ?></legend>
    49         <select name='post_status'>
    50             <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
    51 <?php   foreach ( $post_stati as $status => $label ) : ?>
    52             <option<?php selected( @$_GET['post_status'], $status ); ?> value='<?php echo $status; ?>'><?php echo $label[0]; ?></option>
    53 <?php   endforeach; ?>
    54         </select>
    55     </fieldset>
     54    $num_posts = wp_count_posts('page', $status);
     55    if ( $status == $_GET['post_status'] )
     56        $class = ' class="current"';
    5657
    57 <?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?>
     58    $status_links[] = "<li><a href=\"edit-pages.php?post_status=$status\"$class>" .
     59    sprintf($label[2], $num_posts) . '</a>';
     60}
     61$class = empty($_GET['post_status']) ? ' class="current"' : '';
     62$status_links[] = "<li><a href=\"edit-pages.php\"$class>All Pages</a>";
     63echo implode(' |</li>', $status_links) . '</li>';
     64unset($status_links);
     65?>
     66</ul>
    5867
    59     <fieldset><legend><?php _e('Author&hellip;'); ?></legend>
    60         <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
    61     </fieldset>
     68<p id="post-search">
     69    <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
     70    <input type="submit" value="<?php _e( 'Search Posts' ); ?>" />
     71</p>
    6272
    63 <?php endif; ?>
     73<br style="clear:both;" />
    6474
    65     <input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
     75<div class="tablenav">
     76
     77<div style="float: left">
     78<input type="button" value="<?php _e('Delete'); ?>" name="deleteit" />
     79</div>
     80
     81<br style="clear:both;" />
     82</div>
    6683</form>
    6784
     
    8097  <thead>
    8198  <tr>
    82     <th scope="col" style="text-align: center"><?php _e('ID') ?></th>
    83     <th scope="col"><?php _e('Title') ?></th>
    84     <th scope="col"><?php _e('Owner') ?></th>
    85     <th scope="col"><?php _e('Updated') ?></th>
    86     <th scope="col" colspan="3" style="text-align: center"><?php _e('Action'); ?></th>
     99<?php $posts_columns = wp_manage_pages_columns(); ?>
     100<?php foreach($posts_columns as $column_display_name) { ?>
     101    <th scope="col"><?php echo $column_display_name; ?></th>
     102<?php } ?>
    87103  </tr>
    88104  </thead>
     
    102118?>
    103119
    104 <h3><a href="page-new.php"><?php _e('Create New Page &raquo;'); ?></a></h3>
    105 
    106120</div>
    107121
Note: See TracChangeset for help on using the changeset viewer.