Make WordPress Core

Changeset 581


Ignore:
Timestamp:
12/07/2003 10:47:09 AM (23 years ago)
Author:
saxmatt
Message:

Category interface improvements.

File:
1 edited

Legend:

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

    r580 r581  
    128128        }
    129129        ?>
    130 
     130<style type="text/css">
     131        .edit, .delete, .edit:hover, .delete:hover {
     132                display: block;
     133                text-align: center;
     134                border-bottom: none;
     135        }
     136       
     137        .edit:hover {
     138                background-color: #ccc;
     139                color: #fff;
     140        }
     141       
     142        .delete:hover {
     143                background-color: #c00;
     144                color: #fff;
     145        }
     146</style>
    131147<div class="wrap">
    132148        <h2>Current Categories</h2>
    133149        <table width="100%">
    134150        <tr>
    135                 <th>Category Name</th>
    136                 <th>Description</th>
    137                 <th># Posts</th>
    138                 <th>Edit</th>
    139                 <th>Delete</th>
     151                <th scope="col">Name</th>
     152                <th scope="col">Description</th>
     153                <th scope="col"># Posts</th>
     154                <th colspan="2">Action</th>
    140155        </tr>
    141156        <?php
     
    143158        foreach ($categories as $category) {
    144159                $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $tablepost2cat WHERE category_id = $category->cat_ID");
    145                 $bgcolor = ('#eeeeee' == $bgcolor) ? '' : '#eeeeee';
    146                 echo "<tr bgcolor='$bgcolor'><td>$category->cat_name</td>
     160                $bgcolor = ('#eee' == $bgcolor) ? 'none' : '#eee';
     161                echo "<tr style='background-color: $bgcolor'><td>$category->cat_name</td>
    147162                <td>$category->category_description</td>
    148163                <td>$count</td>
    149                 <td><a href='categories.php?action=edit&amp;cat_ID=$category->cat_ID'>Edit</a></td><td><a href='categories.php?action=Delete&amp;cat_ID=$category->cat_ID' onclick=\"return confirm('You are about to delete the category \'$category->cat_name\' and all its posts will go to the default category.\\n  \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a></td>
     164                <td><a href='categories.php?action=edit&amp;cat_ID=$category->cat_ID' class='edit'>Edit</a></td><td><a href='categories.php?action=Delete&amp;cat_ID=$category->cat_ID' onclick=\"return confirm('You are about to delete the category \'$category->cat_name\' and all its posts will go to the default category.\\n  \'OK\' to delete, \'Cancel\' to stop.')\" class='delete'>Delete</a></td>
    150165                </tr>";
    151166        }
     
    158173        <form name="addcat" action="categories.php" method="post">
    159174               
    160                 <p>Category name:<br />
     175                <p>Name:<br />
    161176                <input type="text" name="cat_name" value="" /></p>
    162177                <p>Description:<br />
Note: See TracChangeset for help on using the changeset viewer.