<h2>Category entries</h2>

<?php if(isset($this->messages)):foreach($this->messages as $message):?>
<div style="color:blue"><?php echo $message?></div>
<?php endforeach;endif?>

<?php if(isset($this->categoryCount) && ($this->categoryCount>0)):?>
<table class="listtable">
 <tr>
  <th>Name</th><th>Articles</th><th colspan=2>Actions</th>
 </tr>
<?php foreach($this->categories as $category):?>
 <tr>
  <td><?php echo $this->escape($category->getName())?></td>
  <td><?php echo $this->anchor($this->url(
        array("controller" => "category", "action" => "edit-articles", "itemId" => $category->getId()),
        "blogAdminItemAction"),
    $category->getArticleCount())?></td>
  <td><?php echo $this->anchor($this->url(
        array("controller" => "category", "action" => "edit", "itemId" => $category->getId()),
        "blogAdminItemAction"),"Edit")?></td>
  <td><?php echo $this->anchor($this->url(
        array("controller" => "category", "action" => "delete", "itemId" => $category->getId()),
        "blogAdminItemAction"),"Delete")?></td>
 </tr>
<?php endforeach;?>
</table>
<?php else:?>
No entries.
<?php endif;?>

