<? if (!$this->error): ?>
	<? if(count($this->paginator)): ?>
		<table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
		<?
			$options = array(array('id'        => 'ds_nome_ramo',
								   'nowrap'    => 'nowrap',
								   'link'      => '#',
								   'descricao' => 'Nome',
								   'image'     => '/resources/imagens/'),
							 array('nowrap'    => 'nowrap',
							       'descricao' => 'Ações'));				
		?>
			<?=$this->listHeader($options, $this->order, $this->orderType);?>

			<tbody>
				<?
				$i = 0;
				foreach ($this->paginator as $item):
					if ($i % 2 == 0) {
						$class = '';
					} else {
						$class = "highlight";
					}
					
					$imgActive = ($item['fl_ativo'] ? 'active.png' : 'inactive.png');
					
					?>
					<tr class="<?=$class?>">
						<td nowrap='nowrap'><?=($item['ds_nome_ramo'] ? $item['ds_nome_ramo'] : '&nbsp;'); ?></td>
						<td align='center' width='1%' nowrap='nowrap'>
							<?=$this->iconEdit("produto", "ramo", $item)?>
							<?=$this->iconActive("produto", "ramo", $item)?>
							<?=$this->iconDelete("produto", "ramo", $item)?>
						</td>
					</tr>
					<?
					$i++;
				endforeach;
				?>
			</tbody>
		</table>
		
		<?=$this->paginationControl($this->paginator, 'Sliding'); ?>
	<? endif; ?>
<? else: ?>
	<?= $this->showListError($this->error); ?>
<? endif; ?>
