<!-- новости -->
<div id="news">
{if access('add')}<div><a title="добавить"  href="{url action="add"}"><img src="/skins/default/images/icons/doc_add.png" alt="добавить" /></a></div>{/if}
<h1>Все новости</h1>
{if $news}
	{foreach $news as $new}
		<div class="item">
			<h2><a href="{url action="item" var1=$new.news_id}">{if $new.news_title}{$new.news_title}{else}{$new.news_date|date_format:"%d/%m/%Y"}{/if}</a></h2>
			<div class="descr">{$new.news_date|date_format:"%d/%m/%Y"}{if access('edit')}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a title="редактировать"  href="{url action="edit" var1=$new.news_id}"><img class="icon" src="/skins/default/images/icons/simple_edit.png" alt="редактировать" /></a>{/if}
				{if access('delete')}<a title="удалить"  onclick="return confirm('Точно удалить?');" href="{url action="delete" var1=$new.news_id var2=$pager.current token=1}"><img class="icon" src="/skins/default/images/icons/simple_delete.png" alt="удалить" /></a>{/if}
			</div>
			<div>
				{$new.news_text}
				{if $new.anonce}[ <a class="more" href="{url action="item" var1=$new.news_id}">дальше</a> ]{/if}
			</div>
			{if isset($new.comments)}<div>Комментариев: {$new.comments}</div>{/if}
		</div>
	{/foreach}

	{if $pager.pages}
	<div class="navigate">
	{foreach $pager.pages as $key=>$page}
		{if !$page} ... {elseif $page==$pager.current} 
		{$pager.labels[$key]}
		{else}<a href="{url var1=$page}">{$pager.labels[$key]}</a>{/if}
		{if !$page@last}|{/if}
	{/foreach}
	</div>
	{/if}
{else}
А новостей пока нет!
{/if}
</div>