Cleaner category count display

git-svn-id: http://svn.automattic.com/wordpress/trunk@3728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-04-19 09:26:56 +00:00
parent 8051187420
commit 28a178a5b6
2 changed files with 17 additions and 13 deletions

View File

@ -664,10 +664,13 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) {
$edit = '';
$class = ('alternate' == $class) ? '' : 'alternate';
$category->category_count = number_format( $category->category_count );
$category->link_count = number_format( $category->link_count );
echo "<tr id='cat-$category->cat_ID' class='$class'><th scope='row'>$category->cat_ID</th><td>$pad $category->cat_name</td>
<td>$category->category_description</td>
<td>$category->category_count</td>
<td>$category->link_count</td>
<td align='center'>$category->category_count</td>
<td align='center'>$category->link_count</td>
<td>$edit</td>
</tr>";
cat_rows($category->cat_ID, $level +1, $categories);

View File

@ -69,25 +69,25 @@ case 'edit':
<form name="editcat" action="categories.php" method="post">
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('Category name:') ?></th>
<td width="67%"><input name="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /> <input type="hidden" name="action" value="editedcat" />
<th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th>
<td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo wp_specialchars($category->cat_name); ?>" size="40" /> <input type="hidden" name="action" value="editedcat" />
<input type="hidden" name="cat_ID" value="<?php echo $category->cat_ID ?>" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Category slug:') ?></th>
<td><input name="category_nicename" type="text" value="<?php echo wp_specialchars($category->category_nicename); ?>" size="40" /></td>
<th scope="row" valign="top"><label for="category_nicename"><?php _e('Category slug:') ?></label></th>
<td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo wp_specialchars($category->category_nicename); ?>" size="40" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Category parent:') ?></th>
<th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th>
<td>
<select name='category_parent'>
<select name='category_parent' id='category_parent'>
<option value='0' <?php if (!$category->category_parent) echo " selected='selected'"; ?>><?php _e('None') ?></option>
<?php wp_dropdown_cats($category->cat_ID, $category->category_parent); ?>
</select></td>
</tr>
<tr>
<th scope="row"><?php _e('Description:') ?></th>
<td><textarea name="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description, 1); ?></textarea></td>
<th scope="row" valign="top"><label for="category_description"><?php _e('Description:') ?></label></th>
<td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->category_description, 1); ?></textarea></td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" value="<?php _e('Edit category &raquo;') ?>" /></p>
@ -135,8 +135,8 @@ $messages[3] = __('Category updated.');
<th scope="col"><?php _e('ID') ?></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col"><?php _e('Description') ?></th>
<th scope="col"><?php _e('# Posts') ?></th>
<th scope="col"><?php _e('# Bookmarks') ?></th>
<th scope="col" width="90"><?php _e('Posts') ?></th>
<th scope="col" width="90"><?php _e('Bookmarks') ?></th>
<th colspan="2"><?php _e('Action') ?></th>
</tr>
</thead>
@ -179,4 +179,5 @@ break;
}
include('admin-footer.php');
?>
?>