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

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_671cb823d90651_29193692',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'bde611655b8f459b7a144d671baec584dd3e630d' => 
    array (
      0 => '/home/w/wmaster77/corp.site-77.ru/public_html/admin/design/html/design.tpl',
      1 => 1729935395,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_671cb823d90651_29193692 (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.explode.php','function'=>'smarty_modifier_explode',),));
if ($_smarty_tpl->tpl_vars['file']->value) {
$_smarty_tpl->_assignInScope('meta_title', "Файл ".((string)$_smarty_tpl->tpl_vars['file']->value) ,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 echo $_smarty_tpl->tpl_vars['theme']->value;?>

                </h3>
                <div class="nk-block-des text-soft">
                    <p>Онлайн редактор файлов дизайна.</p>
                </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['file']->value;?>

            <?php } else {
echo $_smarty_tpl->tpl_vars['message_error']->value;
}?>.
    	</div>
    </div>
    <?php }?>

        <div class="nk-block-lg mb-3">

        <div class="card card-preview mb-2">
            <div class="card-inner">
                <nav>
                    <ul class="breadcrumb">
                        <li class="breadcrumb-item"><a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'DesignAdmin','type'=>$_smarty_tpl->tpl_vars['module']->value),$_smarty_tpl ) );?>
"><?php echo $_smarty_tpl->tpl_vars['theme']->value;?>
</a></li>
						<?php $_smarty_tpl->_assignInScope('dirs', smarty_modifier_explode("/",$_GET['dir']));?>
						<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dirs']->value, 'dir', true);
$_smarty_tpl->tpl_vars['dir']->iteration = 0;
$_smarty_tpl->tpl_vars['dir']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['dir']->value) {
$_smarty_tpl->tpl_vars['dir']->do_else = false;
$_smarty_tpl->tpl_vars['dir']->iteration++;
$_smarty_tpl->tpl_vars['dir']->last = $_smarty_tpl->tpl_vars['dir']->iteration === $_smarty_tpl->tpl_vars['dir']->total;
$__foreach_dir_0_saved = $_smarty_tpl->tpl_vars['dir'];
?>
						<li class="breadcrumb-item active">
							<?php if ($_smarty_tpl->tpl_vars['dir']->last) {?>
								<?php echo $_smarty_tpl->tpl_vars['dir']->value;?>

							<?php } else { ?>
																<a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'DesignAdmin','type'=>$_smarty_tpl->tpl_vars['module']->value,'dir'=>$_smarty_tpl->tpl_vars['dir']->value),$_smarty_tpl ) );?>
"><?php echo $_smarty_tpl->tpl_vars['dir']->value;?>
</a>
							<?php }?>
						</li>
						<?php
$_smarty_tpl->tpl_vars['dir'] = $__foreach_dir_0_saved;
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </ul>
                </nav>
            </div>
        </div>

		<div class="nk-block-head-xs">
            <div class="nk-block-between g-2">
                <div class="nk-block-head-content">
                    <h5 class="nk-block-title title">Список файлов</h5>
                </div>
            </div>
        </div>

        <div class="card card-preview">
            <div class="card-inner">
                <?php if ($_smarty_tpl->tpl_vars['list']->value->dirs || $_smarty_tpl->tpl_vars['list']->value->files) {?>

                				<div class="row no-gutters mx-1">
	                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['list']->value->dirs, 'd');
$_smarty_tpl->tpl_vars['d']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['d']->value) {
$_smarty_tpl->tpl_vars['d']->do_else = false;
?>
                    <div class="col-2">
						<a href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'DesignAdmin','type'=>$_smarty_tpl->tpl_vars['module']->value,'dir'=>$_smarty_tpl->tpl_vars['d']->value),$_smarty_tpl ) );?>
">
							<span class="nk-file-icon-type" style="width:30px;">
								<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72">
                                    <g><rect x="32" y="16" width="28" height="15" rx="2.5" ry="2.5" style="fill:#f29611"></rect><path d="M59.7778,61H12.2222A6.4215,6.4215,0,0,1,6,54.3962V17.6038A6.4215,6.4215,0,0,1,12.2222,11H30.6977a4.6714,4.6714,0,0,1,4.1128,2.5644L38,24H59.7778A5.91,5.91,0,0,1,66,30V54.3962A6.4215,6.4215,0,0,1,59.7778,61Z" style="fill:#ffb32c"></path><path d="M8.015,59c2.169,2.3827,4.6976,2.0161,6.195,2H58.7806a6.2768,6.2768,0,0,0,5.2061-2Z" style="fill:#f2a222"></path></g>
                                </svg>
							</span>
							<span>
								<?php echo $_smarty_tpl->tpl_vars['d']->value;?>

							</span>
						</a>
					</div>
	                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
				</div>

                				<div class="row no-gutters mx-1">
	                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['list']->value->files, '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-2">
						<a class="nk-file-icon-link" href="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['url'][0], array( array('module'=>'DesignAdmin','type'=>$_smarty_tpl->tpl_vars['module']->value,'dir'=>$_GET['dir'],'file'=>$_smarty_tpl->tpl_vars['t']->value),$_smarty_tpl ) );?>
">
							<span class="nk-file-icon-type" style="width:30px;">
								<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72"><path d="M49,61H23a5.0147,5.0147,0,0,1-5-5V16a5.0147,5.0147,0,0,1,5-5H40.9091L54,22.1111V56A5.0147,5.0147,0,0,1,49,61Z" style="fill:#e3edfc"></path><path d="M54,22.1111H44.1818a3.3034,3.3034,0,0,1-3.2727-3.3333V11s1.8409.2083,6.9545,4.5833C52.8409,20.0972,54,22.1111,54,22.1111Z" style="fill:#b7d0ea"></path><path d="M19.03,59A4.9835,4.9835,0,0,0,23,61H49a4.9835,4.9835,0,0,0,3.97-2Z" style="fill:#c4dbf2"></path><rect x="27" y="31" width="18" height="2" rx="1" ry="1" style="fill:#7e95c4"></rect><rect x="27" y="35" width="18" height="2" rx="1" ry="1" style="fill:#7e95c4"></rect><rect x="27" y="39" width="18" height="2" rx="1" ry="1" style="fill:#7e95c4"></rect><rect x="27" y="43" width="14" height="2" rx="1" ry="1" style="fill:#7e95c4"></rect><rect x="27" y="47" width="8" height="2" rx="1" ry="1" style="fill:#7e95c4"></rect></svg>
							</span>
							<span>
								<?php if ($_smarty_tpl->tpl_vars['file']->value == $_smarty_tpl->tpl_vars['t']->value) {?><b><?php echo $_smarty_tpl->tpl_vars['t']->value;?>
</b><?php } else {
echo $_smarty_tpl->tpl_vars['t']->value;
}?>
							</span>
						</a>
					</div>
					<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
				</div>
                <?php }?>

			</div>
		</div>
	</div>

    	<?php if (!empty($_smarty_tpl->tpl_vars['file_content']->value)) {?>
    <div class="nk-block">
    	<div class="card card-bordered">
			<div class="card-inner card-inner-xs">

								<div class="nk-block-head nk-block-head-lg pb-2">
					<div class="nk-block-between">

												<div class="nk-block-head-content">
							<h4 class="nk-block-title">
								<?php if ($_GET['dir'] && !$_smarty_tpl->tpl_vars['file']->value) {?>
									Папка <?php echo $_GET['dir'];?>
, файл не выбран
								<?php } elseif ($_GET['dir'] && $_smarty_tpl->tpl_vars['file']->value) {?>
									Папка <?php echo $_GET['dir'];?>
, файл <?php echo $_smarty_tpl->tpl_vars['file']->value;?>

								<?php } elseif ($_smarty_tpl->tpl_vars['file']->value) {?>
									Файл <?php echo $_smarty_tpl->tpl_vars['file']->value;?>

								<?php } else { ?>
									Файл не выбран
								<?php }?>
							</h4>
							<div class="nk-block-des">
								<p>
                                    Выберите файл для редактирования из списка. Для быстрого сохранения можно использовать комбинацию клавиш CTRL+S.
								</p>
							</div>
						</div>

												<div class="nk-block-head-content align-self-start d-lg-none">
							<a href="#" class="toggle btn btn-icon btn-trigger mt-n1" data-target="userAside">
								<em class="icon ti ti-menu"></em>
							</a>
						</div>
					</div>
				</div>

								<?php if (!empty($_smarty_tpl->tpl_vars['file']->value)) {?>
				<div class="nk-block">
					<form>
    					<div class="nk-data">
    						<div class="template-editor mw-100">
    							<div class="form-group">
    								<textarea name="file_content" class="form-control htmltext"><?php echo htmlspecialchars((string)$_smarty_tpl->tpl_vars['file_content']->value, ENT_QUOTES, 'UTF-8', true);?>
</textarea>
    							</div>
								<button type="button" class="btn btn-success js-design-save" data-dir="<?php echo $_GET['dir'];?>
" data-module="<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
" data-filename="<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
">Сохранить</button>
    						</div>
    					</div>
    				</form>
				</div>
				<?php }?>

			</div>
    	</div>
    </div>
	<?php }?>
</div>
<?php }
}
