<div id="forum">
{include file="forum/forum_bar.tpl"}
<table class="table table-striped">
<colgroup>
	<col id="col_type" />
	<col id="col_forum" />
	<col id="col_total_themes" />
	<col id="col_total_posts" />
	<col id="col_last_post" />
	{if access('admin')}<col id="col_actions" />{/if}
</colgroup>
{if $forums}
<thead>
	<tr class="no-wrap">
		<th></th>
		<th>{t}Форум{/t}</th>
		<th>{t}Тем{/t}</th>
		<th>{t}Сбщ.{/t}</th>
		<th>{t}Последний ответ{/t}</th>
		<th></th>
	</tr>
</thead>
<tbody>
{else}
<thead>
	<tr>
		<th>{t}Пока не создано ни одного форума{/t}</th>
	</tr>
</thead>
<tbody>
{/if}
{foreach $forums as $forum}
	<tr>
		<td>
			{if $forum->closed}<i class="glyphicon glyphicon-lock" title="{t}Закрытый форум{/t}"></i>
			{else}<i class="glyphicon glyphicon-comment" title="{t}Публичный форум{/t}"></i>{/if}
		</td>
		<td>
			<div>
				<a href="{url var1=$forum->id}" title="{$forum->describe|escape}">{$forum->name|escape}</a>
			</div>
			<small class="muted more">{$forum->describe|escape}</small>
		</td>
		<td>{$forum->total_themes}</td>
		<td>{$forum->total_posts}</td>
		<td>
			{if $forum->last_post_date}
				<small class="no-wrap">{$forum->last_post_date|date_format:"%H:%M %d.%m.%Y"}</small>
				{include file="login/user_item_small.tpl" user=$forum->last_user}
			{else}
				<div>--</div>
			{/if}
		</td>
		{if access('admin')}
		<td>
			<div class="pull-right btn-group">
				<a class="btn btn-default btn-xs no-wrap" href="{url action='edit_forum' var1=$forum->id}" title="{t}Редактировать форум{/t}"><img src="/skins/default/images/icons/simple_edit.png" alt="{t}Редактировать форум{/t}" /></a>
				<a class="btn btn-danger btn-xs no-wrap" href="{url action='delete_forum' var1=$forum->id token=1}" onclick="return confirm('{t}Вы уверены?{/t}');" title="{t}Удалить форум{/t}"><img src="/skins/default/images/icons/simple_delete.png" alt="{t}Удалить форум{/t}" /></a>
			</div>
		</td>
		{/if}
	</tr>
{/foreach}
</tbody>
</table>
</div>