{include file="bug_tracker/toolbar.tpl"}
{if $post}
	<table id="bug_comments" class="current-theme table table-bordered">
		<tr id="btc{$post->id}">
			<td class="user_data">
				{include file="login/user_item.tpl" user=$post->user}
			</td>
			<td class="bug_info">
				<div class="post-info">
					<div class="btn-group pull-right">
						{if access('user')}<a class="btn btn-default btn-xs" title="{t}ответить{/t}" href="{url action="reply" var1=$post->id}"><img class="icon" src="/skins/default/images/icons/simple_add.png" alt="{t}ответить{/t}" /></a>{/if}
						{if $post->access_edit}<a class="btn btn-default btn-xs" title="{t}исправить{/t}" href="{url action="edit" var1=$post->id}"><img class="icon" src="/skins/default/images/icons/simple_edit.png" alt="{t}исправить{/t}" /></a>{/if}
						{if $post->access_delete}<a class="btn btn-default btn-xs" title="{t}удалить{/t}" onclick="return confirm('{t}удалить?{/t}');" href="{url action="delete" var1=$post->id token=1}"><img class="icon" src="/skins/default/images/icons/simple_delete.png" alt="{t}удалить{/t}" /></a>{/if}	
					</div>
					<div class="smalltext">{$post->putdate|date_format}</div>
				</div>
				<div class="post">{$post->msg_html}</div>
	
				{if $post->files}
					<br />{t}Файлы{/t}:
					{foreach $post->files as $file_id=>$file}
						{if !$file->image}<a href="{$file->path}">{$file->name|escape}</a>{/if}
					{/foreach}
					<br />
					{foreach $post->files as $file_id=>$file}
						{if $file->image}<a href="{$file->path['big']}" title="{$file->name|escape}"><img src="{$file->path['small']}" alt="{$file->name|escape}" /></a>{/if}
					{/foreach}
				{/if}
			</td>
		</tr>
	</table>
{/if}
<div class="form-horizontal">
	{form_element item=$form}
</div>