<?php


$this->headScript()->appendFile($this->DinamicPath().'js/windowmsg/jquery.windowmsg-1.0.js');
$this->headScript()->appendScript($this->javascriptPopupSlave);
$this->headLink()->appendStylesheet($this->DinamicPath().'css/table.css','all');
$this->headLink()->appendStylesheet($this->DinamicPath().'css/form.css','all');

print $this->form->render();
$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('Title'),$translate->translate('Date'),$translate->translate('Username'));
		$selectData = array('id_article','article_text','article_dateTime','article_content','User_id_user','nameState_name');
	
		$columnValue['article_text'] ='true';
		$links['id_article']['link'] ='close.window';
		$hidden = array('id_article','article_text');
	
		$caption = array($translate->translate('ListArticles'));
		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>";
}
?>
