WordPress.org

Make WordPress Core

Changeset 8129


Ignore:
Timestamp:
06/19/2008 10:12:14 PM (13 years ago)
Author:
ryan
Message:

crazyhorse: Add list and excerpt view to manage posts

Location:
branches/crazyhorse/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/edit-post-rows.php

    r7775 r8129  
    8282        ?>
    8383        <td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="post.php?action=edit&amp;post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
    84         <?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td>
     84        <?php
     85        if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); }
     86        if ( 'excerpt' == $mode )
     87            the_excerpt();
     88        ?>
     89        </td>
    8590        <?php
    8691        break;
  • branches/crazyhorse/wp-admin/edit.php

    r8124 r8129  
    4545    $_GET['paged'] = 1;
    4646
     47if ( empty($_GET['mode']) )
     48    $mode = 'list';
     49else
     50    $mode = attribute_escape($_GET['mode']);
    4751?>
    4852
     
    126130</p>
    127131
     132<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
     133
     134<ul class="view-switch">
     135    <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>
     136    <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>
     137</ul>
     138
    128139<div class="tablenav">
    129140
  • branches/crazyhorse/wp-admin/includes/template.php

    r8121 r8129  
    342342    $posts_columns = array();
    343343    $posts_columns['cb'] = '<input type="checkbox" />';
     344    $posts_columns['title'] = __('Title');
    344345    if ( 'draft' === $_GET['post_status'] )
    345346        $posts_columns['modified'] = __('Modified');
     
    348349    else
    349350        $posts_columns['date'] = __('Date');
    350     $posts_columns['title'] = __('Title');
    351     $posts_columns['author'] = __('Author');
     351    //$posts_columns['author'] = __('Author');
    352352    $posts_columns['categories'] = __('Categories');
    353353    $posts_columns['tags'] = __('Tags');
Note: See TracChangeset for help on using the changeset viewer.