<form method="POST" action="/comercializacao/relacionarproponente/index/id_comercializacao/<?=$this->id_comercializacao?>">
<? if (!$this->error): ?>
	<? if(count($this->paginator)): ?>
		<table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
		<?
			$options = array(array('id'        => 'cpf_cnpj',
								   'nowrap'    => 'nowrap',
								   'link'      => '#',
								   'descricao' => 'CPF/CNPJ',
								   'image'     => '/resources/imagens/'),
			                 array('id'        => 'ds_nome_proponente',
								   'nowrap'    => 'nowrap',
								   'link'      => '#',
								   'descricao' => 'Nome',
								   'image'     => '/resources/imagens/'),
			                 array('id'        => 'ds_sigla',
								   'nowrap'    => 'nowrap',
								   'link'      => '#',
								   'descricao' => 'Estado',
								   'image'     => '/resources/imagens/'),
							 array('id'        => 'ds_nome_municipio',
								   'nowrap'    => 'nowrap',
								   'link'      => '#',
								   'descricao' => 'Municipio',
								   'image'     => '/resources/imagens/'));
		?>
			<?=$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'><input type="checkbox" name="id_proponente[]" value='<?=$item['id']?>'> <?=($item['cpf_cnpj'] ? $item['cpf_cnpj'] : '&nbsp;'); ?></td>
						<td nowrap='nowrap'><?=($item['ds_nome_proponente'] ? $item['ds_nome_proponente'] : '&nbsp;'); ?></td>
						<td nowrap='nowrap'><?=($item['ds_sigla'] ? $item['ds_sigla'] : '&nbsp;'); ?></td>
						<td nowrap='nowrap'><?=($item['ds_nome_municipio'] ? $item['ds_nome_municipio'] : '&nbsp;'); ?></td>
						
					</tr>
					<?
					$i++;
				endforeach;
				?>
			</tbody>
		</table>
		<input type='submit' value='Salvar'>
	<? endif; ?>
<? else: ?>
	<?= $this->showListError($this->error); ?>
<? endif; ?>
</form>