<!-- новости -->
<div id="news" class="content">
{if access('add')}<div><a class="btn btn-default" 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="well">
			<h2><a href="{url action="item" var1=$new->id}">{if $new->title}{$new->title}{else}{$new->date|date_format:"%d/%m/%Y"}{/if}</a></h2>
			<div class="descr">{$new->date|date_format:"%d/%m/%Y"}
			{if access('edit, delete')}
				<div class="btn-group">
					{if access('edit')}
						<a class="btn btn-default btn-xs" title="редактировать"  href="{url action="edit" var1=$new->id}">
							<img class="icon" src="/skins/default/images/icons/simple_edit.png" alt="редактировать" />
						</a>
					{/if}
					{if access('delete')}
						<a class="btn btn-default btn-xs" title="удалить"  onclick="return confirm('Точно удалить?');" href="{url action="delete" var1=$new->id var2=$pager.current token=1}">
							<img class="icon" src="/skins/default/images/icons/simple_delete.png" alt="удалить" />
						</a>
					{/if}
				</div>
			{/if}
			</div>
			<div>
				{if $new->anonce}
					{$new->anonce}[ <a class="more" href="{url action="item" var1=$new->id}">дальше</a> ]
				{else}
					{$new->text}
				{/if}
			</div>
			{if isset($new->comments)}<div>Комментариев: {$new->comments}</div>{/if}
		</div>
	{/foreach}

	{if $pager.pages}
		<div>
			<ul class="pagination">
				<li{if !$pager.prev} class="disabled"{/if}><a href="{url var1=$pager.prev}">&laquo;</a></li>
				{foreach $pager.pages as $page}
					{if !$page}
						<li class="disabled">...</li>
					{else}
						<li{if $page==$pager.current} class="active"{/if}><a href="{url var1=$page}">{$page}</a></li>
					{/if}
				{/foreach}
				<li{if !$pager.next} class="disabled"{/if}><a href="{url var1=$pager.next}">&raquo;</a></li>
			</ul>
		</div>
	{/if}
{else}
А новостей пока нет!
{/if}
</div>