<div class="col-lg-6">
	<div class="block ban-application ban-information" data-aos="flip-up">
		<div class="block_head mb-3">
			Информация
		</div>
		<p><b>От кого: </b><a class="visit_user" href="../profile?id={author_id}"><img tooltip="yes" src="../{ava}" data-original-title="{author_login}" data-placement="top" style="border-radius: 3px !important;width: 18px;height: 18px;color: {gp_color}"> {author_login}</a></p>
		<p><b>Для кого: </b><a class="visit_user" href="../demoview/demo?id={id}" style="display: contents !important;">
			<img tooltip="yes" src="../files/avatars/no_avatar.jpg" data-original-title="{nick}" data-placement="top" alt="{nick}" style="border-radius: 3px !important;width: 18px;height: 18px;"> {nick}
	</a></p>
		<p><b>Сервер: </b>{server}</p>
		<p><b>Статус: </b><span id="status" class="label label-{color}">{status}</span></p>
		<p><b>Дата создания: </b>{date}</p>
		{if('{closed}' != '0')}
			<p><b>Просмотрел: </b><a href="../profile?id={closed}">{closed_a}</a></p>
		{else}
			<p><span id="closed"></span></p>
		{/if}
	
	</div>
	
	{if(is_worthy("i") && '{closed}' == '0')}
	<div class="block ban-application ban-information">
		<div class="block_head mb-3">
		Операции
		</div>
		{if(is_worthy("i"))}
		<button onclick="close_demoview({id},'1');" type="button" class="btn btn-success mb-0">Читов не обнаружено</button>
		<button onclick="close_demoview({id},'2');" type="button" class="btn btn-danger mb-0" style="padding: 10px;margin-bottom: 15px;">Обнаружены читы</button>
		{/if}
		{if(is_worthy("o"))}
		<button onclick="dell_demoview({id});" type="button" class="btn btn-primary mb-0">Удалить</button>
		{/if}
	</div>
	{/if}

</div>
<div class="col-lg-6" data-aos="zoom-in">
	<div class="block">
		<div class="block_head mb-3">
			Материал
		</div>
		<p class="mb-0"><b>Скриншоты</b></p>
		{if('{imgs}' == '0')}
			<small>Пользователь не прикрепил скриншотов</small>
		{else}
			{imgs}
		{/if}


<p class="mb-0 mt-2"><b>Демо</b></p>
		{if('{demo}' == '0')}
			<small>Пользователь не указал ссылку на демо</small>
		{else}
			<a class="btn btn-outline-primary" href="{demo}" target="_blank">
				Скачать
			</a>
		{/if}

	</div>
</div>

<div class="col-lg-12">
	<div class="block">
		<div class="block_head mb-3">
			Комментарии
		</div>
		{if(is_auth() && '{closed}' == '0')}
			<div id="add_new_comments">
				<textarea id="text" maxlength="300"></textarea>

				<div class="smile_input_forum mt-3">
					<button id="send_btn" class="btn btn-primary" type="button" onclick="send_demoview_comment({id});">Отправить</button>
					<div id="smile_btn" class="smile_btn" data-container="body" data-toggle="popover" data-placement="top" data-content="empty"></div>
				</div>
			</div>
			<script>
				$(document).ready(function () {
					init_tinymce(
						'text',
						'lite',
						"{file_manager_theme}",
						"{file_manager}",
						"{{md5($conf->code)}}"
					);
					get_smiles('#smile_btn', 1);
				});

				$('#smile_btn').popover({html: true, animation: true, trigger: "click"});
				$('#smile_btn').on('show.bs.popover', function () {
					$(document).mouseup(function (e) {
						var container = $('.popover-body');
						if (container.has(e.target).length === 0) {
							$('#smile_btn').popover('hide');
							selected = 'gcms_smiles';
						}
					});
				});

				function set_smile(elem) {
					var smile = '<img src="' + $(elem).attr('src') + '" class="g_smile" height="20px" width="20px">';
					tinymce.activeEditor.insertContent(smile);
					$('#smile_btn').popover('hide');
					selected = 'gcms_smiles';
				}
            		</script>
		{/if}
		<div id="comments" class="mt-3">
			<div class="loader"></div>
			<script>load_demoview_comments("{id}");</script>
		</div>
	</div>
</div>