99 lines
3.9 KiB
Smarty
99 lines
3.9 KiB
Smarty
{extends "../window.tpl"}
|
|
|
|
{block tabs}
|
|
{windowTab id='flapTemplates'}
|
|
{/block}
|
|
|
|
{block js append}
|
|
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
|
|
<script type="text/javascript" src="static/js/jquery.mjs.nestedSortable.min.js"></script>
|
|
<script src="static/js/chosen.image.js"></script>
|
|
<script type="text/javascript" src="static/js/blocks.js?2"></script>
|
|
{/block}
|
|
|
|
{block tabsContent}
|
|
<div id="flapTemplates" class="tab-pane fade in boxFlex">
|
|
<h1 class="h4 main-panel-title">{'flapTemplates'|translate}</h1>
|
|
|
|
{if $categories|count}
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label">
|
|
<label>{'name'|translate}</label>
|
|
</div>
|
|
<div class="col-md-5">
|
|
<input type="text" class="form-control" name="data[name]" maxlength="100" value="{$body.data.name}"/>
|
|
</div>
|
|
<div class="col-md-1">
|
|
<button type="button" name="counts" class="btn btn-md" onclick="nw('productsList', '', 'template_id={$body.data.id}');"
|
|
title="Počet výskytů">{$body.data.uses}</button>
|
|
</div>
|
|
|
|
<div class="col-md-1 col-md-offset-1 control-label">
|
|
<label>{'category'|translate}</label>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="wpj-form-group">
|
|
<div class="input-group">
|
|
<div>
|
|
{print_select name='data[id_category]' var=$categories selected=$body.data.id_category}
|
|
</div>
|
|
<span class="input-group-btn">
|
|
{if $body.data.id_category}
|
|
<a href="javascript:void openTemplateCategoryDetail();" class="btn btn-primary btn-sm">
|
|
<span class="bi bi-pencil-square"></span>
|
|
</a>
|
|
{else}
|
|
<a href="javascript:void openTemplateCategoryDetail();" class="btn btn-success btn-sm">
|
|
<span class="bi bi-plus-lg"></span>
|
|
</a>
|
|
{/if}
|
|
|
|
<script type="text/javascript">
|
|
function openTemplateCategoryDetail() {
|
|
const id = $('[data[id_category]] option:selected').val();
|
|
|
|
if (id && !isNaN(+id)) {
|
|
nw('templatesCategories', id);
|
|
} else {
|
|
nw('templatesCategories');
|
|
}
|
|
}
|
|
</script>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label"><label>{'visibility'|translate}</label></div>
|
|
<div class="col-md-2">
|
|
{print_toggle name="figure"}
|
|
</div>
|
|
</div>
|
|
<div class="form-group bottom-space">
|
|
<span class="col-md-1"></span>
|
|
<div class="col-md-6">
|
|
{include 'utils/translations.figure.tpl'
|
|
figureData=$body.data.translation_figure
|
|
parentFigure=$body.data.figure}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-1 control-label">
|
|
<label>{'text'|translate}</label>
|
|
</div>
|
|
<div class="col-md-11 box">
|
|
{include "utils/blocks.tpl" identifiers=$cfg.Blocks.identifiers blocks=$body.data.blocks acn=$body.acn}
|
|
</div>
|
|
</div>
|
|
{else}
|
|
<p>Začněte vytvořením <a href="javascript:nw('templatesCategories')" target="_blank">Typu šablony</a>.</p>
|
|
{/if}
|
|
|
|
{block 'custom-data'}{/block}
|
|
</div>
|
|
{/block}
|
|
|