<div class="col-md-9">
	<div class="block">
		<div class="block_head">
			<div class="f-l">{name}</div> <div class="admin_buttons_new">
				{if(is_worthy("q"))}
					<a href="../news/change_new?id={id}"><span class="glyphicon glyphicon-pencil" data-placement="left" tooltip="yes" data-original-title="Редактировать"></span></a>
					<a href="#"><span class="glyphicon glyphicon-trash" data-placement="left" tooltip="yes" data-original-title="Удалить" onclick="dell_new('{id}','2');"></span></a>
				{/if}
			</div>
		</div>
		{text}
		<div class="clearfix"></div>
		<div class="new_info">
			Просмотров: {views}&nbsp| Дата создания: {date}&nbsp| Категория: <a class="c-fff" href="../news/index?class={class_id}">{class}</a>&nbsp| Автор: <a class="c-fff" href="../profile?id={author_id} ">{author_login}</a>
		</div>
	</div>
	{if(is_auth())}
	<div class="block">
		<div class="block_head">
			Оставить комментарий:
		</div>
		<div id="add_new_comments">
			<textarea id="text" class="form-control maxMinW100" maxlenght="500"></textarea>
			<div class="smile_input_forum">
				<input id="send_btn" class="btn2 mt-10" type="button" onclick="send_new_comment({id});" value="Отправить"></input>
				<div id="smile_btn" class="smile_btn visible-lg-inline-block" data-container="body" data-toggle="popover" data-placement="top" data-content="empty"></div>
			</div>
		</div>
	</div>
	<script>
		$(document).ready(function() {
			init_tinymce("text", "lite", "{file_manager_theme}", "{file_manager}", "{{md5($conf->code)}}");
			get_smiles('#smile_btn');
		});

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

		function set_sticker(elem){
			var text = "sticker"+$(elem).attr("src");
			text = encodeURIComponent(text);
			send_new_comment({id}, text);
			$('#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 class="block">
		<div class="block_head">
			Комментарии пользователей:
		</div>
		<div id="comments">
			<center><img src="{site_host}templates/{template}/img/loader.gif"></center><br>
		</div>
		<script>load_new_comments("{id}");</script>
	</div>
</div>

<div class="col-md-3">
	{if(is_worthy("b"))}
		<center><a href="../news/add_new" class="btn2 btn-cancel btn-lg w-100"> + Добавить новость</a></center><br>
	{/if}
	<div class="block">
		<div class="block_head">
			Последние новости
		</div>
		<div id="news">
			{func Widgets:others_news('{id}', '5')}
		</div>
	</div>
</div>