<!-- начало багтрекер -->
<div id="bt_main">
{include file="bug_tracker/toolbar.tpl"}

<div id="rss_feeds">
	{foreach $feed_rss as $item}
	<a href="{$item.path}" title="{$item.name|escape}"><img src="/skins/default/images/icons/simple_rss.png" alt="" /></a>
	{/foreach}
</div>
	<h2 id="summary_head">{$bug_info.summary_html}</h2>
	<h3 id="version">Версия: {$bug_info.version|escape}</h3>
	{if access('approve,perform')}

	<form method="post" action="">
	<div id="bug_info">
		<input type="hidden" name="token" value="{$_user->token}" />
		<b>Тип:</b> {html_options options=$bug_types selected=$bug_info.type name="type"}<br />
		<b>Версия:</b> {html_options options=$all_versions selected=$bug_info.version_id name="version_id"}<br />
		<b>Статус:</b> {html_options options=$statuses selected=$bug_info.status name="status"}<br />
		<b>Важность:</b> {html_options options=$importances selected=$bug_info.importance name="importance"}<br />
		<input type="submit" value="применить" />
	</div>
	</form>
	{else}
	<div id="bug_info">
		<b>Тип:</b> {$bug_types[$bug_info.type]}<br />
		<b>Статус:</b> {$statuses[$bug_info.status]}<br />
		<b>Важность:</b> {$importances[$bug_info.importance]}<br />
	</div>
	{/if}

	<table id="bug_comments">
	{foreach $comments as $post_id=>$comment}
	<tr id="btc{$post_id}">
		<td class="user">
			{if access('tester,perform,moderator')}<a href="mailto:{$comment.email}">{$comment.login|escape}</a>{else}{$comment.login|escape}{/if}<br />
			{$comment.putdate}<br />
			{if access('user')}<a title="ответить" href="{url action="reply" var1=$post_id}"><img class="icon" src="/skins/default/images/icons/simple_add.png" alt="ответить" /></a>{/if}
			{if $comment.access_edit}<a title="исправить" href="{url action="edit" var1=$post_id}"><img class="icon" src="/skins/default/images/icons/simple_edit.png" alt="исправить" /></a>{/if}
			{if $comment.access_delete}<a title="удалить" onclick="return confirm('удалить?');" href="{url action="delete" var1=$post_id token=1}"><img class="icon" src="/skins/default/images/icons/simple_delete.png" alt="удалить" /></a>{/if}	
		</td>
		<td class="bug_info">
	{$comment.msg_html}

	{if $comment.files}<br />Файлы: {foreach $comment.files as $file_id=>$file}<a href="{$file_path}/{$file_id}.{$file.type|escape}">{$file.name|escape}.{$file.type|escape}</a> {/foreach}{/if}
	
	{if $comment.images}<br />{foreach $comment.images as $file_id=>$image}<a href="{$image_path}/{$file_id}.{$image.type|escape}" title="{$image.name|escape}"><img src="{$image_path}/tn/{$file_id}.{$image.type|escape}" alt="{$image.name|escape}" /></a> {/foreach}{/if}
	</td></tr>
	{/foreach}
	</table>
</div>
<!-- конец багтрекер -->