<?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');
$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('Role'),$translate->translate('State'));
		$selectData = array('id_role','role_role','nameState_name');
		$columnValue['role_role'] ='true';
		$links['id_role']['link'] ='close.window';
		$hidden = array('id_role','role_role');
		//$links['id_role'] = $this->url(array('controller' => $this->controller, 'action' => $this->action), 'default', true);
		$caption = array($translate->translate('ListRole'));
		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>";
}
?>
