<?php


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

if (!is_null($this->idArticle)){
	echo $this->dataArticle['data']['article_content'];
	if (!empty($this->listComment)){
		$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 = $translate->translate('Comments');
		print $this->Table($paginator,$selectData,$columnValue,$head,$hidden,$caption,$links);
		print $this->paginationControl($this->pager,'Sliding','paginator.phtml');
		
	}else {
		echo "Nebyly nalezeny zadne zaznamy komentaru.";
	}
	print $this->form->render();
}else {
	echo "<p>"."Neni zvolen clanek"."</p>";
}


?>
