<div style="margin: 10px 0 10px 0;"><a class="btn btn-danger" href="/otzyvy/#f_form">Оставить отзыв</a></div>

{foreach from=$feedback item=row}

<div class="well {$row->style} feed_{$row->id}" style="margin-bottom: 4px;">


		<div class="h4" style="margin-bottom: 5px;">
			<span><span>{$row->name}</span></span>
			<span style="font-size: 11px;">{$row->date}</span>
			{if $smarty.session.admin == 'admin' && $row->email}<span style="font-size:12px"> [{$row->email}]</span>{/if}
		</div>

		<span>{$row->text}</span>

		<div>
			{foreach from=$feedback_imgs[$row->id] item=row2}
				<div class="f-preview" style="margin-top: 5px;">
					<a href="/feedback/images/{$row2->name}" class="fancybox" data-rel="gal{$row->id}"><img alt="" src="{$row2->img}"></a>
				</div>
			{/foreach}
		</div>
		<div class="clearfix"></div>



	{if $smarty.session.admin == 'admin'}
		<br>
		<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?edit={$row->id}">Изменить</a>
		<a class="btn btn-warning btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?reply={$row->id}">Ответить</a>
		{if $row->active == 0}
			<button class="btn btn-success btn-mini f_activate" style="padding: 3px;font-size: 11px;" data-id="{$row->id}">Включить</button>
		{/if}
		<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="{$row->id}">Удалить</button>
	{/if}
</div>


	{foreach from=$feedback_replies item=row3}
	{if $row3->parent_id == $row->id}
	<div class="well feed_{$row3->id}" style="margin-bottom: 4px;margin-left:60px;">


			<div class="h4" style="margin-bottom: 5px;">
				<span><span>{$row3->name}</span></span>
				<span style="font-size: 11px;">{$row3->date}</span>
			</div>

			<span>{$row3->text}</span>

			<div>
				{foreach from=$feedback_imgs[$row3->id] item=row4}
					<div class="f-preview" style="margin-top: 5px;">
						<a href="/feedback/images/{$row4->name}" class="fancybox" data-rel="gal{$row3->id}"><img src="{$row4->img}" alt=""></a>
					</div>
				{/foreach}
			</div>
			<div class="clearfix"></div>



		{if $smarty.session.admin == 'admin'}
			<br>
			<a class="btn btn-primary btn-mini" style="padding: 3px;font-size: 11px;" href="/otzyvy/?edit={$row3->id}">Изменить</a>
			<button class="btn btn-danger btn-mini f_remove" style="padding: 3px;font-size: 11px;" data-id="{$row3->id}">Удалить</button>
		{/if}
	</div>
	{/if}
	{/foreach}

{/foreach}

{include file='pagination_new.tpl'}

{include file='feedback/form.tpl'}

<script src="/feedback/js/jquery-ui.min.js"></script>
<script src="/feedback/js/uploader.js"></script>
<script src="/feedback/js/feedback.js"></script>