	<div class="r_block">
		<div class="r_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>
		<div class="r_block_c">
			{text}
			<div class="clearfix"></div>
			<hr>
				Просмотров: {views}&nbsp| Дата создания: {date}&nbsp| Категория: <a href="../news/index?class={class_id}">{class}</a>&nbsp| Автор: <a href="../profile?id={author_id} ">{author_login}</a>
		</div>
	</div>

	<div class="r_block">
		{if(is_auth())}
		<div class="r_block_head">
			<span class="glyphicon glyphicon-comment"></span> Оставить комментарий
		</div> 
		<div class="r_block_c">
			<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="r_block_head">
			<span class="glyphicon glyphicon-user"></span> Комментарии пользователей
		</div> 
		<div class="r_block_c mb-0">
			<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>


<div class="right_block">
	{if(is_worthy("b"))}
		<center><a href="../news/add_new" class="btn2 btn-cancel btn-lg w-100"> + Добавить новость</a></center><br>
	{/if}

	<div class="l_block">
		<div class="l_block_head">
			Последние новости
		</div> 
		<div class="l_block_c">
			<div id="news">
				{func Widgets:others_news('{id}', '5')}
			</div>
		</div>
	</div>

	{if(is_auth())}
		{include file="/home/right_col.tpl"}
	{/if}
</div>