136 lines
6.0 KiB
Smarty
136 lines
6.0 KiB
Smarty
{* Вкладки *}
|
||
{capture name=tabs}
|
||
{if in_array('products', $manager->permissions)}<li><a href="index.php?module=ProductsAdmin">Товары</a></li>{/if}
|
||
{if in_array('categories', $manager->permissions)}<li><a href="index.php?module=CategoriesAdmin">Категории</a></li>{/if}
|
||
{if in_array('brands', $manager->permissions)}<li><a href="index.php?module=BrandsAdmin">Бренды</a></li>{/if}
|
||
<li class="active"><a href="index.php?module=FeaturesAdmin">Свойства</a></li>
|
||
{/capture}
|
||
|
||
{if $feature->id}
|
||
{$meta_title = $feature->name scope=parent}
|
||
{else}
|
||
{$meta_title = 'Новое свойство' scope=parent}
|
||
{/if}
|
||
|
||
{* On document load *}
|
||
{literal}
|
||
<script>
|
||
$(function() {
|
||
/* Удаление картинки*/
|
||
$(".images a.delete").click( function() {
|
||
$("input[name='delete_image']").val('1');
|
||
$(this).closest("ul").fadeOut(200, function() { $(this).remove(); });
|
||
return false;
|
||
});
|
||
|
||
|
||
});
|
||
</script>
|
||
{/literal}
|
||
|
||
{if $message_success}
|
||
<!-- Системное сообщение -->
|
||
<div class="message message_success">
|
||
<span>{if $message_success=='added'}Свойство добавлено{elseif $message_success=='updated'}Свойство обновлено{else}{$message_success}{/if}</span>
|
||
{if $smarty.get.return}
|
||
<a class="button" href="{$smarty.get.return}">Вернуться</a>
|
||
{/if}
|
||
</div>
|
||
<!-- Системное сообщение (The End)-->
|
||
{/if}
|
||
|
||
{if $message_error}
|
||
<!-- Системное сообщение -->
|
||
<div class="message message_error">
|
||
<span>{$message_error}</span>
|
||
<a class="button" href="">Вернуться</a>
|
||
</div>
|
||
<!-- Системное сообщение (The End)-->
|
||
{/if}
|
||
|
||
<!-- Основная форма -->
|
||
<form method=post id=product enctype="multipart/form-data">
|
||
|
||
<div id="name">
|
||
<input class="name" name=name type="text" value="{$feature->name|escape}"/>
|
||
<input name=id type="hidden" value="{$feature->id|escape}"/>
|
||
</div>
|
||
|
||
<!-- Левая колонка свойств товара -->
|
||
<div id="column_left">
|
||
|
||
<!-- Категории -->
|
||
<div class="block">
|
||
<h2>Использовать в категориях</h2>
|
||
<select class=multiple_categories multiple name="feature_categories[]">
|
||
{function name=category_select selected_id=$product_category level=0}
|
||
{foreach from=$categories item=category}
|
||
<option value='{$category->id}' {if in_array($category->id, $feature_categories)}selected{/if} category_name='{$category->single_name}'>{section name=sp loop=$level} {/section}{$category->name}</option>
|
||
{category_select categories=$category->subcategories selected_id=$selected_id level=$level+1}
|
||
{/foreach}
|
||
{/function}
|
||
{category_select categories=$categories}
|
||
</select>
|
||
</div>
|
||
|
||
</div>
|
||
<!-- Левая колонка свойств товара (The End)-->
|
||
|
||
<!-- Правая колонка свойств товара -->
|
||
<div id="column_right">
|
||
|
||
<!-- Параметры страницы -->
|
||
<div class="block">
|
||
<h2>Настройки свойства</h2>
|
||
<ul>
|
||
<!-- Добавлены свойства -->
|
||
<li><input type=checkbox name=req id=req {if $feature->req}checked{/if} value="1"> <label for=req>Обязательно к заполнению</label></li>
|
||
<li><input type=checkbox name=on_prod id=on_prod {if $feature->on_prod}checked{/if} value="1"> <label for=on_prod>Отображать на странице продукта</label></li>
|
||
<li><input type=checkbox name=on_main id=on_main {if $feature->on_main}checked{/if} value="1"> <label for=on_main>Отображать на главной странице</label></li>
|
||
<li><input type=checkbox name=multiselect id=multiselect {if $feature->multiselect}checked{/if} value="1"> <label for=multiselect>Множественный выбор</label></li>
|
||
<li><input type=checkbox name=in_filter id=in_filter {if $feature->in_filter}checked{/if} value="1"> <label for=in_filter>Использовать в фильтре</label></li>
|
||
<li><input type=checkbox name=in_variant id=in_variant {if $feature->in_variant}checked{/if} value="1"> <label for=in_variant>Использовать в вариантах</label></li>
|
||
<li><input type=checkbox name=in_compare id=in_compare {if $feature->in_compare}checked{/if} value="1"> <label for=in_compare>Использовать в сравнении</label></li>
|
||
<li><input type=checkbox name=isrange id=isrange {if $feature->isrange}checked{/if} value="1" /> <label for=isrange>Выбор диапазона (от... до...)</label>
|
||
<ul>
|
||
<li><input type=checkbox name=slider id=slider {if $feature->slider}checked{/if} value="1" /> <label for=slider>Ползунок</label></li>
|
||
<li><label class=property for=unit>Единицы измерения</label><input name="unit" class="small_simpla_inp" type="text" id="unit" value="{$feature->unit|escape}" /></li>
|
||
</ul>
|
||
</li>
|
||
<li><input type=checkbox name=istext id=istext {if $feature->istext}checked{/if} value="1" /> <label for=istext>Значение клиента</label>
|
||
<li><label for=nameselect>Текст при выборе</label><input name="nameselect" class="small_simpla_inp" type="text" id="nameselect" value="{$feature->nameselect|escape}" /></li>
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
<!-- Изображение категории -->
|
||
<div class="block layer images">
|
||
<h2>Изображение свойства</h2>
|
||
<input class='upload_image' name=image type=file>
|
||
<input type=hidden name="delete_image" value="">
|
||
{if $feature->image}
|
||
<ul>
|
||
<li>
|
||
<a href='#' class="delete"><img src='design/images/cross-circle-frame.png'></a>
|
||
<img src="../{$config->features_images_dir}{$feature->image}" alt="" />
|
||
</li>
|
||
</ul>
|
||
{/if}
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Параметры страницы (The End)-->
|
||
<input type=hidden name='session_id' value='{$smarty.session.id}'>
|
||
<input class="button_green" type="submit" name="" value="Сохранить" />
|
||
|
||
|
||
|
||
</div>
|
||
<!-- Правая колонка свойств товара (The End)-->
|
||
|
||
|
||
</form>
|
||
<!-- Основная форма (The End) -->
|
||
|