<?php
/* Smarty version 4.5.3, created on 2024-10-26 08:14:30
  from '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/theme.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_671c7ab6b05532_73533003',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '70299c9b1c02bedfadc226384b09d9e14b6be0ed' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/theme.tpl',
      1 => 1716650267,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_671c7ab6b05532_73533003 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/home/w/wmaster77/corp.site-77.ru/public_html/modules/smarty/plugins/modifier.truncate.php','function'=>'smarty_modifier_truncate',),));
if ($_smarty_tpl->tpl_vars['theme']->value->name) {
$_smarty_tpl->_assignInScope('meta_title', "Тема ".((string)$_smarty_tpl->tpl_vars['theme']->value->name) ,false ,8);
} else {
$_smarty_tpl->_assignInScope('meta_title', "Тема не указана" ,false ,8);
}?>

<div class="container-fluid">

		<div class="nk-block-head nk-block-head-sm">
		<div class="nk-block-between">

						<div class="nk-block-head-content">
				<h3 class="nk-block-title page-title">
					<?php if ($_smarty_tpl->tpl_vars['theme']->value->name) {?>
					Текущая тема - <?php echo $_smarty_tpl->tpl_vars['theme']->value->name;?>

					<?php } else { ?>
					Установите тему магазина
					<?php }?>
				</h3>
				<div class="nk-block-des text-soft">
					<p>Управление темами магазина.</p>
				</div>
			</div>

						<div class="nk-block-head-content">
    			<div class="toggle-wrap nk-block-tools-toggle">

    				    				<a href="#" class="btn btn-icon btn-trigger toggle-expand mr-n1" data-target="pageMenu">
    					<em class="icon ti ti-menu"></em>
    				</a>

    				    				<div class="toggle-expand-content" data-content="pageMenu">
    					<ul class="nk-block-tools g-3">
    						<li>
    							<a href="#" class="btn btn-secondary js-clone-theme">
    								<em class="icon ti ti-copy"></em>
    								<span>Создать копию темы</span>
    							</a>
    						</li>
    					</ul>
    				</div>
    			</div>
    		</div>

		</div>
	</div>

		<?php if ($_smarty_tpl->tpl_vars['message_error']->value) {?>
	<div class="pb-2">
		<div class="alert alert-fill alert-danger alert-icon">
			<em class="icon ti ti-circle-x"></em>
			<?php if ($_smarty_tpl->tpl_vars['message_error']->value == 'permissions') {?>Установите права на запись для папки <?php echo $_smarty_tpl->tpl_vars['themes_dir']->value;?>

			<?php } elseif ($_smarty_tpl->tpl_vars['message_error']->value == 'name_exists') {?>Тема с таким именем уже существует
			<?php } else {
echo $_smarty_tpl->tpl_vars['message_error']->value;
}?>.
		</div>
	</div>
	<?php }?>

		<div class="nk-block">

		    	<form class="js-theme" method="post" enctype="multipart/form-data">

    		    		<input type="hidden" name="action">
    		<input type="hidden" name="theme">

    					<div class="row">

				<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['themes']->value, 't');
$_smarty_tpl->tpl_vars['t']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['t']->value) {
$_smarty_tpl->tpl_vars['t']->do_else = false;
?>
				<div class="col-lg-3 mb-2 js-item-theme" data-theme="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['t']->value->name, ENT_QUOTES, 'UTF-8', true);?>
">
					<div class="card card-bordered">
						<div class="h-100 theme-block">
							<img src="<?php echo $_smarty_tpl->tpl_vars['root_dir']->value;?>
../design/<?php echo $_smarty_tpl->tpl_vars['t']->value->name;?>
/preview.png" class="card-img-top" alt="<?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['t']->value->name, ENT_QUOTES, 'UTF-8', true);?>
">
						</div>
						<div class="card-inner">
							<h5 class="card-title js-theme-name"><?php echo smarty_modifier_truncate(htmlspecialchars((string)$_smarty_tpl->tpl_vars['t']->value->name, ENT_QUOTES, 'UTF-8', true),16,'...');?>
</h5>
							<div class="between-center flex-wrap">

																<div>
									<?php if ($_smarty_tpl->tpl_vars['theme']->value->name == $_smarty_tpl->tpl_vars['t']->value->name) {?>
									<div class="btn btn-secondary">
										<em class="icon ti ti-circle-check"></em>
										<span>Активна</span>
									</div>
									<?php } else { ?>
									<a href="#" class="btn btn-light js-set-main-theme">Выбрать</a>
									<?php }?>
								</div>

																<div>
																		<div class="btn btn-icon btn-light js-theme-edit" data-toggle="tooltip" data-placement="top" title="Переименовать">
										<em class="icon ti ti-pencil"></em>
									</div>

									<?php if ($_smarty_tpl->tpl_vars['theme']->value->name != $_smarty_tpl->tpl_vars['t']->value->name) {?>
																		<div class="btn btn-icon btn-danger js-theme-delete" data-toggle="tooltip" data-placement="top" title="Удалить">
										<em class="icon ti ti-trash"></em>
									</div>
									<?php }?>
								</div>

							</div>
						</div>
					</div>
				</div>
				<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
			</div>
			<div class="row g-3">
				<div class="col-lg-7 offset-lg-5">
					<div class="form-group mt-2">
						<button type="submit" class="btn btn-success">Сохранить</button>
					</div>
				</div>
			</div>
		</form>
	</div>

</div>
<?php }
}
