Changeset 9018

Show
Ignore:
Timestamp:
09/28/08 12:29:19 (2 months ago)
Author:
azaozz
Message:

Move posts filter above tablenav

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/css/colors-classic.css

    r9016 r9018  
    6262 
    6363li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links, 
    64 ul.view-switch li.current, .form-table tr, #poststuff h3, #replyhandle, 
     64.form-table tr, #poststuff h3, #replyhandle, 
    6565.login form, h3.info-box-title, #post-status-info, #edit-settings-wrap, 
    6666#wpbody-content .describe tr { 
     
    249249} 
    250250 
    251 .submitbox #autosave .error, ul.view-switch li.current a, 
     251.submitbox #autosave .error, 
    252252#side-info-column #category-tabs .ui-tabs-selected a { 
    253253    color: #333; 
  • trunk/wp-admin/css/colors-fresh.css

    r9016 r9018  
    6262 
    6363li.widget-list-control-item, div.nav, .tablenav, #dashboard-widgets p.dashboard-widget-links, 
    64 ul.view-switch li.current, .form-table tr, #poststuff h3, #replyhandle, 
     64.form-table tr, #poststuff h3, #replyhandle, 
    6565.login form, h3.info-box-title, #post-status-info, #edit-settings-wrap, 
    6666#wpbody-content .describe tr { 
     
    248248} 
    249249 
    250 ul.view-switch li.current a, 
    251250#side-info-column #category-tabs .ui-tabs-selected a { 
    252251    color: #333; 
  • trunk/wp-admin/css/global.css

    r8973 r9018  
    132132.subsubsub { 
    133133    list-style: none; 
    134     margin: 14px 0 8px 0
     134    margin: 0 0 8px
    135135    padding: 0; 
    136136    white-space: nowrap; 
    137137    font-size: 12px; 
     138    float: left; 
    138139} 
    139140 
  • trunk/wp-admin/css/ie-rtl.css

    r8827 r9018  
    5252} 
    5353/* fix manage comment page */ 
    54 ul.view-switch li
     54.view-switch
    5555    float:left; 
    5656} 
  • trunk/wp-admin/edit-comments.php

    r9016 r9018  
    112112<div class="wrap"> 
    113113 
    114 <form id="posts-filter" action="" method="get"> 
    115114<h2><?php _e('Manage Comments'); ?></h2> 
    116115 
     
    142141</ul> 
    143142 
    144 <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
    145 <input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" /> 
    146 </form> 
    147  
    148 <!-- crazyhorse 
    149 <ul class="view-switch"> 
    150     <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li> 
    151     <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> 
    152 </ul> 
    153 --> 
    154  
    155143<?php 
    156144 
     
    179167 
    180168<form id="comments-form" action="" method="post"> 
     169<input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
     170<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" /> 
    181171 
    182172<div class="tablenav"> 
  • trunk/wp-admin/edit-pages.php

    r9016 r9018  
    133133?></h2> 
    134134 
    135 <form id="posts-filter" action="" method="get"> 
    136135<ul class="subsubsub"> 
    137136<?php 
     
    190189    echo "<div class='tablenav-pages'>$page_links</div>"; 
    191190?> 
     191 
     192<form id="posts-filter" action="" method="get"> 
    192193 
    193194<div class="alignleft"> 
  • trunk/wp-admin/edit.php

    r9016 r9018  
    156156?></h2> 
    157157 
    158 <form id="posts-filter" action="" method="get"> 
    159158<ul class="subsubsub"> 
    160159<?php 
     
    184183</ul> 
    185184 
     185<div class="filter"> 
     186<form id="list-filter" action="" method="get"> 
     187<?php 
     188if ( !is_singular() ) { 
     189$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"; 
     190 
     191$arc_result = $wpdb->get_results( $arc_query ); 
     192 
     193$month_count = count($arc_result); 
     194 
     195if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { 
     196$m = isset($_GET['m']) ? (int)$_GET['m'] : 0; 
     197?> 
     198<select name='m'> 
     199<option<?php selected( $m, 0 ); ?> value='0'><?php _e('Show all dates'); ?></option> 
     200<?php 
     201foreach ($arc_result as $arc_row) { 
     202    if ( $arc_row->yyear == 0 ) 
     203        continue; 
     204    $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); 
     205 
     206    if ( $arc_row->yyear . $arc_row->mmonth == $m ) 
     207        $default = ' selected="selected"'; 
     208    else 
     209        $default = ''; 
     210 
     211    echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>"; 
     212    echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; 
     213    echo "</option>\n"; 
     214} 
     215?> 
     216</select> 
     217<?php } ?> 
     218 
     219<?php 
     220$dropdown_options = array('show_option_all' => __('View all categories'), 'hide_empty' => 0, 'hierarchical' => 1, 
     221    'show_count' => 0, 'orderby' => 'name', 'selected' => $cat); 
     222wp_dropdown_categories($dropdown_options); 
     223do_action('restrict_manage_posts'); 
     224?> 
     225<input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" /> 
     226 
     227<?php } ?> 
     228</form> 
     229</div> 
     230 
     231<div class="view-switch"> 
     232    <a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'list' == $mode ) echo 'class="current"'; ?> src="images/list.gif" title="<?php _e('List View') ?>" alt="<?php _e('List View') ?>" /></a> 
     233    <a href="<?php echo clean_url(add_query_arg('mode', 'excerpt', $_SERVER['REQUEST_URI'])) ?>"><img <?php if ( 'excerpt' == $mode ) echo 'class="current"'; ?> src="images/exc.gif" title="<?php _e('Excerpt View') ?>" alt="<?php _e('Excerpt View') ?>" /></a> 
     234</div> 
     235 
     236<form id="posts-filter" action="" method="get"> 
     237 
    186238<?php if ( isset($_GET['post_status'] ) ) : ?> 
    187239<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" /> 
     
    189241<input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
    190242 
    191 <ul class="view-switch"> 
    192     <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> 
    193     <li <?php if ( 'excerpt' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'excerpt', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Excerpt View') ?></a></li> 
    194 </ul> 
    195  
    196243<div class="tablenav"> 
    197  
    198244<?php 
    199245$page_links = paginate_links( array( 
     
    216262<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" /> 
    217263<?php wp_nonce_field('bulk-posts'); ?> 
    218 <?php 
    219 if ( !is_singular() ) { 
    220 $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"; 
    221  
    222 $arc_result = $wpdb->get_results( $arc_query ); 
    223  
    224 $month_count = count($arc_result); 
    225  
    226 if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { 
    227 $m = isset($_GET['m']) ? (int)$_GET['m'] : 0; 
    228 ?> 
    229 <select name='m'> 
    230 <option<?php selected( $m, 0 ); ?> value='0'><?php _e('Show all dates'); ?></option> 
    231 <?php 
    232 foreach ($arc_result as $arc_row) { 
    233     if ( $arc_row->yyear == 0 ) 
    234         continue; 
    235     $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); 
    236  
    237     if ( $arc_row->yyear . $arc_row->mmonth == $m ) 
    238         $default = ' selected="selected"'; 
    239     else 
    240         $default = ''; 
    241  
    242     echo "<option$default value='$arc_row->yyear$arc_row->mmonth'>"; 
    243     echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear"; 
    244     echo "</option>\n"; 
    245 } 
    246 ?> 
    247 </select> 
    248 <?php } ?> 
    249  
    250 <?php 
    251 $dropdown_options = array('show_option_all' => __('View all categories'), 'hide_empty' => 0, 'hierarchical' => 1, 
    252     'show_count' => 0, 'orderby' => 'name', 'selected' => $cat); 
    253 wp_dropdown_categories($dropdown_options); 
    254 do_action('restrict_manage_posts'); 
    255 ?> 
    256 <input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" /> 
    257  
    258 <?php } ?> 
    259264</div> 
    260265 
  • trunk/wp-admin/link-manager.php

    r9016 r9018  
    101101<h2><?php printf( __('Links (<a href="%s">Add New</a>)' ), 'link-add.php' ); ?></h2> 
    102102 
     103<form id="list-filter" action="" method="get"> 
     104<?php 
     105$categories = get_terms('link_category', "hide_empty=1"); 
     106$select_cat = "<select name=\"cat_id\">\n"; 
     107$select_cat .= '<option value="all"'  . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('View all Categories') . "</option>\n"; 
     108foreach ((array) $categories as $cat) 
     109    $select_cat .= '<option value="' . $cat->term_id . '"' . (($cat->term_id == $cat_id) ? " selected='selected'" : '') . '>' . sanitize_term_field('name', $cat->name, $cat->term_id, 'link_category', 'display') . "</option>\n"; 
     110$select_cat .= "</select>\n"; 
     111 
     112$select_order = "<select name=\"order_by\">\n"; 
     113$select_order .= '<option value="order_id"' . (($order_by == 'order_id') ? " selected='selected'" : '') . '>' .  __('Order by Link ID') . "</option>\n"; 
     114$select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' .  __('Order by Name') . "</option>\n"; 
     115$select_order .= '<option value="order_url"' . (($order_by == 'order_url') ? " selected='selected'" : '') . '>' .  __('Order by Address') . "</option>\n"; 
     116$select_order .= '<option value="order_rating"' . (($order_by == 'order_rating') ? " selected='selected'" : '') . '>' .  __('Order by Rating') . "</option>\n"; 
     117$select_order .= "</select>\n"; 
     118 
     119echo $select_cat; 
     120echo $select_order; 
     121 
     122?> 
     123<input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" /> 
     124</form> 
     125 
    103126<form id="posts-filter" action="" method="get"> 
    104127<div class="tablenav"> 
     
    110133</select> 
    111134<input type="submit" value="<?php _e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" /> 
    112 <?php 
    113 $categories = get_terms('link_category', "hide_empty=1"); 
    114 $select_cat = "<select name=\"cat_id\">\n"; 
    115 $select_cat .= '<option value="all"'  . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('View all Categories') . "</option>\n"; 
    116 foreach ((array) $categories as $cat) 
    117     $select_cat .= '<option value="' . $cat->term_id . '"' . (($cat->term_id == $cat_id) ? " selected='selected'" : '') . '>' . sanitize_term_field('name', $cat->name, $cat->term_id, 'link_category', 'display') . "</option>\n"; 
    118 $select_cat .= "</select>\n"; 
    119  
    120 $select_order = "<select name=\"order_by\">\n"; 
    121 $select_order .= '<option value="order_id"' . (($order_by == 'order_id') ? " selected='selected'" : '') . '>' .  __('Order by Link ID') . "</option>\n"; 
    122 $select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' .  __('Order by Name') . "</option>\n"; 
    123 $select_order .= '<option value="order_url"' . (($order_by == 'order_url') ? " selected='selected'" : '') . '>' .  __('Order by Address') . "</option>\n"; 
    124 $select_order .= '<option value="order_rating"' . (($order_by == 'order_rating') ? " selected='selected'" : '') . '>' .  __('Order by Rating') . "</option>\n"; 
    125 $select_order .= "</select>\n"; 
    126  
    127 echo $select_cat; 
    128 echo $select_order; 
    129  
    130 ?> 
    131 <input type="submit" id="post-query-submit" value="<?php _e('Filter'); ?>" class="button-secondary" /> 
    132  
    133135</div> 
    134136 
  • trunk/wp-admin/rtl.css

    r8909 r9018  
    311311    padding: 0 1px .2em 0; 
    312312} 
    313 ul.view-switch { 
    314     float: left; 
    315     margin: -23px 0 -2px 5px; 
    316 
    317 ul.view-switch li { 
    318     float: right; 
    319 
     313.view-switch { 
     314    float: left; 
     315
     316 
    320317#the-comment-list td.comment p.comment-author { 
    321318    margin-right: 0 ; 
  • trunk/wp-admin/wp-admin.css

    r9017 r9018  
    224224.submit input, .button, .button-secondary, .button-highlighted { 
    225225    font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 
    226     padding: 3px 5px; 
     226    padding: 2px 4px; 
    227227    font-size: 12px; 
    228228    line-height: 1.5em; 
     
    15411541} 
    15421542 
    1543 form#posts-filter { 
    1544     position: relative; 
    1545 } 
    1546  
    15471543p#big-add-button { 
    15481544    position: absolute; 
     
    16171613 
    16181614body.minwidth { 
    1619     min-width: 808px; 
    1620 } 
    1621  
    1622 ul.view-switch { 
     1615    min-width: 785px; 
     1616} 
     1617 
     1618.view-switch { 
    16231619    float: right; 
    1624     list-style: none; 
    1625     margin: -23px 5px -2px 0; 
     1620    margin: 3px 5px; 
    16261621    position: relative; 
    16271622} 
    16281623 
    1629 ul.view-switch li { 
     1624.view-switch img { 
     1625    margin: 0; 
     1626    border: 1px solid #fff; 
     1627
     1628 
     1629.view-switch img.current { 
     1630    border: 1px solid #999; 
     1631
     1632 
     1633.filter { 
    16301634    float: left; 
    1631     margin: 0; 
    1632     font-size: 11px; 
    1633     padding: 4px 6px; 
    1634     font-weight: bold; 
    1635 
    1636  
    1637 ul.view-switch a { 
    1638     text-decoration: none; 
    1639 
    1640  
    1641 ul.view-switch li.current { 
    1642     border: none; 
    1643     -moz-border-radius: 3px 3px 0 0; 
    1644     -webkit-border-top-left-radius: 3px; 
    1645     -webkit-border-top-right-radius: 3px; 
    1646     -khtml-border-top-left-radius: 3px; 
    1647     -khtml-border-top-right-radius: 3px; 
    1648     border-top-left-radius: 3px; 
    1649     border-top-right-radius: 3px; 
     1635    margin: 0 30px; 
    16501636} 
    16511637