<?php
/* Smarty version 4.5.3, created on 2024-10-25 00:55:31
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/components/related.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_671ac2530240a6_61512153',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '1e8636c3b68529ca0cca90ec2030388a03ed9719' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/components/related.tpl',
      1 => 1729806930,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_671ac2530240a6_61512153 (Smarty_Internal_Template $_smarty_tpl) {
?><div class="nk-block js-component-related">
	<div class="nk-block-head">
		<h5 class="title">Связанные страницы</h5>
		<p>Вы можете прикреплять связанные разделы или услуги и использовать их в шаблоне.</p>
	</div>

		<div class="form-group">
		<input type="text" class="form-control js-product-related-add" name="related" placeholder="Выберите товар чтобы добавить его">
	</div>
	<div class="card-inner card-bordered p-0 mb-2">
				<div class="nk-tb-list nk-tb-ulist js-product-related-list">
			<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['page']->value->related_pages, 'related_page');
$_smarty_tpl->tpl_vars['related_page']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['related_page']->value) {
$_smarty_tpl->tpl_vars['related_page']->do_else = false;
?>
			<div class="nk-tb-item js-product-related-item">
				<div class="nk-tb-col">
					<input type="hidden" name="related_pages[]" value="<?php echo $_smarty_tpl->tpl_vars['related_page']->value->id;?>
">
					<a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'PageAdmin','id'=>$_smarty_tpl->tpl_vars['related_page']->value->id),$_smarty_tpl ) );?>
" target="_blank">
						<div class="user-card">
							<div class="user-avatar border bg-white rounded-pill rounded-0">
								<?php if (!empty($_smarty_tpl->tpl_vars['related_page']->value->image)) {?>
								<img src="<?php echo call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'resize' ][ 0 ], array( $_smarty_tpl->tpl_vars['related_page']->value->image,70,70 ));?>
" class="rounded-0 p-1">
								<?php } else { ?>
								<img src="files/no-image.png" width=40 height=40 class="rounded-0 p-1">
								<?php }?>
							</div>
							<div class="user-info">
								<span class="tb-lead">
									<?php echo $_smarty_tpl->tpl_vars['related_page']->value->name;?>

								</span>
							</div>
						</div>
					</a>
				</div>
				<div class="nk-tb-col nk-tb-col-tools">
					<ul class="nk-tb-actions gx-1">
						<li>
							<a href="#" class="btn btn-trigger btn-icon js-list-move" data-toggle="tooltip" data-placement="top" data-original-title="Переместить">
								<em class="icon ti ti-arrows-vertical"></em>
							</a>
						</li>
						<li>
							<a href="#" class="btn btn-trigger btn-icon text-danger js-related-delete" data-toggle="tooltip" data-placement="top" data-original-title="Удалить">
								<em class="icon ti ti-trash"></em>
							</a>
						</li>
					</ul>
				</div>
			</div>
			<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
		</div>

				<div class="nk-tb-item js-product-related-new d-none">
			<div class="nk-tb-col">
				<input type="hidden" name="related_pages[]" value="">
				<a href="" target="_blank">
					<div class="user-card">
						<div class="user-avatar border bg-white rounded-pill rounded-0">
							<img src="" class="rounded-0 p-1">
						</div>
						<div class="user-info">
							<span class="tb-lead">
								<?php echo $_smarty_tpl->tpl_vars['related_page']->value->name;?>

							</span>
						</div>
					</div>
				</a>
			</div>
			<div class="nk-tb-col nk-tb-col-tools">
				<ul class="nk-tb-actions gx-1">
					<li>
						<a href="#" class="btn btn-trigger btn-icon js-list-move" data-toggle="tooltip" data-placement="top" data-original-title="Переместить">
							<em class="icon ti ti-arrows-vertical"></em>
						</a>
					</li>
					<li>
						<a href="#" class="btn btn-trigger btn-icon text-danger js-related-delete" data-toggle="tooltip" data-placement="top" data-original-title="Удалить">
							<em class="icon ti ti-trash"></em>
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
</div>

<div class="justify-center mt-2">
    <button type="submit" class="btn btn-success">Сохранить</button>
</div>
<?php }
}
