<?php

$this->headLink()->appendStylesheet($this->DinamicPath().'css/table.css','all');
$translate = Zend_Registry::get('Zend_Translate');

if (!is_null($this->pager)){
	try {
		$paginator = $this->PagerToPaginator($this->pager,$this->select);
		
    	$head = NULL;
		$head['nameHeader'] = array($translate->translate('ID'),$translate->translate('Comment'),$translate->translate('Date'));
		$selectData = array('id_comment','comment_text','comment_dateTime');
		$links['id_comment']['link'] = $this->url(array('controller' => 'comment', 'action' => 'edit'), 'default', true);
		$links['id_comment']['get'][0] = 'id_comment';
		$links['id_comment']['get'][1] = 'Article_id_article';
		$columnValue = NULL;
		$hidden = NULL;
		$caption = "Comment";
		print $this->Table($paginator,$selectData,$columnValue,$head,$hidden,$caption,$links);
		print $this->paginationControl($this->pager,'Sliding','paginator.phtml');
	}catch (Exception $e){
		echo $e->getMessage();
	}
}else {
	echo "<p>"."Nenalezeny zaznamy"."</p>";
}
?>
