<?php $this->declareVars(array("messages"=>array(),
 "foundItems"=>array(),
 "trackBackCount"=>0))
?>
<h2>Trackback entries</h2>

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

<?php if ($this->foundItems):
    $this->trackbacks = $this->foundItems?>
<p>found entries: <?php echo $this->paginator->getTotalItemCount()?></p>
<?php endif?>

<?php if ($this->paginator->getTotalItemCount()):?>
<table class="listtable">
 <tr>
  <th>Id</th><th>Title</th><th>Article</th><th>Posted</th><th colspan="2">Actions</th>
 </tr>
<?php foreach($this->trackbacks as $trackback):
 $relArticle = $trackback->getArticle();
?>
 <tr>
  <td><?php echo $trackback->getId()?></td>
  <td><?php echo $trackback->getTitle()?></td>
  <td><?php echo $this->anchor($this->url(
    array("entry" => $relArticle->getTitleUrl()),
    "blogArticle"),
    Utils::niceTruncate($relArticle->getTitle(),10))?></td>
  <td><?php echo $this->commentDate($trackback->getPosted())?></td>
  <td><?php echo $this->anchor($this->url(
    array(
        "controller" => "trackback",
        "action" => "edit",
        "itemId" => $trackback->getId()),
    "blogAdminItemAction"),
    "Edit")?></td>
  <td><?php echo $this->anchor($this->url(
    array(
        "controller" => "trackback",
        "action" => "delete",
        "itemId" => $trackback->getId()),
    "blogAdminItemAction"),
    "Delete")?></td>
 </tr>
<?php endforeach;?>
</table>

<!-- page navigator -->
<div style="text-align: center; margin:1em 0;">
<?php echo $this->paginationControl($this->paginator,null,null,array("mainUrl"=>$this->url()));?>
</div>
<!-- end of page navigator -->

<?php else:?>
No entries.
<?php endif;?>

