Location: PHPKode > projects > MUSPA > modules/noticia/templates/listar.htm
<patTemplate:tmpl name="content">
<script type="text/javascript">
<!--
	function SendForm( obj )
	{
		if (!obj.value)
			return;

		var oFrm = obj.form;
		var ok = false;
		// Verifica se existem noticias marcadas
		for (var i = 0; i < oFrm.length; i++)
			if (oFrm.elements[i].checked)
			{
				ok = true;
				break;
			}
		if (!ok)
		{
			obj.options[0].selected = true;
			alert('Você precisa selecionar pelo menos uma notícia.');
			return;
		}

		// Mostra msg se o car afor apagar noticias
		if (obj.value == 'del')
			if (!window.confirm('Tem certeza que deseja APAGAR as notícias marcadas?'))
			{
				obj.options[0].selected = true;
				return;
			}

		// Envia o form...
		oFrm.action = '?m=noticia&action=listar&subaction='+obj.value;
		oFrm.submit();
	}
// -->
</script>

<patTemplate:tmpl name="semnoticia" visibility="hidden">
	<p>Não há nenhuma notícia cadastrada.</p>
</patTemplate:tmpl>
<patTemplate:tmpl name="lista">
	<p>As seguintes notícias estão cadastradas.</p>

	<form method="post" action="">
	<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<th width="14" align="left" valign="top" class="b2_left" scope="col"><img src="img/b2_ctl.gif" width="14" height="14" alt="" /></th>
			<th class="b2_header" scope="col" width="20">&nbsp;</th>
			<th class="b2_header" scope="col" width="120">Data</th>
			<th class="b2_header" scope="col">Título</th>
			<th class="b2_header" scope="col">Seção</th>
			<th class="b2_header" scope="col" width="40">Fixo</th>
			<th class="b2_header" scope="col" width="40">Visível</th>
			<th width="14" align="right" valign="top" class="b2_right" scope="col"><img src="img/b2_ctr.gif" width="14" height="14" alt="" /></th>
		</tr>

<patTemplate:tmpl name="noticia">
		<tr>
			<td width="14" class="b2_left">&nbsp;</td>
			<td class="b2_content"><input type="checkbox" class="checkbox" name="noticia[]" value="{ID}" /></td>
			<td class="b2_content" nowrap="nowrap">{DATA}</td>
			<td class="b2_content"><a href="{LINK}">{TITULO}</a></td>
			<td class="b2_content">{SECAO}</td>
			<td class="b2_content" align="center"><img src="img/{FIXED}" border="0" alt="" /></td>
			<td class="b2_content" align="center"><img src="img/{VISIBLE}" border="0" alt="" /></td>
			<td width="14" class="b2_right">&nbsp;</td>
		</tr>
</patTemplate:tmpl>

		<tr class="b2_bottom">
			<td width="14" align="left" valign="bottom" class="b2_left"><img src="img/b2_cbl.gif" width="14" height="14" class="b2_left" alt="" /></td>
			<td class="b2_bottom" colspan="6"></td>
			<td width="14" align="right" valign="bottom" class="b2_right"><img src="img/b2_cbr.gif" width="14" height="14" alt="" /></td>
		</tr>
	</table>
	<div style="float: right; padding-right: 10px;">
	<p>
	<patTemplate:tmpl name="prevpage" visibility="hidden">
		<a href="{LINK}"><img src="img/page_prev.gif" width="17" height="15" border="0" align="top" onmouseover="DisplayTip('Página anterior')" onmouseout="HideTip();" /></a>
	</patTemplate:tmpl>
	<span class="pagenumber">{PAGE}</span>
	<patTemplate:tmpl name="nextpage" visibility="hidden">
		<a href="{LINK}"><img src="img/page_next.gif" width="17" height="15" border="0" align="top" onmouseover="DisplayTip('Próxima página')" onmouseout="HideTip();" /></a>
	</patTemplate:tmpl>
	</p>
	</div>
	<p>
		Com as marcadas:
		<select onchange="SendForm( this );">
			<option value="" selected="selected">Não faça nada</option>
			<option value="fix">Fixar</option>
			<option value="unfix">Desfixar</option>
			<option value="del" class="warning">Apagar</option>
		</select>
	</p>
	</form>
</patTemplate:tmpl>
</patTemplate:tmpl>
Return current item: MUSPA