first commit
This commit is contained in:
319
admin/templates/adminPhotos.tpl
Normal file
319
admin/templates/adminPhotos.tpl
Normal file
@@ -0,0 +1,319 @@
|
||||
{extends "windowFrame.tpl"}
|
||||
|
||||
{block body_class}class="panel_frame"{/block}
|
||||
|
||||
{block css append}
|
||||
<link href="./static/fancybox2/jquery.fancybox.css" rel="stylesheet" media="screen">
|
||||
{*<link href="static/fineuploader/fine-uploader.css" rel="stylesheet">*}
|
||||
{/block}
|
||||
|
||||
{block js}
|
||||
{$smarty.block.parent}
|
||||
<script src="./static/fancybox2/jquery.fancybox.pack.js"></script>
|
||||
<script src="static/fineuploader/jquery.fine-uploader.min.js"></script>
|
||||
<script>
|
||||
// Keep in sync with engine/admin/templates/list/photos.tpl !!
|
||||
$(document).ready(function() {
|
||||
var extensions = ['jpeg', 'jpg', 'gif', 'png', 'svg', 'webp', 'avif', 'gif'];
|
||||
{ifModule VIDEOS}
|
||||
extensions.push('mp4', 'mkv', 'm4a', 'm4v', 'mov');
|
||||
{/ifModule}
|
||||
|
||||
$('#thumbnail-fine-uploader').fineUploader({
|
||||
template: 'qq-simple-thumbnails-template',
|
||||
thumbnails: {
|
||||
placeholders: {
|
||||
waitingPath: 'static/fineuploader/placeholders/waiting-generic.png',
|
||||
notAvailablePath: 'static/fineuploader/placeholders/not_available-generic.png',
|
||||
},
|
||||
},
|
||||
request: {
|
||||
endpoint: '{$ctrl.currUrl.Rel nofilter}',
|
||||
},
|
||||
blobProperties: {
|
||||
name: 'filename',
|
||||
},
|
||||
validation: {
|
||||
allowedExtensions: extensions,
|
||||
},
|
||||
maxConnections: 1,
|
||||
}).on('allComplete', function(event, success, failed) {
|
||||
$('[data-type="save"]').trigger('click');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/template" id="qq-simple-thumbnails-template">
|
||||
<div class="qq-uploader-selector qq-uploader">
|
||||
<div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
|
||||
<span>{'move'|translate:'photos'}</span>
|
||||
</div>
|
||||
<div class="qq-upload-button-selector button inputFullWidth">
|
||||
<a class="btn btn-success btn-block"><span class="glyphicon glyphicon-plus"></span> {'upload'|translate:'photos'}</a>
|
||||
</div>
|
||||
<span class="qq-drop-processing-selector qq-drop-processing">
|
||||
<span>{'working'|translate:'photos'}</span>
|
||||
<span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
|
||||
</span>
|
||||
<ul class="qq-upload-list-selector qq-upload-list">
|
||||
<li>
|
||||
<div class="qq-progress-bar-container-selector">
|
||||
<div class="qq-progress-bar-selector qq-progress-bar"></div>
|
||||
</div>
|
||||
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
|
||||
<img class="qq-thumbnail-selector" qq-max-size="100" qq-server-scale>
|
||||
<span class="qq-edit-filename-icon-selector qq-edit-filename-icon"></span>
|
||||
<span class="qq-upload-file-selector qq-upload-file"></span>
|
||||
<input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
|
||||
<span class="qq-upload-size-selector qq-upload-size"></span>
|
||||
<a class="qq-upload-cancel-selector qq-upload-cancel" href="#">{'cancel'|translate:'photos'}</a>
|
||||
<a class="qq-upload-retry-selector qq-upload-retry" href="#">{'repeat'|translate:'photos'}</a>
|
||||
<a class="qq-upload-delete-selector qq-upload-delete" href="#">{'delete'|translate:'photos'}</a>
|
||||
<span class="qq-upload-status-text-selector qq-upload-status-text"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block content}
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
{if $body.photos == 0}
|
||||
<div class="row">
|
||||
<div class="alert alert-info alert-dismissable">{'noPhotos'|translate:"products"}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{block top_buttons}
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-4">
|
||||
<div id="thumbnail-fine-uploader" class="admin-photos"></div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="button" class="btn btn-block" value="{'titleAddExisting'|translate:'photos'}" onclick="searchWnd('photo', onImageSelected,'','multiSelect=1');display('divPhotosInsert');">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="button" class="btn btn-block" value="{'copyImg'|translate:'photos'} {$body.copy_from}" onclick="display('divPhotosCopy');"> {* todo trans *}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<script type="application/javascript">
|
||||
function onImageSelected(id) {
|
||||
$('#photoID').val(id).closest('form').submit();
|
||||
}
|
||||
|
||||
function onSelected(id) {
|
||||
$('#{$body.tablefield}2').val(id).closest('form').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="divPhotosCopy" style="display:none" class="well">
|
||||
<div class="row">
|
||||
<form name="copy" method="post" action="launch.php?s={$body.s}&ID={$body.ID}&acn=copyPhotos" class="form-horizontal">
|
||||
<div class="col-md-3 control-label"><label>{'copyImg'|translate:'photos'} {$body.copy_from}</label></div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="data[{$body.tablefield}]" id="{$body.tablefield}2">
|
||||
<script type="text/javascript">
|
||||
new $.wpjAutoComplete({
|
||||
input: $.dataField('{$body.tablefield}'),
|
||||
type: '{if $body.search_field == 'section'}categories{else}{$body.search_field}{/if}',
|
||||
});
|
||||
</script>
|
||||
<div class="input-group-btn">
|
||||
{* Sekce nemaji list z ktereho by slo selectovat *}
|
||||
{if $body.search_field != 'section'}
|
||||
<a href="javascript:searchWnd('{lcfirst($body.photo_nametype)}', onSelected)"
|
||||
class="btn btn-sm">{"find{$body.photo_nametype}"|translate:"{lcfirst($body.photo_nametype)}s"}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" name="submitCopy" class="btn btn-primary btn-block btn-sm" value="{'copy'|translate:'photos'}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="divPhotosInsert" style="display:none" class="well">
|
||||
<div class="row">
|
||||
<form name="insert" method="post" action="launch.php?s={$body.s}&ID={$body.ID}&acn=insertPhoto" class="form-horizontal">
|
||||
<div class="col-md-3 control-label"><label>{'addId'|translate:'photos'}</label></div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="data[id_photo]" id="photoID" onchange="">
|
||||
<div class="input-group-btn">
|
||||
<a href="javascript:searchWnd('photo', onImageSelected,'','multiSelect=1')" class="btn btn-sm">{'find'|translate:'photos'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" name="submitInsert" class="btn btn-primary btn-block btn-sm" value="{'add'|translate:'photos'}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 class="h4 main-panel-title">{'sectionPhotos'|translate:'products'} </h1>
|
||||
<form name="editform" action="launch.php?s={$smarty.get.s}&acn=edit&ID={$body.ID}" method="POST" class="form-horizontal" id="main">
|
||||
<div id="photo" class="panel-group panel-group-lists ui-sortable">
|
||||
<input type="hidden" id="{$body.tablefield}" name="ID" value="{$body.ID}">
|
||||
{foreach $body.photos as $photo}
|
||||
<div class="panel" data-form-item>
|
||||
<div class="row m-x-0 bottom-space">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-5 text-center">
|
||||
<input type="hidden" data-sort="{$photo.id}" name="data[{$photo.id}][position]" value="{$photo.position}">
|
||||
<span class="drag-drop-mover pull-right" style="margin-top: 20px;">
|
||||
<i class="bi bi-arrows-move handle"></i>
|
||||
</span>
|
||||
</div>
|
||||
{block 'photo-row'}
|
||||
<div class="col-md-7">
|
||||
<a rel="bigphoto" href="{static_url url=$photo.img.src_big}">
|
||||
<div class="thumbnail" style="margin: 0"><img class="img-rounded" src="{static_url url=$photo.img.source}" alt="Obrázek"></div>
|
||||
</a>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-{if $body.variations|count <= 1}10{else}6{/if}">
|
||||
<div class="row">
|
||||
{block 'info-row'}
|
||||
<div class="col-md-6" style="padding-top: 7px;">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div >
|
||||
<a href="javascript:nw('photos', '{$photo.id}');">
|
||||
<span class=" glyphicon glyphicon-cog"></span>
|
||||
{'settings'|translate:'photos'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{if $photo.show_in_lead == "Y"}
|
||||
<div class="col-md-10">
|
||||
<span class="label label-primary">
|
||||
<span class="glyphicon glyphicon-picture" title="{'main'|translate:'photos'}"></span>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span class="help-block">{'added'|translate:'photos'}: {$photo.date|date_format:"%d. %m. %Y"}</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span class="pull-right">
|
||||
{insert_llm_button type='image_description' target="data[{$photo.id}][descr]" entityType='photos' entityId=$photo.id}
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span class="pull-right">
|
||||
<a class="btn-sm btn btn-danger" data-form-delete>
|
||||
<input class="hidden" type="checkbox" name="data[{$photo.id}][delete]">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 control-label">
|
||||
<input type="text" class="form-control input-sm" name="data[{$photo.id}][descr]" id="descr" value="{$photo.descr}"
|
||||
placeholder="{'description'|translate:'photos'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding-top: 7px;">
|
||||
<span class="help-block m-t-0">
|
||||
<strong>ID:</strong> {$photo.IDph}
|
||||
</span>
|
||||
</div>
|
||||
{block "photos-custom-row"}{/block}
|
||||
</div>
|
||||
{if $body.variations|count > 1}
|
||||
<div class="col-md-4">
|
||||
<input type="hidden" name="id_variation[{$photo.id}][]" value="-1">
|
||||
{if {find_module name="products_variations_photos"}}
|
||||
<select name="id_variation[{$photo.id}][]" multiple="multiple" class="selecter small">
|
||||
{foreach $body.variations as $variation_id => $variation}
|
||||
<option value="{$variation_id}" {$variation_id|selected:$photo.varSel}>{$variation}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-4">
|
||||
<input type="submit" class="btn btn-primary btn-block" name="submit" data-type="save" value="{'save'|translate:'photos'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
$('.ui-sortable').sortable({
|
||||
helper: function(e, row) {
|
||||
UnsavedOff();
|
||||
var $row = $(row);
|
||||
var $helper = $row.clone().addClass('drag-drop');
|
||||
return $helper[0];
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
var $instead = $(ui.item).prev().find('input').val();
|
||||
if($instead == null){
|
||||
$instead = 0;
|
||||
} else{
|
||||
$instead++;
|
||||
}
|
||||
savePositions(ui.item, $instead);
|
||||
UnsavedOn();
|
||||
},
|
||||
handle: '.handle',
|
||||
});
|
||||
|
||||
function savePositions(item, position) {
|
||||
var data = {
|
||||
{$body.tablefield} : $('#{$body.tablefield}').val(),
|
||||
id_photo : item.find('input').data('sort'),
|
||||
position : position,
|
||||
};
|
||||
$.get('launch.php?s={$smarty.get.s}&acn=movePhoto&ID={$body.ID}', { moved_item : data }, function(response, status) {
|
||||
if (status == "success"){
|
||||
$('.panel').remove();
|
||||
$(response).find('.panel').each(function() {
|
||||
$('#photo').append($(this));
|
||||
});
|
||||
styleFormInputs($('#photo'), true);
|
||||
|
||||
showInfoMessage('Uloženo', 'success');
|
||||
}
|
||||
|
||||
if (status == 'error') {
|
||||
showInfoMessage('Chyba', 'danger');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('a[rel=bigphoto]').fancybox({
|
||||
openEffect: 'none',
|
||||
closeEffect: 'none',
|
||||
});
|
||||
|
||||
initForm({
|
||||
selector: '#photo',
|
||||
});
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
121
admin/templates/autocomplete-form/articles.tpl
Normal file
121
admin/templates/autocomplete-form/articles.tpl
Normal file
@@ -0,0 +1,121 @@
|
||||
<div data-sortable="articles_sortable_{$instance}" data-autocomplete-items="articles_{$instance}" class="panel-group panel-group-lists">
|
||||
<script id="multiselectAutocomplete_articles_{$instance}" type="text/x-dot-template">
|
||||
{literal}
|
||||
{{~it.items :item :index}}
|
||||
<div class="panel autocomplete-results" data-form-item="{{=item.value}}" style="display:none">
|
||||
<div class="panel-body">
|
||||
<div{/literal}{if $sortable}{literal} class="col-md-1"{/literal}{/if}{literal}>
|
||||
{/literal}{if $sortable}{literal}
|
||||
<span class="drag-drop-mover pull-right">
|
||||
<i class="bi bi-arrows-move handle"></i>
|
||||
</span>
|
||||
<input type="hidden" data-sort=""
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][position]"
|
||||
value="{{=item.position}}">
|
||||
{/literal}{/if}{literal}
|
||||
|
||||
<input type="hidden" class="form-control input-sm"
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][id_article]"
|
||||
value="{{=item.value}}">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="product-title">
|
||||
<a href="javascript:nw('articles', '{{=item.value}}')">{{=item.label}}</a><br>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{{? it.articlesRelatedTypes}}
|
||||
<p>
|
||||
<select class="selecter" multiple
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][type][]"
|
||||
data-placeholder="Vyberte typ souvisejícího článku...">
|
||||
{{~it.articlesRelatedTypes :type :typeIndex}}
|
||||
<option value="{{=type.id}}" {{? item.types && item.types.includes(type.id) }} selected="selected" {{?}}>
|
||||
{{=type.name}}
|
||||
</option>
|
||||
{{~}}
|
||||
</select>
|
||||
</p>
|
||||
{{?}}
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<a class="btn-sm btn btn-danger" data-form-delete>
|
||||
<input class="hidden" type="checkbox"
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][delete]"/>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{~}}
|
||||
{/literal}
|
||||
</script>
|
||||
</div>
|
||||
<script type="application/javascript">
|
||||
$('{$searchInput nofilter}')
|
||||
.multiSelectAutoComplete({
|
||||
formTemplate: '#multiselectAutocomplete_articles_{$instance}',
|
||||
formWrapper: 'articles_{$instance}',
|
||||
type: 'articles',
|
||||
itemIdentifierKey: 'value',
|
||||
{if $except}parameters: 'except_article={$except}',{/if}
|
||||
{literal}
|
||||
subtemplates: {
|
||||
menuItem: '<div tabindex="-1" data-autocomplete-item="{{=index}}">' +
|
||||
'<p>{{=item.text}}</p>' +
|
||||
'{{#def.buttons}}' +
|
||||
'</div>' +
|
||||
'{{#def.bottom}}',
|
||||
},
|
||||
{/literal}
|
||||
{if $sortable}
|
||||
afterSelect: function () {
|
||||
$('[data-sortable="articles_sortable_{$instance}"]').sortable('refresh');
|
||||
$('[data-sortable="articles_sortable_{$instance}"]').data('uiSortable')._trigger('update');
|
||||
}
|
||||
{/if}
|
||||
{if $additionalData},
|
||||
templateContext: {
|
||||
{foreach $additionalData as $key => $data}
|
||||
"{$key}": {$data|json_encode nofilter}
|
||||
{/foreach}
|
||||
}
|
||||
{/if}
|
||||
{block "autocomplete-config"}{/block}
|
||||
})
|
||||
.multiSelectAutoComplete('addItems', {
|
||||
"items": {$items|json_encode nofilter}
|
||||
{if $additionalData}
|
||||
{foreach $additionalData as $key => $data}
|
||||
,"{$key}": {$data|json_encode nofilter}
|
||||
{/foreach}
|
||||
{/if}
|
||||
});
|
||||
|
||||
initForm({
|
||||
selector: '[data-autocomplete-items="articles_{$instance}"]',
|
||||
beforeAdd: function (callback) {
|
||||
var $item = callback();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
{if $sortable}
|
||||
$('[data-sortable="articles_sortable_{$instance}"]').sortable({
|
||||
helper: function (e, row) {
|
||||
var $row = $(row);
|
||||
var $helper = $row.clone().addClass('drag-drop');
|
||||
return $helper[0];
|
||||
},
|
||||
update: function (event, ui) {
|
||||
$(this).children().each(function (index, item) {
|
||||
$(item).find('[data-sort]').val($(item).index()).change();
|
||||
});
|
||||
},
|
||||
handle: '.handle',
|
||||
placeholder: 'placeholder',
|
||||
});
|
||||
{/if}
|
||||
</script>
|
||||
112
admin/templates/autocomplete-form/products.tpl
Normal file
112
admin/templates/autocomplete-form/products.tpl
Normal file
@@ -0,0 +1,112 @@
|
||||
<div data-sortable="products_sortable_{$instance}" data-autocomplete-items="products_{$instance}" class="panel-group panel-group-lists">
|
||||
<script id="multiselectAutocomplete_products_{$instance}" type="text/x-dot-template">
|
||||
{literal}
|
||||
{{~it.items :item :index}}
|
||||
<div class="panel autocomplete-results" data-form-item="{{=item.id_rel_product??item.id}}" style="display:none;">
|
||||
<div class="panel-body">
|
||||
<div{/literal}{if $sortable}{literal} class="col-md-1"{/literal}{/if}{literal}>
|
||||
{/literal}{if $sortable}{literal}
|
||||
<span class="drag-drop-mover pull-right">
|
||||
<i class="bi bi-arrows-move handle"></i>
|
||||
</span>
|
||||
{/literal}{/if}{literal}
|
||||
<input type="hidden" data-sort=""
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][position]"
|
||||
value="{{=item.position}}">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="hidden" class="form-control input-sm"
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][id_product]"
|
||||
value="{{=item.id_rel_product??item.id}}">
|
||||
{{? item.image}}
|
||||
<img src="{{=item.image.src}}" alt="{{=item.image.descr}}">
|
||||
{{?}}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<p class="product-title">
|
||||
<a href="javascript:nw('product', '{{=item.id_rel_product??item.id}}')">{{=item.title}}</a><br>
|
||||
<small>Kód: {{=item.code}} | Skladem: {{=item.in_store??item.inStore}} ks</small>
|
||||
</p>
|
||||
{{? it.productsRelatedTypes}}
|
||||
<p>
|
||||
<select class="selecter" multiple
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][type][]"
|
||||
data-placeholder="Vyberte typ souvisejícího zboží...">
|
||||
{{~it.productsRelatedTypes :type :typeIndex}}
|
||||
<option value="{{=type.id}}" {{? item.types && item.types.includes(type.id) }} selected="selected" {{?}}>
|
||||
{{=type.name}}
|
||||
</option>
|
||||
{{~}}
|
||||
</select>
|
||||
</p>
|
||||
{{?}}
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<a class="btn-sm btn btn-danger" data-form-delete>
|
||||
<input class="hidden" type="checkbox"
|
||||
name="data[{/literal}{$inputName}{literal}][{{? item.index }}-{{=item.index}}{{??}}{{=index + 1}}{{?}}][delete]"/>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{~}}
|
||||
{/literal}
|
||||
</script>
|
||||
</div>
|
||||
<script type="application/javascript">
|
||||
$('{$searchInput nofilter}')
|
||||
.multiSelectAutoComplete({
|
||||
formTemplate: '#multiselectAutocomplete_products_{$instance}',
|
||||
formWrapper: 'products_{$instance}',
|
||||
{if $except}parameters: 'except_product={$except}'{/if}
|
||||
{if $sortable},
|
||||
afterSelect: function () {
|
||||
$('[data-sortable="products_sortable_{$instance}"]').sortable('refresh');
|
||||
$('[data-sortable="products_sortable_{$instance}"]').data('uiSortable')._trigger('update');
|
||||
}
|
||||
{/if}
|
||||
{if $additionalData},
|
||||
templateContext: {
|
||||
{foreach $additionalData as $key => $data}
|
||||
"{$key}": {$data|json_encode nofilter}
|
||||
{/foreach}
|
||||
}
|
||||
{/if}
|
||||
{block "autocomplete-config"}{/block}
|
||||
})
|
||||
.multiSelectAutoComplete('addItems', {
|
||||
"items": {$items|json_encode nofilter}
|
||||
{if $additionalData}
|
||||
{foreach $additionalData as $key => $data}
|
||||
,"{$key}": {$data|json_encode nofilter}
|
||||
{/foreach}
|
||||
{/if}
|
||||
});
|
||||
|
||||
initForm({
|
||||
selector: '[data-autocomplete-items="products_{$instance}"]',
|
||||
beforeAdd: function (callback) {
|
||||
var $item = callback();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
{if $sortable}
|
||||
$('[data-sortable="products_sortable_{$instance}"]').sortable({
|
||||
helper: function (e, row) {
|
||||
var $row = $(row);
|
||||
var $helper = $row.clone().addClass('drag-drop');
|
||||
return $helper[0];
|
||||
},
|
||||
update: function (event, ui) {
|
||||
$(this).children().each(function (index, item) {
|
||||
$(item).find('[data-sort]').val($(item).index()).change();
|
||||
});
|
||||
},
|
||||
handle: '.handle',
|
||||
placeholder: 'placeholder',
|
||||
});
|
||||
{/if}
|
||||
</script>
|
||||
78
admin/templates/base.tpl
Normal file
78
admin/templates/base.tpl
Normal file
@@ -0,0 +1,78 @@
|
||||
{block functions}{/block}
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{block title}{/block}</title>
|
||||
{ifmodule COMPONENTS}
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
{elsemodule}
|
||||
<link rel="shortcut icon" href="/templates/images/favicon.ico">
|
||||
{/ifmodule}
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin-ext" rel="stylesheet">
|
||||
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
{block css}
|
||||
{block "css-entry"}
|
||||
{encore_entry_link_tags entry='app' build='admin'}
|
||||
{/block}
|
||||
{/block}
|
||||
|
||||
{block sentry}{/block}
|
||||
|
||||
<script>
|
||||
window.wpj = window.wpj || {ldelim}{rdelim};
|
||||
|
||||
var wpjConfig = {
|
||||
'nwAsTab': {if $dbcfg.nw_as_tab == 'Y'}true{else}false{/if}
|
||||
};
|
||||
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){ dataLayer.push(arguments); }
|
||||
|
||||
{if $view}
|
||||
{$_branch = getShopName()}
|
||||
{$_user = getAdminUser()}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-Q3V4S9PLK3', {
|
||||
'page_title': '{$view->getClassName()}',
|
||||
'wpj_admin_shop': '{$_branch}'
|
||||
})
|
||||
{if $_user}
|
||||
gtag('set', 'user_id', '{$_branch}-{$_user.login}');
|
||||
gtag('set', 'user_properties', {
|
||||
'wpj_admin_id': '{$_user.id}'
|
||||
});
|
||||
{/if}
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
{block js}
|
||||
{block "js-entry"}
|
||||
{encore_entry_script_tags entry='app' build='admin'}
|
||||
{/block}
|
||||
{/block}
|
||||
</head>
|
||||
|
||||
<body {block body_class}{/block}>
|
||||
|
||||
{block body}
|
||||
{/block}
|
||||
|
||||
{block "js-onready"}
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready}
|
||||
{/block}
|
||||
</script>
|
||||
|
||||
{if $view}
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q3V4S9PLK3"></script>
|
||||
{/if}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
211
admin/templates/board/export_orders.tpl
Normal file
211
admin/templates/board/export_orders.tpl
Normal file
@@ -0,0 +1,211 @@
|
||||
{extends "frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container-fluid">
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h1 class="h4 main-panel-title">{block "export-title"}{"ExportOrders"|translate:"export"}{/block}</h1>
|
||||
{* TODO: Vrať mě zpátky na POST, jakmile bunny opraví bug s bufferováním POST requestů *}
|
||||
<form name="form_orders" method="GET" action="launch.php">
|
||||
<input type="hidden" name="s" value="export.php">
|
||||
{block "export-filter"}
|
||||
{insert_orders_filter filterName='flapExportOrder' saveFilter=true}
|
||||
{/block}
|
||||
|
||||
<div class="row bottom-space">
|
||||
<div class="col-lg-1 col-md-2 control-label right">
|
||||
<label>Kód</label>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-8">
|
||||
<div class="input-group">
|
||||
<input class="form-control input-sm" name="order_ids"
|
||||
placeholder="Kódy objednávek oddělené čárkou" value="" id="paste">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-sm" title="Zvětšit" data-toggle="modal" data-target="#codeModal">
|
||||
<span class="glyphicon glyphicon-resize-full"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include "utils/codesModal.tpl" modal_id="codeModal" title="Kódy objednávky"}
|
||||
|
||||
<script>
|
||||
initCodesModal('#paste', '#paste-modal', '#codeModal')
|
||||
</script>
|
||||
|
||||
{block "export-format"}
|
||||
<div class="row bottom-space">
|
||||
<div class="col-lg-1 col-md-2 control-label right">
|
||||
<label>Ve formátu</label>
|
||||
</div>
|
||||
<div class="col-lg-11 col-md-10">
|
||||
<div class="m-b-1">
|
||||
{ifmodule OSS_VATS}
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="excelOss" id="oFOSS"/>
|
||||
<label for="oFOSS">
|
||||
Excel OSS
|
||||
</label>
|
||||
</div>
|
||||
{/ifmodule}
|
||||
|
||||
{if class_exists('PhpOffice\PhpSpreadsheet\Spreadsheet')}
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="excel" checked id="oF0"/>
|
||||
<label for="oF0">Excel</label>
|
||||
</div>
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="excelWithItems" id="oF0withItems"/>
|
||||
<label for="oF0withItems">Excel s položkami</label>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="csv" id="oF2"/>
|
||||
<label for="oF2">
|
||||
CSV
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="csv_premier" id="oF2a"/>
|
||||
<label for="oF2a">
|
||||
CSV Premier
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="txt_premier" id="oF6a"/>
|
||||
<label for="oF6a">
|
||||
TXT Premier
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="dbf" id="oF3"/>
|
||||
<label for="oF3">
|
||||
DBF
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="dbf_ucto" id="oF3u"/>
|
||||
<label for="oF3u">
|
||||
DBF Ucto
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="overview" id="oF4"/>
|
||||
<label for="oF4">
|
||||
Přehled
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="invoice" id="oF5"/>
|
||||
<label for="oF5">
|
||||
Faktury
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="money" id="moneyXML"/>
|
||||
<label for="moneyXML">
|
||||
Money XML
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="money_foreign" id="moneyXMLForeign"/>
|
||||
<label for="moneyXMLForeign">
|
||||
Money XML s cizími měnami
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="money_s4s5" id="money_s4s5"/>
|
||||
<label for="money_s4s5">
|
||||
Money XML S4/S5
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="flexibee" id="FlexibeeXML"/>
|
||||
<label for="FlexibeeXML">
|
||||
Flexibee XML
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="radio">
|
||||
{block formats}
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="pohoda" id="oF6"/>
|
||||
<label for="oF6">
|
||||
Pohoda XML
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="pohoda_with_items" id="oF7"/>
|
||||
<label for="oF7">
|
||||
Pohoda XML s položkami
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="format" value="csv_helios" id="oF8"/>
|
||||
<label for="oF8">
|
||||
Helios CSV
|
||||
</label>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row bottom-space">
|
||||
<div class="col-lg-1 col-md-2 control-label right">
|
||||
<label>Kódování</label>
|
||||
</div>
|
||||
<div class="col-lg-11 col-md-10">
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="coding" value="utf-8" checked id="ok1"/>
|
||||
<label for="ok1">
|
||||
UTF-8
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="coding" value="cp1250" id="ok2"/>
|
||||
<label for="ok2">
|
||||
WIN-1250 / LATIN 2
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio radio-inline">
|
||||
<input type="radio" class="check" name="coding" value="852" id="ok3"/>
|
||||
<label for="ok3">
|
||||
852 / DOS Latin 2
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-2 col-md-offset-5">
|
||||
<input type="hidden" name="type" value="orders">
|
||||
<button type="submit" class="btn btn-primary btn-block" name="Submit" value="Exportovat" data-submit-loading data-request-recieved-loading>
|
||||
Exportovat
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
64
admin/templates/board/export_products.tpl
Normal file
64
admin/templates/board/export_products.tpl
Normal file
@@ -0,0 +1,64 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h1 class="h4 main-panel-title">Export produktů</h1>
|
||||
{* TODO: Vrať mě zpátky na POST, jakmile bunny opraví bug s bufferováním POST requestů *}
|
||||
<form name="form_orders" method="GET" action="launch.php">
|
||||
<input type="hidden" name="s" value="board.php">
|
||||
<input type="hidden" name="type" value="export_products">
|
||||
{include "block.productsFilter.tpl" saveFilter=true filterName='flapExportProducts'}
|
||||
|
||||
{ifmodule PRODUCTS_PARAMETERS}
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 control-label">
|
||||
<label>Exportovat parametry</label>
|
||||
</div>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
{print_toggle nameRaw='options[exportParameters]' value=1}
|
||||
</div>
|
||||
</div>
|
||||
{/ifmodule}
|
||||
|
||||
{ifmodule STORES}
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 control-label">
|
||||
<label>Exportovat sklady</label>
|
||||
</div>
|
||||
<div class="col-lg-10 col-md-10">
|
||||
{print_toggle nameRaw='options[exportStoresInStore]' value=1}
|
||||
</div>
|
||||
</div>
|
||||
{/ifmodule}
|
||||
|
||||
{ifmodule PRICELISTS}
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-2 control-label">
|
||||
<label>Exportovat ceny z ceníku</label>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-4">
|
||||
<select name="options[exportPricelists][]" class="selecter" multiple="multiple"
|
||||
data-autocomplete="priceLists" data-preload="priceLists"
|
||||
data-placeholder="{'defaultPriceList'|translate:'productsFilter'}">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/ifmodule}
|
||||
|
||||
{block "custom-options"}{/block}
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-5">
|
||||
<input name="Submit" value="Exportovat" type="hidden">
|
||||
<button type="submit" class="btn btn-primary" data-submit-loading data-request-recieved-loading>Exportovat</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div></div>
|
||||
</div></div>
|
||||
{/block}
|
||||
30
admin/templates/board/export_selling_products.tpl
Normal file
30
admin/templates/board/export_selling_products.tpl
Normal file
@@ -0,0 +1,30 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h1 class="h4 main-panel-title">Export prodejnosti produktů</h1>
|
||||
{* TODO: Vrať mě zpátky na POST, jakmile bunny opraví bug s bufferováním POST requestů *}
|
||||
<form name="form_best_selling_products" method="GET" action="launch.php">
|
||||
<input type="hidden" name="s" value="board.php" />
|
||||
<input type="hidden" name="type" value="export_selling_products" />
|
||||
{include "block.productsFilter.tpl" filterInputName='productsFilter' saveFilter=true}
|
||||
{insert_orders_filter filterName='orderFilterExportSellingProducts' filter=['date_created' => ['from' => {$smarty.now|date_format:"d.m.Y"}, 'to' => {$smarty.now|date_format:"d.m.Y"}]] saveFilter=true}
|
||||
|
||||
{block "additional-filter"}
|
||||
{/block}
|
||||
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-5">
|
||||
<input type="submit" class="btn btn-primary" name="Submit" value="Exportovat" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div></div>
|
||||
</div></div>
|
||||
{/block}
|
||||
27
admin/templates/board/export_users.tpl
Normal file
27
admin/templates/board/export_users.tpl
Normal file
@@ -0,0 +1,27 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h1 class="h4 main-panel-title">Export uživatelů</h1>
|
||||
{* TODO: Vrať mě zpátky na POST, jakmile bunny opraví bug s bufferováním POST requestů *}
|
||||
<form name="form_orders" method="GET" action="launch.php">
|
||||
<input type="hidden" name="s" value="board.php" />
|
||||
<input type="hidden" name="type" value="export_users" />
|
||||
{block "export-filter"}
|
||||
{insert_users_filter saveFilter=true filterName='flapExportUsers'}
|
||||
{/block}
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-5">
|
||||
<input type="submit" class="btn btn-primary" name="Submit" value="Exportovat" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div></div>
|
||||
</div></div>
|
||||
{/block}
|
||||
351
admin/templates/board/index.tpl
Normal file
351
admin/templates/board/index.tpl
Normal file
@@ -0,0 +1,351 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "css-entry" append}
|
||||
{encore_entry_link_tags entry='board' build='admin'}
|
||||
{/block}
|
||||
|
||||
{block "content"}
|
||||
<div class="board-main">
|
||||
<div class="board-left">
|
||||
<h1>{'adminTitle'|translate}</h1>
|
||||
|
||||
<div data-infopanel-wrapper></div>
|
||||
{* <div class="alert alert-redesign">
|
||||
<span class="bi bi-info-circle-fill"></span>
|
||||
<p><strong>{'adminRedesignTitle'|translate}</strong> {'adminRedesignText'|translate}</p>
|
||||
</div>*}
|
||||
|
||||
{block "custom-content"}{/block}
|
||||
{if {find_right name="MAIN_STAT"}}
|
||||
<div class="row bottom-space index-stats">
|
||||
<div class="col-lg-2 col-md-4 col-sm-6">
|
||||
<div class="well">
|
||||
<span class="fc icons_stats"></span>
|
||||
<div>
|
||||
<p>{'revenue'|translate}</p>
|
||||
<h3>{$stats.today_price|format_price}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-4 col-sm-6">
|
||||
<div class="well">
|
||||
<span class="fc icons_date"></span>
|
||||
<div>
|
||||
<p>{'todayOrders'|translate}</p>
|
||||
<h3>{$stats.today_orders}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-4 col-sm-6">
|
||||
<div class="well">
|
||||
<span class="fc icons_list"></span>
|
||||
<div>
|
||||
<p>{'openOrders'|translate}</p>
|
||||
<h3>{$stats.unfinished_orders}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-4 col-sm-6">
|
||||
<div class="well">
|
||||
<span class="fc icons_folder"></span>
|
||||
<div>
|
||||
<p>{'productsStats'|translate nofilter}</p>
|
||||
<h3>{$stats.total_products}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4 col-md-8 col-sm-12">
|
||||
<div class="well">
|
||||
<span class="fc icons_alert"></span>
|
||||
<h3>{'events'|translate}</h3>
|
||||
{if {find_right name="ACTIVITY_LOG_SHOW"}}
|
||||
<div class="events">
|
||||
{if $stats.errors_critical}
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=reportActivities', 'launch.php?s=list.php&type=reportActivities&filter[severity]=error&acn=resetErrorDate')"
|
||||
class="event event-critical"><span
|
||||
class="fc icons_danger"></span> {$stats.errors_critical} {'critical'|translate}</a>
|
||||
{/if}
|
||||
{if $stats.errors_recommendation}
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=reportActivities', 'launch.php?s=list.php&type=reportActivities&filter[severity]=recommendation&filter[dateFrom]={strtotime('yesterday')|date_format:"%Y-%m-%d"}')"
|
||||
class="event event-recommended"><span class="fc icons_info"></span>{$stats.errors_recommendation}
|
||||
{'recommendations'|translate}</a>
|
||||
{/if}
|
||||
|
||||
{$admin = getAdminUser()}
|
||||
|
||||
{if $admin['date_check_error']}
|
||||
{$date_reset = strtotime($admin['date_check_error'])|date_format:"%Y-%m-%d %H:%m:%S"}
|
||||
{else}
|
||||
{$date_reset = strtotime('yesterday')|date_format:"%Y-%m-%d"}
|
||||
{/if}
|
||||
|
||||
{if $stats.errors_sync}
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=reportActivities', 'launch.php?s=list.php&type=reportActivities&filter[type]=sync&filter[severity]=error&filter[dateFrom]={$date_reset}')"
|
||||
class="event event-sync"><span class="fc icons_sync"></span>{$stats.errors_sync} {'sync'|translate}</a>
|
||||
{/if}
|
||||
{if !$stats.errors_critical and !$stats.errors_recommendation and !$stats.errors_sync}
|
||||
<span class="m-l-2">{'noEvents'|translate}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row bottom-space">
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-2 icon">
|
||||
<span class="glyphicon glyphicon-folder-close"></span>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<h3>{'items'|translate}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{if findRight('PROD_')}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=products', 'launch.php?s=list.php&type=products')"
|
||||
class="btn btn-block btn-primary">{'products'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if {find_right name="SEC_ADD"} || {find_right name="SEC_EDIT"} || {find_right name="SEC_ERASE"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=sections', 'launch.php?s=list.php&type=sections')"
|
||||
class="btn btn-block">{'sections'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if {find_right name="PRODCR"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=producers', 'launch.php?s=list.php&type=producers')"
|
||||
class="btn btn-block">{'producers'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-2 icon">
|
||||
<span class="glyphicon glyphicon glyphicon-shopping-cart"></span>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<h3>{'orders'|translate}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{if {find_right name="ORDER_ADD"} || {find_right name="ORDER_EDIT"} || {find_right name="ORDER_ERASE"} || {find_right name="ORDER_READ"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=orders', 'launch.php?s=list.php&type=orders')"
|
||||
class="btn btn-block btn-primary">{'orders'|translate}</a>
|
||||
</div>
|
||||
{if {find_right name="ORDER_ADD"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nw('orders', 0, 'flap_next=3')"
|
||||
class="btn btn-block">{'newOrder'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if {find_right name="USR_ADD"} || {find_right name="USR_EDIT"} || {find_right name="USR_ERASE"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=users', 'launch.php?s=list.php&type=users')"
|
||||
class="btn btn-block">{'users'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-2 icon">
|
||||
<span class="glyphicon glyphicon-picture"></span>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<h3>{'content'|translate}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{if findModule('sliders') and {find_right name="SLIDERS"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=sliders', 'launch.php?s=list.php&type=sliders')"
|
||||
class="btn btn-block">{'banners'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if findModule('articles') and {find_right name="ART_EDIT"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=articles', 'launch.php?s=list.php&type=articles')"
|
||||
class="btn btn-block">{'articles'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if findModule('html_pages') and {find_right name="HTML_EDIT"}}
|
||||
<div class="col-md-4 col-sm-4">
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=pages', 'launch.php?s=list.php&type=pages')"
|
||||
class="btn btn-block">{'pages'|translate}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h4 class="has-icon"><span class="fc icons_phone"></span><span>{'customerCare'|translate}</span></h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-3 col-xs-12">
|
||||
<a href="https://napoveda.wpjshop.cz/" class="btn btn-light btn-lg btn-block" target="_blank"
|
||||
rel="noreferrer">
|
||||
<span class="fc icons_help"></span>
|
||||
{'helpSite'|translate}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-3 col-xs-12">
|
||||
<a href="https://trello.com/b/Ps4RTFMx/kupshop-roadmap-live" class="btn btn-light btn-lg btn-block"
|
||||
target="_blank" rel="noreferrer">
|
||||
<span class="fc icons_roadmap"></span>
|
||||
{'roadmap'|translate}
|
||||
</a>
|
||||
</div>
|
||||
{if {find_right name="CLIENT_SECTION"}}
|
||||
<div class="col-sm-6 col-md-3 col-xs-12">
|
||||
<a href="{$links.klient}" class="btn btn-light btn-lg btn-block" target="_blank" rel="noreferrer">
|
||||
<span class="fc icons_users"></span>
|
||||
{'clientSection'|translate}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-sm-6 col-md-3 col-xs-12">
|
||||
<div class="nl-login-wrapper">
|
||||
<a href="https://trello.com/b/Ps4RTFMx/kupshop-roadmap-live" class="btn btn-light btn-lg btn-block"
|
||||
target="_blank" rel="noreferrer">
|
||||
</a>
|
||||
<p>
|
||||
<span class="fc icons_message"></span>
|
||||
<span>
|
||||
<strong>{'nlHistory'|translate}</strong>
|
||||
<a href="https://www.wpj.cz/prihlaseni-k-newsletteru/" target="_blank" rel="noreferrer">({'nlSignup'|translate})</a>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xs-12 customer-care">
|
||||
<img src="/admin/static/images/patrik-jakl.jpg" alt="" loading="lazy" width="77" height="77">
|
||||
<div class="d-flex">
|
||||
<p><span class="h4">Patrik Jakl</span><br>
|
||||
<span class="text-muted">{'support'|translate}</span>
|
||||
</p>
|
||||
|
||||
<p>498 100 222 <a href="mailto:wpj@wpj.cz" target="_parent">wpj@wpj.cz</a><br>
|
||||
<span class="text-muted">Po–Pá: 8:00–16:00</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-12 customer-care">
|
||||
<img src="/admin/static/images/nonstop-dohled.jpg" alt="" loading="lazy" width="77" height="77">
|
||||
<div class="d-flex">
|
||||
<p><span class="h4">{'supportNonstop'|translate}</span><br>
|
||||
<span class="text-muted">
|
||||
{'supportNonstopText'|translate}
|
||||
<a class="help-tip" data-toggle="tooltip" title="" data-original-title="{'supportNonstopTooltip'|translate}">
|
||||
<i class="bi bi-info-circle"></i>
|
||||
</a>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>775 134 686<br>
|
||||
<span class="text-muted">Po–Pá: 16:00–8:00</span><br>
|
||||
<span class="text-muted">So-Ne: nonstop</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{* <div class="col-md-6 col-xs-12 customer-care">
|
||||
<img src="/admin/static/images/zakaznicka-verka.jpg" alt="" loading="lazy">
|
||||
<div class="d-flex">
|
||||
<p class="h4 d-flex">Věra Štemberová</p>
|
||||
|
||||
<p>498 100 222 <a href="mailto:wpj@wpj.cz" target="_parent">wpj@wpj.cz</a><br>
|
||||
<span class="text-muted">Po–Pá: 8:00–16:00</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>*}
|
||||
{*<div class="col-md-6 col-xs-12 customer-care">
|
||||
<img src="/admin/static/images/zakaznicka-pepe.jpg" alt="" loading="lazy">
|
||||
<div class="d-flex">
|
||||
<p><span class="h4">Josef Špiroch</span><br>
|
||||
<span class="text-muted">{'manager'|translate}</span>
|
||||
</p>
|
||||
|
||||
<p><a href="mailto:spiroch@wpj.cz" target="_parent">spiroch@wpj.cz</a></p>
|
||||
</div>
|
||||
</div>*}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-xs-12">
|
||||
<div class="panel panel-default index-changelog">
|
||||
<div class="panel-body" id="changelog" {if $deploy_time}data-deploytime="{$deploy_time}"{/if}>
|
||||
<h4 class="has-icon">
|
||||
<span class="fc icons_update"></span>
|
||||
<span>{'lastChanges'|translate}</span>
|
||||
<span class="changes-count" data-changes-count>
|
||||
<span class="fc icons_alert"></span>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=changelog');"><span data-count></span></a>
|
||||
</span>
|
||||
|
||||
<button class="btn btn-light" data-nav="prev" disabled><span class="fc icons_caret-left"></span></button>
|
||||
<button class="btn btn-light" data-nav="next"><span class="fc icons_caret-right"></span></button>
|
||||
</h4>
|
||||
<div class="slides">
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=changelog');" class="btn">Changelog</a>
|
||||
<div class="slides-inner" data-template></div>
|
||||
</div>
|
||||
|
||||
<script id="changelogTemplate" type="text/x-dot-template">
|
||||
{literal}
|
||||
{{? it.length > 0}}
|
||||
{{~it :item :index}}
|
||||
<div data-slide="{{= index + 1 }}" class="{{? index==0 }}active{{?}} {{? new Date('{/literal}{$changelog_time}{literal}') < new Date(item.date) }}changed{{?}}">
|
||||
<div class="descr">
|
||||
<h5 data-title>{{= item.title}}</h5>
|
||||
{{= item.descr || ""}}
|
||||
</div>
|
||||
<div class="news-footer">
|
||||
<span class="date">{{= new Date(item.date)).toLocaleString('cs-CZ', {day: 'numeric', month: 'long'} }}</span>
|
||||
<span class="type type-{{= item.type[0].toLowerCase() }}">{{= item.type }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{~}}
|
||||
{{?}}
|
||||
{/literal}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "js-onready" append}
|
||||
{encore_entry_script_tags entry='board' build='admin'}
|
||||
{/block}
|
||||
157
admin/templates/board/usersImport.tpl
Normal file
157
admin/templates/board/usersImport.tpl
Normal file
@@ -0,0 +1,157 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container">
|
||||
{if $errs || $info}
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
{if $info['test'] == 1}
|
||||
Test importu uživatelů.
|
||||
<br/>
|
||||
Počet přidaných:{$info['added']}.
|
||||
{else}
|
||||
Uživatelé importováni.
|
||||
<br/>
|
||||
Počet importovaných: {$info['added']}
|
||||
{/if}
|
||||
<br/>
|
||||
|
||||
{if count($errs) > 0}
|
||||
Vyskytlo se {count($errs)} chyb:
|
||||
<br/>
|
||||
{else}
|
||||
Nevyskytly se žádné chyby.
|
||||
{/if}
|
||||
<br/><br/>
|
||||
|
||||
{foreach $errs as $row => $err}
|
||||
řádek: {$row} chyba: {$err}
|
||||
<br/>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $added_users}
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
|
||||
<h4>Načtení uživatelé</h4>
|
||||
|
||||
<div style="overflow: auto; width: 100%;">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10%;">Jméno</th>
|
||||
<th style="width: 10%;">Přijmení</th>
|
||||
<th style="width: 10%;">Společnost</th>
|
||||
<th style="width: 10%;">Email</th>
|
||||
<th style="width: 10%;">Telefon</th>
|
||||
<th style="width: 10%;">Ulice</th>
|
||||
<th style="width: 10%;">Město</th>
|
||||
<th style="width: 10%;">PSČ</th>
|
||||
<th style="width: 10%;">Stát / region</th>
|
||||
<th style="width: 10%;">Země</th>
|
||||
<th style="width: 10%;">Skupiny</th>
|
||||
<th style="width: 10%;">Newsletter</th>
|
||||
<th style="width: 10%;">IČO</th>
|
||||
<th style="width: 10%;">DIČ</th>
|
||||
<th style="width: 10%;">Dodací jméno</th>
|
||||
<th style="width: 10%;">Dodací příjmení</th>
|
||||
<th style="width: 10%;">Dodací společnost</th>
|
||||
<th style="width: 10%;">Dodací ulice</th>
|
||||
<th style="width: 10%;">Dodací město</th>
|
||||
<th style="width: 10%;">Dodací PSČ</th>
|
||||
<th style="width: 10%;">Dodací stát / region</th>
|
||||
<th style="width: 10%;">Dodací země</th>
|
||||
<th style="width: 10%;">Cenová hladina</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $added_users as $user}
|
||||
<tr>
|
||||
<td>{$user.name}</td>
|
||||
<td>{$user.surname}</td>
|
||||
<td>{$user.firm}</td>
|
||||
<td>{$user.email}</td>
|
||||
<td>{$user.phone}</td>
|
||||
<td>{$user.street}</td>
|
||||
<td>{$user.city}</td>
|
||||
<td>{$user.zip}</td>
|
||||
<td>{$user.state}</td>
|
||||
<td>{$user.country}</td>
|
||||
<td>{foreach $user.groups as $group}{$group} {/foreach}</td>
|
||||
<td>{$user.get_news}</td>
|
||||
<td>{$user.ico}</td>
|
||||
<td>{$user.dic}</td>
|
||||
<td>{$user.delivery_name}</td>
|
||||
<td>{$user.delivery_surname}</td>
|
||||
<td>{$user.delivery_firm}</td>
|
||||
<td>{$user.delivery_street}</td>
|
||||
<td>{$user.delivery_city}</td>
|
||||
<td>{$user.delivery_zip}</td>
|
||||
<td>{$user.delivery_state}</td>
|
||||
<td>{$user.delivery_country}</td>
|
||||
<td>{$user.price_level}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<a href="" class="btn btn-primary btn-block">Zpět</a>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<div class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h4>Import uživatelů</h4>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Nápověda</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>Rady a tipy pro import uživatelů můžete získat v naší
|
||||
<a target="_blank" href="http://www.napoveda.wpj.cz/kupshop/uzivatele/import-uzivatelu/">nápovědě</a>.</p>
|
||||
<strong><a href="/admin/static/files/users_import.xls">Vzorový excel soubor</a></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row bottom-space">
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label"><label>Importovaný Excel soubor</label></div>
|
||||
<div class="col-md-5">
|
||||
<input type="file" class="filestyle" name="file" data-iconName="glyphicon-folder-open"
|
||||
data-buttonText="Vybrat soubor"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bottom-space">
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label"><label>Neodesílat potvzení o odběru novinek a potvrdit odběr</label></div>
|
||||
<div class="col-md-5">
|
||||
<div class="checkbox">
|
||||
<input id="newsletter_confirm" class="check" type="checkbox" name="newsletter_confirm" value="1"/>
|
||||
<label for="newsletter_confirm"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 col-md-offset-8">
|
||||
<input type="submit" name="Try" class="btn btn-primary btn-block" value="Vyzkoušet">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="submit" name="Execute" class="btn btn-primary btn-block" value="Importovat">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
23
admin/templates/board/usersUnsubscribe.tpl
Normal file
23
admin/templates/board/usersUnsubscribe.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="container">
|
||||
<form action="" method="post" enctype="multipart/form-data" class="panel panel-default first">
|
||||
<div class="panel-body">
|
||||
<h4>Hromadné ohlášení uživatelů z newsletteru</h4>
|
||||
|
||||
<p class="m-b-2">Vložte seznam emailů pro hromadné odhlášení z newsletteru.<br>
|
||||
Každý email na samostatný řádek nebo emaily oddělte čárkami,středníky nebo mezerami.
|
||||
</p>
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" rows="10" name="emails" placeholder="test@email.cz, test@seznam.cz"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<input type="submit" name="Execute" class="btn btn-primary" value="Importovat">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
24
admin/templates/delivery/delivery.DPDPickup.customData.tpl
Normal file
24
admin/templates/delivery/delivery.DPDPickup.customData.tpl
Normal file
@@ -0,0 +1,24 @@
|
||||
<h1 class="h4 main-panel-title">{'flapDeliveryOthers'|translate}</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="wpj-form-group">
|
||||
<label>
|
||||
{'widgetHiddenPoints'|translate}
|
||||
<a class="help-tip" data-toggle="tooltip" title="" data-original-title="{'widgetHiddenPointsTooltip'|translate}">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</a>
|
||||
</label>
|
||||
|
||||
{$points = ['box' => 'Výdejní Box']}
|
||||
|
||||
<select class="selecter" multiple name="data[custom_data][widget_options][hidden_points][]">
|
||||
{foreach $points as $key => $value}
|
||||
<option value="{$key}" {if in_array($key, $body.data.custom_data.widget_options.hidden_points)}selected{/if}>
|
||||
{$value}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
<h1 class="h4 main-panel-title">{'flapDeliveryOthers'|translate}</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="wpj-form-group">
|
||||
<label>
|
||||
{'widgetHiddenPoints'|translate}
|
||||
<a class="help-tip" data-toggle="tooltip" title="" data-original-title="{'widgetHiddenPointsTooltip'|translate}">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</a>
|
||||
</label>
|
||||
|
||||
{$points = ['AlzaBox' => 'AlzaBox', 'ParcelBox' => 'ParcelBox', 'ParcelShop' => 'Parcelshop']}
|
||||
|
||||
<select class="selecter" multiple name="data[custom_data][widget_options][hidden_points][]">
|
||||
{foreach $points as $key => $value}
|
||||
<option value="{$key}" {if in_array($key, $body.data.custom_data.widget_options.hidden_points)}selected{/if}>
|
||||
{$value}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
5
admin/templates/delivery/deliveryOpeningHours.tpl
Normal file
5
admin/templates/delivery/deliveryOpeningHours.tpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{block "delivery-opening-hours"}
|
||||
<h1 class="h4 main-panel-title">{'openingHours'|translate}</h1>
|
||||
<p>{'openingHoursNote'|translate}</p>
|
||||
{include 'block.openingHours.tpl'}
|
||||
{/block}
|
||||
16
admin/templates/delivery/settings.Zasilkovna.tpl
Normal file
16
admin/templates/delivery/settings.Zasilkovna.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<h1 class="h4 main-panel-title">{'flapDeliveryOthers'|translate}</h1>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2">
|
||||
<label for="widget-options">{'widgetOptions'|translate}</label>
|
||||
<a class="help-tip" data-toggle="tooltip" title="" data-original-title="{'widgetOptionsTooltip'|translate}">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<textarea id="widget-options" rows="10" class="form-control" name="data[custom_data][widget_options]">{if $body.data.custom_data.widget_options}{$body.data.custom_data.widget_options|json_encode:JSON_PRETTY_PRINT}{/if}</textarea>
|
||||
<span class="help-block">
|
||||
{'widgetOptionsLinkText'|translate} <a href="https://configurator.widget.packeta.com/cs" target="_blank">{'widgetOptionsLinkLabel'|translate}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
96
admin/templates/email/base_admin.tpl
Normal file
96
admin/templates/email/base_admin.tpl
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<style type="text/css">
|
||||
* {
|
||||
margin: 0;padding: 0;border:0px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
color:#000;
|
||||
font-size:16px;
|
||||
text-align:left;
|
||||
}
|
||||
a:link {
|
||||
color: #000000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:visited {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
p{
|
||||
line-height:26px;
|
||||
padding:2px 5px;
|
||||
font-size:12px;
|
||||
}
|
||||
.cleaner {
|
||||
clear:both;
|
||||
padding:0;
|
||||
margin:0;
|
||||
background:none;
|
||||
}
|
||||
/*************************** MAIN LAYOUT *****************************/
|
||||
#page{
|
||||
width:697px;
|
||||
border:1px solid #bfdfe9;
|
||||
border-radius:3px;
|
||||
padding:23px 34px 26px;
|
||||
margin:30px 30px 5px;
|
||||
background: #fff;
|
||||
-moz-box-shadow : 0 1px 3px #bfdfe9;
|
||||
-webkit-box-shadow: 0 1px 3px #bfdfe9;
|
||||
box-shadow: 0 1px 3px #bfdfe9;
|
||||
}
|
||||
h1{
|
||||
font-weight:100;
|
||||
font-size:18px;
|
||||
padding:0;
|
||||
margin-bottom:10px;
|
||||
font-size:24px;
|
||||
}
|
||||
h2{
|
||||
font-weight:100;
|
||||
font-size:22px;
|
||||
color:#3590ad;
|
||||
padding:0px 0px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
p#footer{
|
||||
width:697px;
|
||||
margin:0 75px;
|
||||
color:#78bbd1;
|
||||
font-size:12px;
|
||||
text-align:right;
|
||||
}
|
||||
p#footer a{
|
||||
color:#78bbd1;
|
||||
}
|
||||
hr{
|
||||
border-top:2px dashed #8ed6ed;
|
||||
margin:5px 0px 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="page">
|
||||
<div class="content">
|
||||
{block "content"}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
<p id="footer">
|
||||
{$dbcfg.shop_title}
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
164
admin/templates/email/base_admin_pretty.tpl
Normal file
164
admin/templates/email/base_admin_pretty.tpl
Normal file
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="supported-color-schemes" content="light dark">
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #006CE5;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #006CE5;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #006CE5;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#content table,
|
||||
#content p {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
#content p {
|
||||
margin: 7px 0;
|
||||
}
|
||||
|
||||
#content table a,
|
||||
#content p a {
|
||||
color: #006CE5;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.label-severity {
|
||||
display: block;
|
||||
min-width: 120px;
|
||||
color: #fefefe !important;
|
||||
text-transform: uppercase;
|
||||
padding: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
.label-severity-success {
|
||||
background: #b9eb83;
|
||||
}
|
||||
.label-severity-error {
|
||||
background: #eeb1b4;
|
||||
}
|
||||
.label-severity-warning {
|
||||
background: #ffd56d;
|
||||
}
|
||||
.label-severity-notice,
|
||||
.label-severity-recommendation {
|
||||
background: #95beff;
|
||||
}
|
||||
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
u ~ .label-severity {
|
||||
color: #fefefe !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 544px) {
|
||||
#content {
|
||||
padding: 12px 18px !important;
|
||||
}
|
||||
|
||||
#report_activities {
|
||||
padding: 20px 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.label-severity {
|
||||
color: #fefefe !important;
|
||||
}
|
||||
}
|
||||
|
||||
[data-ogsb] .label-severity,
|
||||
[data-ogsc] .label-severity {
|
||||
color: #fefefe !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#f7f6f6" style="background-color: #f7f6f6;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f7f6f6" style="background-color: #f7f6f6;">
|
||||
<tr>
|
||||
<td style="padding-top: 20px;">
|
||||
<div align="center"><!-- centruje se v obklopující 100% tabulce -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%!important;max-width: 680px!important; padding-top:10px;background-color: #f7f6f6;" bgcolor="#ffffff" class="wrapper">
|
||||
<tr>
|
||||
<td style="padding: 30px 50px 20px;text-align: center;" id="logo-wrapper" align="left">
|
||||
{svgToBase64 url="/admin/static/images/logo-white-bg.svg" assign='base64Logo'}
|
||||
<img src="{if $base64Logo}{$base64Logo}{else}{static_url url="/admin/static/images/logo-white-bg.svg" absolute=1}{/if}" alt="wpjshop" width="100" style="border:0;display: block;margin: 0 auto;text-align: center;" class="img-responsive logo"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f7f6f6" style="background-color: #f7f6f6;">
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"><!-- centruje se v obklopující 100% tabulce -->
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%!important;max-width: 680px!important; padding-top:10px;background-color: #ffffff" bgcolor="#ffffff" class="wrapper">
|
||||
|
||||
<tr>
|
||||
<td align="left" style="text-align: left; padding: 30px 50px;" id="content">
|
||||
{block "content"}
|
||||
{/block}
|
||||
|
||||
{block email_bye}
|
||||
{if $body.footer}
|
||||
{$body.footer nofilter}
|
||||
{else}
|
||||
<p class="bye" style="text-align: center;">
|
||||
Tento e-mail dostáváte na základě nastavení notifikací z Activity logu.<br>Nastavení můžete v administraci e-shopu.
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#f7f6f6" style="background-color: #f7f6f6">
|
||||
<tr>
|
||||
<td style="padding-bottom: 20px;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
48
admin/templates/email/email_activity_log_notifications.tpl
Normal file
48
admin/templates/email/email_activity_log_notifications.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
<table style="width: 100%">
|
||||
{$report_activities = $report_notification.report_activities}
|
||||
{$notification = $report_notification.notification}
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Nové události v Activity logu</strong><br>
|
||||
na e-shopu {ldelim}WEB_NAZEV{rdelim}
|
||||
</td>
|
||||
<td style="text-align: right;" align="right">
|
||||
{if $notification.last_notifications}od {$notification.last_notifications|format_date:'d.m.Y H:i:s'}<br>{/if}
|
||||
{if $notification.last_sync}do {$notification.last_sync|format_date:'d.m.Y H:i:s'}{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 50px 0;" id="report_activities">
|
||||
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
|
||||
{foreach $report_activities as $report_activity}
|
||||
<tr>
|
||||
<td style="padding: 15px 0; border-bottom: 1px solid #bac0c9;" valign="top">
|
||||
Typ: {$report_activity.type}, {$report_activity.date|format_date:'d.m.Y H:i:s'}
|
||||
<p><strong>{$report_activity.report}</strong></p>
|
||||
<a target="_blank" href="{$report_activity.url}">Zobrazit v administraci</a>
|
||||
</td>
|
||||
<td align="right" valign="top" style="padding: 15px 0; text-align: right; border-bottom: 1px solid #bac0c9;">
|
||||
<span class="label-severity label-severity-{$report_activity.severity_index}">
|
||||
{$report_activity.severity}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{if $notification.note}
|
||||
<tr>
|
||||
<td colspan="2" style="padding-top: 15px;">
|
||||
<strong>Instrukce</strong><br>
|
||||
{$notification.note|nl2br nofilter}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,5 @@
|
||||
{extends "email/base_admin_pretty.tpl"}
|
||||
|
||||
{block "content"}
|
||||
{ldelim}NOTIFIKACE{rdelim}
|
||||
{/block}
|
||||
7
admin/templates/email/email_basic_template.tpl
Normal file
7
admin/templates/email/email_basic_template.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
<p>Vážený zákazníku,</p>
|
||||
|
||||
<p>{ldelim}EMAIL{rdelim}</p>
|
||||
|
||||
<p>S pozdravem</p>
|
||||
|
||||
<p>{ldelim}WEB{rdelim}</p>
|
||||
3
admin/templates/email/email_bonus_points_activated.tpl
Normal file
3
admin/templates/email/email_bonus_points_activated.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>máme pro vás dobrou zprávu. Právě jsme vám na účet připsali <strong>{ldelim}POCET_BODU{rdelim}</strong> bodů,
|
||||
které jste získali za objednávku <strong>{ldelim}KOD{rdelim}</strong>.
|
||||
Body jsou platné {ldelim}PLATNOST_BODU{rdelim} dnů. Nezapomeňte je uplatnit ve své příští objednávce.</p>
|
||||
3
admin/templates/email/email_bonus_points_expiry.tpl
Normal file
3
admin/templates/email/email_bonus_points_expiry.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>věrnostní body, které jste nasbírali při nákupech v našem e-shopu, brzy vyprší. Nenechte si ujít možnost je využít a získat tak slevu na své oblíbené produkty!</p>
|
||||
<p><strong>Kolik bodů jste nasbírali?</strong> Na svém účtu máte ještě {ldelim}BODY_CELKEM{rdelim} věrnostních bodů, které jsou platné do {ldelim}DATUM_EXPIRACE_BODU{rdelim}. Po tomto datu bohužel propadnou.</p>
|
||||
<p><strong>Jak využít věrnostní body?</strong> Je to jednoduché! Stačí navštívit náš e-shop, přihlásit se do svého účtu a v košíku uplatnit věrnostní body jako slevu na nákup.</p>
|
||||
1
admin/templates/email/email_bonus_program_coupon.tpl
Normal file
1
admin/templates/email/email_bonus_program_coupon.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<p>svůj dárkový poukaz si můžete stáhnout <a href="{ldelim}ODKAZ_POUKAZ{rdelim}">zde</a>.</p>
|
||||
1
admin/templates/email/email_gdpr_user_data.tpl
Normal file
1
admin/templates/email/email_gdpr_user_data.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<p>na základě Vaší žádosti Vám v příloze posíláme kompletní export dat uživatele <strong>{ldelim}EMAIL{rdelim}</strong> z e-shopu <strong><a href="{ldelim}WEB{rdelim}">{ldelim}WEB_NAZEV{rdelim}</a></strong></p>
|
||||
2
admin/templates/email/email_late_package.tpl
Normal file
2
admin/templates/email/email_late_package.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>omlouváme se, ale Váš balíček s objednávkou <strong>{ldelim}KOD{rdelim}</strong> jsme zatím nemohli odeslat. Děkujeme za trpělivost.</p>
|
||||
<p>Více informací naleznete na <a href="{ldelim}ODKAZ{rdelim}">detailu objednávky</a>.</p>
|
||||
21
admin/templates/email/email_newsletter_subscribe.tpl
Normal file
21
admin/templates/email/email_newsletter_subscribe.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
<p>{t}je to Váš e-mail?{/t}</p>
|
||||
<p>{t}Dřív, než Vám pošleme první newsletter, potvrďte nám kliknutím na odkaz, že jsme skutečně napsali na Váš e-mail.{/t}</p>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 20px 0;">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td style="padding: 12px 20px 12px 20px; border: 2px solid #1089e6;" align="center" class="btn">
|
||||
<a href="{ldelim}OVEROVACI_ADRESA{rdelim}" style="font-size: 14px; font-family: Arial, Helvetica, sans-serif; font-weight: 700; text-decoration: none;
|
||||
letter-spacing: 0.08em; display: inline-block; text-transform: uppercase;">Potvrdit odběr novinek</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>{t escape="false"}Potvrzením odběru souhlasíte se zpracováním osobních údajů za účelem nabízení a
|
||||
zpracování marketingových nabídek. Více informací naleznete na stránce <a href="{url s=page label='privacy_policy' absolute=true}">Zásady zpracování osobních údajů</a>.{/t}</p>
|
||||
<p>{t}Odběr newsletteru je možné kdykoliv zrušit.{/t}</p>
|
||||
<p>{t}Odkaz je platný jeden den. Pokud jste o odběr newsletteru nepožádali, můžete tuto zprávu ignorovat.{/t}</p>
|
||||
3
admin/templates/email/email_order_change.tpl
Normal file
3
admin/templates/email/email_order_change.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>aktuální stav Vaší objednávky <strong>{ldelim}KOD{rdelim}</strong> se změnil na <strong>{ldelim}STAV{rdelim}</strong>.</p>
|
||||
<p>{ldelim}KOMENTAR{rdelim}</p>
|
||||
|
||||
1
admin/templates/email/email_order_comment.tpl
Normal file
1
admin/templates/email/email_order_comment.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<p>{ldelim}KOMENTAR{rdelim}</p>
|
||||
6
admin/templates/email/email_order_create.tpl
Normal file
6
admin/templates/email/email_order_create.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
<p>{t}děkujeme za Vaši objednávku {/t}<strong>{ldelim}KOD{rdelim}</strong>. {t}Vaši objednávku co nejrychleji připravíme k expedici.{/t}</p>
|
||||
<p>{ldelim}POPIS_PLATBY{rdelim}</p>
|
||||
<p><strong>{t}Jaké zboží se Vám u nás zalíbilo?{/t}</strong><br/>
|
||||
{ldelim}POLOZKY_OBJEDNAVKY{rdelim}
|
||||
</p>
|
||||
<p>{t escape="false"}Zajímá Vás celý průběh objednávky? Podívejte se <a href="{ODKAZ}">na detail objednávky</a>.{/t}</p>
|
||||
4
admin/templates/email/email_order_create_admin.tpl
Normal file
4
admin/templates/email/email_order_create_admin.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
{ldelim}REKAPITULACE_OBCHODNIKOVI{rdelim}
|
||||
</div>
|
||||
|
||||
2
admin/templates/email/email_order_delivered.tpl
Normal file
2
admin/templates/email/email_order_delivered.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>stav Vaší objednávky číslo <strong>{ldelim}KOD{rdelim}</strong> byl změněn na <strong>{ldelim}STAV{rdelim}</strong>.</p>
|
||||
<p>Zásilka byla převzata.</p>
|
||||
2
admin/templates/email/email_order_generate_coupon.tpl
Normal file
2
admin/templates/email/email_order_generate_coupon.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>{t}posíláme Vám zakoupené dárkové poukazy. Poukaz udělá několikanásobnou radost, stačí ho stáhnout a vytisknout. Při nákupu zadejte v košíku kód uvedený na poukazu.{/t}</p>
|
||||
<p>{ldelim}POUKAZY{rdelim}</p>
|
||||
2
admin/templates/email/email_order_not_paid.tpl
Normal file
2
admin/templates/email/email_order_not_paid.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>Vaše objednávka <strong>{ldelim}KOD{rdelim}</strong> doposud nebyla uhrazena.</p>
|
||||
<p>Více informací naleznete na <a href="{ldelim}ODKAZ{rdelim}">detailu objednávky</a></p>
|
||||
3
admin/templates/email/email_order_storno.tpl
Normal file
3
admin/templates/email/email_order_storno.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>{t}stornovali jsme Vaši objednávku{/t} <strong>{ldelim}KOD{rdelim}</strong>.</p>
|
||||
<p>{ldelim}KOMENTAR{rdelim}</p>
|
||||
<p>{t}Nechcete objednávku stornovat? Napište nám, rádi zboží znovu připravíme k expedici.{/t}</p>
|
||||
12
admin/templates/email/email_password_reset.tpl
Normal file
12
admin/templates/email/email_password_reset.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
<p>{t}kliknutím na odkaz si můžete vytvořit nové heslo pro přístup ke svému účtu na e-shopu{/t} <strong><a href="{ldelim}WEB{rdelim}">{ldelim}WEB_NAZEV{rdelim}</a></strong>.</p>
|
||||
|
||||
<table align="center" cellpadding="0" cellspacing="0" style="margin: 15px auto;">
|
||||
<tr>
|
||||
<td align="center" height="40">
|
||||
<a href="{ldelim}POTVRZOVACI_ADRESA{rdelim}">Změna hesla</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p>{t}Nežádali jste o změnu hesla? Pak tento e-mail ignorujte. Odkaz platí pouze jeden den.{/t}</p>
|
||||
15
admin/templates/email/email_password_reset_admin.tpl
Normal file
15
admin/templates/email/email_password_reset_admin.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
<p>{t}děkujeme za Vaši registraci na e-shopu{/t} <strong><a href="{ldelim}WEB{rdelim}">{ldelim}WEB_NAZEV{rdelim}</a></strong> {t}a těšíme se na spolupráci.{/t}</p>
|
||||
<p>{t}Dokončete svou registraci kliknutím na odkaz níže a vytvořte si své heslo.{/t}</p>
|
||||
|
||||
<table align="center" cellpadding="0" cellspacing="0" style="margin: 15px auto;">
|
||||
<tr>
|
||||
<td align="center" height="40">
|
||||
<a href="{ldelim}ODKAZ_ZMENA_HESLA{rdelim}">Změna hesla</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>{t}Odkaz je platný pouze jeden den.{/t}</p>
|
||||
|
||||
<p>{t}Nezapomeňte, že jsme tu pro Vás, takže se na nás můžete kdykoliv obrátit.{/t}</p>
|
||||
|
||||
2
admin/templates/email/email_review_response.tpl
Normal file
2
admin/templates/email/email_review_response.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>děkujeme za čas, který jste věnovali poskytnutí recenze na produkt z našeho e-shopu. K Vašemu hodnocení právě přibyla reakce:</p>
|
||||
<p>{ldelim}ODPOVED_HODNOCENI{rdelim}</p>
|
||||
3
admin/templates/email/email_user_register.tpl
Normal file
3
admin/templates/email/email_user_register.tpl
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>{t}jsme rádi, že jste se u nás registrovali.{/t}</p>
|
||||
<p>{t}Do svého účtu se přihlásíte pod jménem{/t} <strong>{ldelim}EMAIL_UZIVATELE{rdelim}</strong>. {t}Heslo jste si zvolili při registraci.{/t}</p>
|
||||
<p>{t}Nezapomeňte, že jsme tu pro Vás, a můžete se na nás kdykoliv obrátit.{/t}</p>
|
||||
2
admin/templates/email/email_waiting_package.tpl
Normal file
2
admin/templates/email/email_waiting_package.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>dostala se k nám informace, že Váš balíček s objednávkou <strong>{ldelim}KOD{rdelim}</strong> čeká na to, až si ho vyzvednete od dopravce. S převzetím, prosíme, neotálejte.</p>
|
||||
<p>Více informací naleznete na <a href="{ldelim}ODKAZ{rdelim}">detailu objednávky</a>.</p>
|
||||
9
admin/templates/email/languageCheck.tpl
Normal file
9
admin/templates/email/languageCheck.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{extends 'email/base_admin.tpl'}
|
||||
{block "content"}
|
||||
<h1>Nové překldady z {$cfg.Addr.print}</h1>
|
||||
{foreach $vypis as $key => $vys}
|
||||
{if $key != "acn"}
|
||||
$txt_str['{str_replace("/","']['",$key)}']='{$vys}'<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
259
admin/templates/email/orderShopkeeper.tpl
Normal file
259
admin/templates/email/orderShopkeeper.tpl
Normal file
@@ -0,0 +1,259 @@
|
||||
<style type="text/css" media="all">
|
||||
{block "style"}
|
||||
hr {
|
||||
margin: 3px 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.print-footer {
|
||||
text-align: center;
|
||||
color: grey;
|
||||
margin: auto;
|
||||
padding-top: 5px;
|
||||
font-size: 11px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.print {
|
||||
width: 675px;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 10px;
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
padding: 3px 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 3px 3px 3px 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.print-main-content .print-main-content-left {
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding-right: 5%;
|
||||
}
|
||||
|
||||
.print-main-content .print-main-content-right {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.print-main-content-notes {
|
||||
width: 50%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.print-column-50 {
|
||||
float: left;
|
||||
width: 50%;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.print-main-content td {
|
||||
font-size: 12px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.print-main-content th {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
background-color: #CCCCCC;
|
||||
padding: 2px;
|
||||
border: 1px solid #999999;
|
||||
}
|
||||
|
||||
.pricebox {
|
||||
border-collapse: collapse;
|
||||
width: 200px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.pricebox td {
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
{/block}
|
||||
</style>
|
||||
|
||||
<div class="print">
|
||||
<h1>Byla přijata objednávka <a href="{admin_url type='order' ID=$order->id absolute=1}">{$order->order_no}</a></h1>
|
||||
|
||||
<div class="print-main-content">
|
||||
{block "order-info"}
|
||||
<div class="print-main-content-left">
|
||||
<h2>Zákazník:</h2>
|
||||
<hr/>
|
||||
<div class="print-column-50">
|
||||
<h3>{$order.invoice_name} {$order.invoice_surname} <br/> {$order.invoice_firm}</h3>
|
||||
</div>
|
||||
<div class="print-column-50">
|
||||
<p>
|
||||
{$order.invoice_street} <br/>
|
||||
{$order.invoice_zip} {$order.invoice_city}<br/>
|
||||
{$order.invoice_country}
|
||||
</p>
|
||||
</div>
|
||||
<div class="print-column-50">
|
||||
<p>
|
||||
<strong>Telefon:</strong> {$order.invoice_phone}<br/>
|
||||
<strong>Email:</strong> {$order.invoice_email}
|
||||
</p>
|
||||
</div>
|
||||
<div class="print-column-50">
|
||||
<p>
|
||||
<strong>IČO:</strong> {$order.invoice_ico}<br/>
|
||||
<strong>DIČ:</strong> {$order.invoice_dic}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="print-main-content-right">
|
||||
<h2>Dodací údaje:</h2>
|
||||
<hr/>
|
||||
<div class="print-column-50">
|
||||
<h3>{$order.delivery_name} {$order.delivery_surname} <br/> {$order.delivery_firm}</h3>
|
||||
</div>
|
||||
<div class="print-column-50">
|
||||
<p>
|
||||
{$order.delivery_street} <br/>
|
||||
{$order.delivery_zip} {$order.delivery_city}<br/>
|
||||
{$order.delivery_country}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2>Způsob doručení:</h2>
|
||||
<hr/>
|
||||
<p>
|
||||
{$order.delivery_type}
|
||||
{$deliveryData = $order->getData('delivery_data')}
|
||||
{$deliveryType = $order->getDeliveryType()}
|
||||
{if $deliveryData && $deliveryType}
|
||||
<br>
|
||||
{$deliveryType->getDelivery()->printDeliveryInfo() nofilter}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
{$tmp = $order->fetchNotes()}
|
||||
<div class="print-main-content-notes">
|
||||
{if $order.note_user != "" }
|
||||
<h2>Poznámka zákazníka:</h2>
|
||||
<hr/>
|
||||
<p>{$order.note_user} </p>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "items-table"}
|
||||
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="pieces">
|
||||
<tr>
|
||||
<th width="3%">Ks</th>
|
||||
<th>Produkt</th>
|
||||
<th width="5%">Kód</th>
|
||||
{if $dbcfg.prod_subtract_from_store == "Y"}
|
||||
<th colspan="3" style="text-align: right;" width="5%">Pohyb skladu</th>
|
||||
{/if}
|
||||
<th style="text-align: right;" width="10%">Cena</th>
|
||||
</tr>
|
||||
|
||||
{$totalPieces = 0}
|
||||
{$tmp = $order->fetchItems()}
|
||||
{$order->fetchItemsSuppliers()}
|
||||
{foreach $order.items as $item}
|
||||
{if $item.note['item_type'] != 'delivery'}
|
||||
{$totalPieces = $totalPieces + $item.pieces}
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<td align="center">{$item.pieces}</td>
|
||||
<td align="left">
|
||||
{block "product-title"}
|
||||
{if $item.id_product}
|
||||
<a href="{url s='redir' type='product' id=$item.id_product absolute="1"}">{$item.descr}</a>
|
||||
{else}
|
||||
{$item.descr}
|
||||
{/if}
|
||||
{if $item.note} <br>{if !empty($item.product) && method_exists($item.product, 'printNote')}({$item.product->printNote($item.note)}){/if}{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td align="center">
|
||||
{$item.code}{if !$item.code}{$item.ean}{/if}
|
||||
</td>
|
||||
|
||||
{if $dbcfg.prod_subtract_from_store == "Y"}
|
||||
<td width="1" style="text-align: right;white-space: nowrap;padding-left: 5px;"><b>{floatval($item.in_store) + $item.pieces}</b></td>
|
||||
<td width="1" style="white-space: nowrap">-></td>
|
||||
<td width="1" style="text-align: right;white-space: nowrap;padding-left: 0;">
|
||||
{strip}
|
||||
<b>{$item.in_store}</b>
|
||||
{if {$item.id_product} && ({find_module name="products_suppliers"} || {find_module name="orders_of_suppliers"})}
|
||||
<a href="{admin_url type='stockInOrder' IDp=$item.id_product IDv=$item.id_variation absolute=1}">
|
||||
{foreach from=$item.suppliers item=supplier key=key}
|
||||
/
|
||||
<span title="{$supplier.name} - {$supplier.code}">
|
||||
{$supplier.in_store}
|
||||
</span>
|
||||
{/foreach}
|
||||
</a>
|
||||
{/if}
|
||||
{/strip}
|
||||
</td>
|
||||
{/if}
|
||||
<td align="right" style="white-space: nowrap">
|
||||
{$item.total_price.value_with_vat_no_rounding|format_price:"ceil=no;decimal=dynamic"}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/block}
|
||||
|
||||
{block "price-box"}
|
||||
<table class="pricebox">
|
||||
{if $totalPieces}
|
||||
<tr>
|
||||
<td class="final-left" align="left">Kusů celkem</td>
|
||||
<td class="final-right" align="right">{$totalPieces}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
<tr>
|
||||
<td class="final-left" align="left">Cena celkem</td>
|
||||
<td class="final-right" align="right">{$order.total_price_array.value_with_vat_no_rounding|format_price:"ceil=no"}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
<div class="print-footer">
|
||||
{block "footer"}
|
||||
<p>Váš wpjshop.cz</p>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
1
admin/templates/email/payment_success.tpl
Normal file
1
admin/templates/email/payment_success.tpl
Normal file
@@ -0,0 +1 @@
|
||||
<p>{t}děkujeme za úhradu Vaší objednávky{/t} <strong>{ldelim}KOD{rdelim}</strong>.</p>
|
||||
2
admin/templates/email/watchdog.tpl
Normal file
2
admin/templates/email/watchdog.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
<p>zboží, které jste si nechali hlídat, si nyní můžete objednat:</p>
|
||||
<div>{ldelim}PRODUKTY{rdelim}</div>
|
||||
63
admin/templates/export/order.WinShop.tpl
Normal file
63
admin/templates/export/order.WinShop.tpl
Normal file
@@ -0,0 +1,63 @@
|
||||
{$deliveries = [
|
||||
2 => '7040001',
|
||||
4 => '7040002',
|
||||
3 => '7040003',
|
||||
5 => '7040004']}
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WinShopData>
|
||||
<ObjPrij>
|
||||
<Doklad>{$order->order_no}</Doklad>
|
||||
<Poznamka>{$order->note_user}</Poznamka>
|
||||
{$date = explode(' ', $order->date_created)}
|
||||
<Vystaveno>{$date[0]}</Vystaveno>
|
||||
<Vyridit_do></Vyridit_do>
|
||||
<DodOdb>
|
||||
<Id></Id>
|
||||
<FaktNazev>{$order->invoice_name} {$order->invoice_surname}</FaktNazev>
|
||||
<ICO>{$order->invoice_ico}</ICO>
|
||||
<DIC>{$order->invoice_dic}</DIC>
|
||||
<Telefon>{$order->invoice_phone}</Telefon>
|
||||
<Email>{$order->invoice_email}</Email>
|
||||
<Zastupce></Zastupce>
|
||||
<ObchNazev>{$order->invoice_firm}</ObchNazev>
|
||||
<ObchAdresa>
|
||||
<Ulice>{$order->delivery_street}</Ulice>
|
||||
<Misto>{$order->delivery_city}</Misto>
|
||||
<PSC>{$order->delivery_zip}</PSC>
|
||||
<Stat>{$order->delivery_country}</Stat>
|
||||
</ObchAdresa>
|
||||
<FaktAdresa>
|
||||
<Ulice>{$order->invoice_street}</Ulice>
|
||||
<Misto>{$order->invoice_city}</Misto>
|
||||
<PSC>{$order->invoice_zip}</PSC>
|
||||
<Stat>{$order->invoice_country}</Stat>
|
||||
</FaktAdresa>
|
||||
</DodOdb>
|
||||
{$parts = explode(' - ', $order->delivery_type)}{$parts}
|
||||
<PlatPodm>{$parts[0]}</PlatPodm>
|
||||
<Doprava>{$parts[1]}</Doprava>
|
||||
{foreach $order->items as $item}
|
||||
{if $item.code}
|
||||
<Polozka>
|
||||
<Kod_zbozi>{$item.code}</Kod_zbozi>
|
||||
<Popis>{$item.descr|xml_string}</Popis>
|
||||
<PocetMJ>{$item.pieces}</PocetMJ>
|
||||
<Cena>{$item.value_with_vat}</Cena>
|
||||
<Mena>CZK</Mena>
|
||||
<SazbaDPH>{$item.vat}</SazbaDPH>
|
||||
<Velikost>{$winshop->get_order_item_variation($item)}</Velikost>
|
||||
<Barva>-</Barva>
|
||||
</Polozka>
|
||||
{else}
|
||||
<Polozka>
|
||||
<Kod_zbozi>{$deliveries[$order->getDeliveryId()]}</Kod_zbozi>
|
||||
<Popis>{$item.descr|xml_string}</Popis>
|
||||
<PocetMJ>{$item.pieces}</PocetMJ>
|
||||
<Cena>{$item.value_with_vat}</Cena>
|
||||
<Mena>CZK</Mena>
|
||||
<SazbaDPH>{$item.vat}</SazbaDPH>
|
||||
</Polozka>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ObjPrij>
|
||||
</WinShopData>
|
||||
75
admin/templates/export/orders_csv.tpl
Normal file
75
admin/templates/export/orders_csv.tpl
Normal file
@@ -0,0 +1,75 @@
|
||||
{strip}{block header}
|
||||
"Datum vystaveni";
|
||||
"Datum zd. plnění";
|
||||
"Datum splatnosti";
|
||||
"Číslo faktury";
|
||||
"Měna";
|
||||
{foreach $vats as $vat => $value}
|
||||
"Zaklad DPH {$vat}%";
|
||||
"DPH {$vat}%";
|
||||
{/foreach}
|
||||
"Celkem";
|
||||
"Jméno";
|
||||
"Přijmení";
|
||||
"Firma";
|
||||
"IČO";
|
||||
"DIČ";
|
||||
"Ulice";
|
||||
"Město";
|
||||
"PSČ";
|
||||
"Stát";
|
||||
"Telefon";
|
||||
"Email";
|
||||
"Zaokrouhlení";
|
||||
"Doprava";
|
||||
"Platba";
|
||||
"Číslo balíku";
|
||||
"Stav";
|
||||
"Příznaky";{/block}{/strip}
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}{strip}
|
||||
{block body}
|
||||
"{$order.date_handle->format('Y-m-d')}";
|
||||
"{$order.date_handle->format('Y-m-d')}";
|
||||
"{$order.date_handle->modify("+{$dbcfg->shop_due_days} days")->format('Y-m-d')}";
|
||||
"{$order.order_no}";
|
||||
"{$order.currency}";
|
||||
{$totalPrice = toDecimal(0)}
|
||||
{foreach $vats as $vat_value => $value}
|
||||
{$vat = $order.vats[$vat_value]}
|
||||
{if $vat}
|
||||
"{$vat.total_price_without_vat->printFloatValue(2)}";
|
||||
"{$vat.total_price_without_vat->mul(toDecimal($vat_value/100))->printFloatValue(2)}";
|
||||
|
||||
{$totalPrice = $totalPrice->add(toDecimal($vat.total_price_without_vat->printFloatValue(2)))}
|
||||
{$totalPrice = $totalPrice->add(toDecimal($vat.total_price_without_vat->mul(toDecimal($vat_value/100))->printFloatValue(2)))}
|
||||
{else}
|
||||
"0";
|
||||
"0";
|
||||
{/if}
|
||||
{/foreach}
|
||||
"{$order.total_price->printFloatValue(2)}";
|
||||
"{$order.invoice_name}";
|
||||
"{$order.invoice_surname}";
|
||||
"{$order.invoice_firm}";
|
||||
"{$order.invoice_ico}";
|
||||
"{$order.invoice_dic}";
|
||||
"{$order.invoice_street}";
|
||||
"{$order.invoice_city}";
|
||||
"{$order.invoice_zip}";
|
||||
"{$order.invoice_country}";
|
||||
"{$order.invoice_phone}";
|
||||
"{$order.invoice_email}";
|
||||
"{$order.total_price->sub($totalPrice)}";
|
||||
{if empty($order->delivery_type)}
|
||||
"";
|
||||
"";
|
||||
{else}
|
||||
"{$order->getDeliveryType()->delivery}";
|
||||
"{$order->getDeliveryType()->payment}";
|
||||
{/if}
|
||||
"{$order.package_id}";
|
||||
{if $order.status_storno}"{$cfg.Order.Status.storno[$order.status_storno]}";
|
||||
{else}"{$cfg.Order.Status.global[$order.status]}";{/if}
|
||||
"{$order.flags}";{/block}{/strip}
|
||||
{if $order@iteration is div by 100}{flush nocache}{/if}
|
||||
{/foreach}
|
||||
59
admin/templates/export/orders_csv_helios.tpl
Normal file
59
admin/templates/export/orders_csv_helios.tpl
Normal file
@@ -0,0 +1,59 @@
|
||||
{strip}{block header}
|
||||
DruhPohybuZbo;
|
||||
RadaDokladu;
|
||||
SkupZbo;
|
||||
RegCis;
|
||||
Mnozstvi;
|
||||
VstupniCena;
|
||||
IDHlavicky;
|
||||
ICO;
|
||||
CisloOrg;
|
||||
DatPorizeni;
|
||||
DatPovinnostiFa;
|
||||
DUZP;
|
||||
Splatnost;
|
||||
SazbaDPHPol;
|
||||
DodFak;
|
||||
ParovaciZnak;
|
||||
Mena;
|
||||
Cena;
|
||||
DPHZadanaRucne;
|
||||
FormaUhrady;{/block}{/strip}
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}{if !$order.flags|strstr:"K" and $order.status_storno == 0 }
|
||||
{$vats = $order.vats}{if count($vats) == 1}{$vatValue = reset(array_keys($vats))}{else}{$vatValue = 21}{/if}
|
||||
{strip}
|
||||
{block body}
|
||||
13;
|
||||
201;
|
||||
100;
|
||||
60401;
|
||||
1;
|
||||
2;
|
||||
{$order.order_no};
|
||||
{if $order.invoice_ico != ''}
|
||||
{$order.invoice_ico};
|
||||
0;
|
||||
{else}
|
||||
;
|
||||
1;
|
||||
{/if}
|
||||
{$order.date_created->format('d.m.Y H:i')};
|
||||
{$order.date_created->format('d.m.Y')};
|
||||
{$order.date_created->format('d.m.Y')};
|
||||
{$order.date_created->modify('+30 day')->format('d.m.Y')};
|
||||
{$vatValue};
|
||||
{$order.order_no};
|
||||
{$order.order_no};
|
||||
{$order.currency};
|
||||
{$vat = $order.vats[$vatValue]}
|
||||
{if $vat}
|
||||
{$vat.total_price_without_vat->printFloatValue(2)};
|
||||
{($vat.total_price_with_vat->printFloatValue(2) - $vat.total_price_without_vat->printFloatValue(2))};
|
||||
{else}
|
||||
0;
|
||||
0;
|
||||
{/if}
|
||||
{setlocale(LC_ALL, 'czech')}
|
||||
{iconv("utf-8", "us-ascii//TRANSLIT", $order->getDeliveryType()->payment)}{/block}{/strip}
|
||||
{/if}
|
||||
{/foreach}
|
||||
21
admin/templates/export/orders_csv_premier.tpl
Normal file
21
admin/templates/export/orders_csv_premier.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}{block body}OB_IN;{$order.order_no};DATUM_VYS;{if $order.date_accept}$order.date_accept->format('d.m.Y')}{/if};0
|
||||
OB_IN;{$order.order_no};DATUM_SPL;{$order.date_handle->modify("+{$dbcfg->shop_due_days} days")->format('d.m.Y')};0
|
||||
OB_IN;{$order.order_no};NAZEV_ODB;{$order.invoice_firm};0
|
||||
OB_IN;{$order.order_no};ICO_ODB;{$order.invoice_ico};0
|
||||
OB_IN;{$order.order_no};ULICE_ODB;{$order.invoice_street};0
|
||||
OB_IN;{$order.order_no};PSC_ODB;{$order.invoice_zip};0
|
||||
OB_IN;{$order.order_no};MESTO_ODB;{$order.invoice_city};0
|
||||
OB_IN;{$order.order_no};STAT_ODB;{$order.invoice_country};0
|
||||
OB_IN;{$order.order_no};PRIJ_ODB;{$order.invoice_name} {$order.invoice_surname};0
|
||||
OB_IN;{$order.order_no};MOB_ODB;{$order.invoice_phone};0
|
||||
OB_IN;{$order.order_no};EMAIL_ODB;{$order.invoice_email};0
|
||||
OB_IN;{$order.order_no};MENA;{$order.currency};0
|
||||
OB_IN;{$order.order_no};KURS;{$order.currency_rate};0
|
||||
{foreach $order.items as $item}
|
||||
POL_OBIN;{$order.order_no};SCISLO;{$item.code};{$item@iteration}
|
||||
POL_OBIN;{$order.order_no};VYKON;{if !$item.code}{$item.descr}{/if};{$item@iteration}
|
||||
POL_OBIN;{$order.order_no};MNOZSTVI;{$item.pieces};{$item@iteration}
|
||||
POL_OBIN;{$order.order_no};CENA_MJ;{$item.piece_price.value_without_vat->printFloatValue(2)};{$item@iteration}
|
||||
POL_OBIN;{$order.order_no};KOD_DPH;{$item.piece_price.vat};{$item@iteration}
|
||||
POL_OBIN;{$order.order_no};SAZBA_DPH;{$item.piece_price.vat};{$item@iteration}
|
||||
{/foreach}{/block}{/foreach}
|
||||
68
admin/templates/export/orders_flexibee.tpl
Normal file
68
admin/templates/export/orders_flexibee.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<winstrom atomic="false" source="dativery-shoptet-flexibee" version="1.0">
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}
|
||||
<faktura-vydana>
|
||||
<id>code:{$order.order_no}</id>
|
||||
<kod>{$order.order_no}</kod>
|
||||
<varSym>{$order.order_no}</varSym>
|
||||
<cisObj>{$order.order_no}</cisObj>
|
||||
<typDokl>code:FAKTURA</typDokl>
|
||||
<datVyst>{$order->date_handle|date_format:'Y-m-d'}</datVyst>
|
||||
<duzpPuv>{$order->date_handle|date_format:'Y-m-d'}</duzpPuv>
|
||||
<duzpUcto>{$order->date_handle|date_format:'Y-m-d'}</duzpUcto>
|
||||
<datSplat>{$order->date_handle->add(DateInterval::createFromDateString($dbcfg.shop_due_days|cat:" days"))|date_format:'Y-m-d'}</datSplat>
|
||||
{if $order.currency != 'CZK'}
|
||||
<mena>code:{$order.currency}</mena>
|
||||
<kurz>{$order.currency_rate}</kurz>
|
||||
{/if}
|
||||
{block "payment"}{if (mb_strcut($order->getDeliveryType()->payment|upper,0,20) != null)}
|
||||
<formaUhradyCis>code:{mb_strcut($order->getDeliveryType()->payment|upper,0,20)}</formaUhradyCis>{/if}{/block}
|
||||
{block "delivery"}{if (mb_strcut($order->getDeliveryType()->delivery|upper,0,20) != null)}
|
||||
<formaDopravy>code:{mb_strcut($order->getDeliveryType()->delivery|upper,0,20) != null}</formaDopravy>{/if}{/block}
|
||||
<nazFirmy>{if empty($order.invoice_firm)}{$order.invoice_name} {$order.invoice_surname}{else}{$order.invoice_firm}{/if}</nazFirmy>
|
||||
<ulice>{$order.invoice_street}</ulice>
|
||||
<mesto>{$order.invoice_city}</mesto>
|
||||
<psc>{$order.invoice_zip}</psc>
|
||||
<stat>code:{if empty($order.invoice_country)}CZ{else}{$order.invoice_country}{/if}</stat>
|
||||
<ic>{if !empty($order.invoice_ico)}{$order.invoice_ico}{/if}</ic>
|
||||
<dic>{if !empty($order.invoice_dic)}{if strpos($order.invoice_dic, ' ')}{str_replace(' ','',$order.invoice_dic)}{else}{$order.invoice_dic}{/if}{/if}</dic>
|
||||
<zaokrNaSumK>zaokrNa.zadne</zaokrNaSumK>
|
||||
<zaokrNaDphK>zaokrNa.zadne</zaokrNaDphK>
|
||||
<bezPolozek>false</bezPolozek>
|
||||
<polozkyDokladu removeAll="true">
|
||||
{foreach $order->fetchItems() as $key => $item}
|
||||
<faktura-vydana-polozka>
|
||||
<id>ext:KUPSHOP:{$order.order_no}:{$item.id}</id>
|
||||
<nazev>{$item.descr}</nazev>
|
||||
<kod>{$item.code}</kod>
|
||||
<mnozMj>{$item.pieces}</mnozMj>
|
||||
<cenaMj>{$item.piece_price.value_without_vat->printFloatValue(2)}</cenaMj>
|
||||
{if $order.currency == 'CZK'}
|
||||
<sumZkl>{$item.total_price.value_without_vat->printFloatValue(2)}</sumZkl>
|
||||
<sumDph>{$item.total_price.value_vat->printFloatValue(2)}</sumDph>
|
||||
{else}
|
||||
<sumZklMen>{$item.total_price.value_without_vat->printFloatValue(2)}</sumZklMen>
|
||||
<sumDphMen>{$item.total_price.value_vat->printFloatValue(2)}</sumDphMen>
|
||||
{/if}
|
||||
<mj>code:KS</mj>
|
||||
<typSzbDphK>typSzbDph.{strip}{switch $item.vat}
|
||||
{case '21'}dphZakl{/case}
|
||||
{case '12'}dphSniz{/case}
|
||||
{case '0'}dphOsv{/case}
|
||||
{default}dphZakl{/switch}{/strip}</typSzbDphK>
|
||||
<typCenyDphK>typCeny.bezDph</typCenyDphK>
|
||||
{if $item.discount > 0}
|
||||
<slevaPol>{$item.discount}</slevaPol>
|
||||
{/if}
|
||||
</faktura-vydana-polozka>
|
||||
{/foreach}
|
||||
</polozkyDokladu>
|
||||
</faktura-vydana>
|
||||
{if $order.status_storno}
|
||||
<faktura-vydana action="storno">
|
||||
<id>code:{$order.order_no}</id>
|
||||
<kod>{$order.order_no}</kod>
|
||||
</faktura-vydana>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</winstrom>
|
||||
123
admin/templates/export/orders_money.tpl
Normal file
123
admin/templates/export/orders_money.tpl
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MoneyData description="faktury přijaté a vydané" ExpZkratka="_FP+FV" VyberZaznamu="0">
|
||||
<SeznamFaktVyd>
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}
|
||||
<FaktVyd>
|
||||
<Doklad>{$order.order_no}</Doklad>
|
||||
<Popis>wpjshop faktura {$order.order_no}</Popis>{block dates}
|
||||
<Vystaveno>{$order->date_handle|date_format:'Y-m-d'}</Vystaveno>
|
||||
<DatUcPr>{$order->date_handle|date_format:'Y-m-d'}</DatUcPr>
|
||||
<PlnenoDPH>{$order->date_handle|date_format:'Y-m-d'}</PlnenoDPH>
|
||||
<Uhrazeno>{$order->date_handle|date_format:'Y-m-d'}</Uhrazeno>
|
||||
<DatSkPoh>{$order->date_handle|date_format:'Y-m-d'}</DatSkPoh>
|
||||
<Splatno>{$order->date_handle->add(DateInterval::createFromDateString($dbcfg.shop_due_days|cat:" days"))|date_format:'Y-m-d'}</Splatno>{/block}
|
||||
<KonstSym>{$order.order_no}</KonstSym>
|
||||
<KodDPH>TUZ</KodDPH>
|
||||
<ZjednD>0</ZjednD>
|
||||
<VarSymbol>{$order.order_no}</VarSymbol>
|
||||
<Ucet>KOMB</Ucet>
|
||||
<Druh>N</Druh>
|
||||
<Dobropis>0</Dobropis>
|
||||
<Uhrada>{strip}
|
||||
{switch Admin\Export::getOrderPayment($order)}
|
||||
{case 'COD'}na dobírku{/case}
|
||||
{case 'CASH'}Hotově{/case}
|
||||
{case 'TRANSFER'}převodem{/case}
|
||||
{default}na dobírku{/switch}{/strip}</Uhrada>
|
||||
<PredKontac>PRODEJ</PredKontac>
|
||||
<SazbaDPH1>15</SazbaDPH1>
|
||||
<SazbaDPH2>21</SazbaDPH2>
|
||||
<Proplatit>0</Proplatit>
|
||||
<Vyuctovano>0</Vyuctovano>
|
||||
<SouhrnDPH>
|
||||
<Zaklad0>{if $order->vats[0]}{$order->vats[0].tax.value_with_vat->printFloatValue(2)}{else}0{/if}</Zaklad0>
|
||||
<Zaklad5>{if $order->vats[15]}{$order->vats[15].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad5>
|
||||
<Zaklad22>{if $order->vats[21]}{$order->vats[21].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad22>
|
||||
<DPH5>{if $order->vats[15]}{$order->vats[15].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH5>
|
||||
<DPH22>{if $order->vats[21]}{$order->vats[21].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH22>
|
||||
</SouhrnDPH>
|
||||
<Celkem>{$order.total_price}</Celkem>
|
||||
<PriUhrZbyv>0</PriUhrZbyv>
|
||||
<ValutyProp>0</ValutyProp>
|
||||
<SumZaloha>0</SumZaloha>
|
||||
<SumZalohaC>0</SumZalohaC>
|
||||
<DodOdb>
|
||||
<ObchNazev>{if empty($order.invoice_firm)}{$order.invoice_name} {$order.invoice_surname}{else}{$order.invoice_firm}{/if}</ObchNazev>
|
||||
<ObchAdresa>
|
||||
<Ulice>{$order.invoice_street}</Ulice>
|
||||
<Misto>{$order.invoice_city}</Misto>
|
||||
<PSC>{$order.invoice_zip}</PSC>
|
||||
<KodStatu>{$order.invoice_country}</KodStatu>
|
||||
</ObchAdresa>
|
||||
<FaktNazev>{if empty($order.invoice_firm)}{$order.invoice_name} {$order.invoice_surname}{else}{$order.invoice_firm}{/if}</FaktNazev>
|
||||
<ICO>{$order.invoice_ico}</ICO>
|
||||
<DIC>{$order.invoice_dic}</DIC>
|
||||
<FaktAdresa>
|
||||
<Ulice>{$order.invoice_street}</Ulice>
|
||||
<Misto>{$order.invoice_city}</Misto>
|
||||
<PSC>{$order.invoice_zip}</PSC>
|
||||
<KodStatu>{$order.invoice_country}</KodStatu>
|
||||
</FaktAdresa>
|
||||
<Nazev>{$order.invoice_name} {$order.invoice_surname}</Nazev>
|
||||
<Tel>
|
||||
<Cislo>{$order.invoice_phone}</Cislo>
|
||||
</Tel>
|
||||
<EMail>{$order.invoice_email}</EMail>
|
||||
<PlatceDPH>1</PlatceDPH>
|
||||
<FyzOsoba>0</FyzOsoba>
|
||||
</DodOdb>
|
||||
<KonecPrij>
|
||||
<Nazev>{if empty($order.delivery_firm)}{$order.delivery_name} {$order.delivery_surname}{else}{$order.delivery_firm}{/if}</Nazev>
|
||||
<Adresa>
|
||||
<Ulice>{$order.delivery_street}</Ulice>
|
||||
<Misto>{$order.delivery_city}</Misto>
|
||||
<PSC>{$order.delivery_zip}</PSC>
|
||||
<KodStatu>{$order.delivery_country}</KodStatu>
|
||||
</Adresa>
|
||||
<Tel>
|
||||
<Cislo>{$order.invoice_phone}</Cislo>
|
||||
</Tel>
|
||||
<EMail>{$order.invoice_email}</EMail>
|
||||
<ICO>{$order.invoice_ico}</ICO>
|
||||
<DIC>{$order.invoice_dic}</DIC>
|
||||
<PlatceDPH>1</PlatceDPH>
|
||||
<FyzOsoba>0</FyzOsoba>
|
||||
</KonecPrij>
|
||||
<DopravTuz>0</DopravTuz>
|
||||
<DopravZahr>0</DopravZahr>
|
||||
<Sleva>0</Sleva>
|
||||
<SeznamPolozek>
|
||||
{$index = 0}
|
||||
{foreach $order->fetchItems() as $key => $item}
|
||||
{$index = $index + 1}
|
||||
<Polozka>
|
||||
<Popis>{$item.descr}</Popis>
|
||||
<PocetMJ>{$item.pieces}</PocetMJ>
|
||||
<SazbaDPH>{$item.vat}</SazbaDPH>
|
||||
<Cena>{$item.piece_price.value_with_vat->printFloatValue(2)}</Cena>
|
||||
<SouhrnDPH>
|
||||
<Zaklad_MJ>{$item.piece_price.value_without_vat->asFloat()}</Zaklad_MJ>
|
||||
<DPH_MJ>{$item.piece_price.value_vat->asFloat()}</DPH_MJ>
|
||||
<Zaklad>{$item.piece_price.value_without_vat->printFloatValue(2)}</Zaklad>
|
||||
<DPH>{$item.piece_price.value_vat->printFloatValue(2)}</DPH>
|
||||
</SouhrnDPH>
|
||||
<CenaTyp>1</CenaTyp>
|
||||
<Poradi>{$index}</Poradi>
|
||||
<Valuty>0</Valuty>
|
||||
<NesklPolozka>
|
||||
<MJ>Ks</MJ>
|
||||
<Katalog>{$item.code}</Katalog>
|
||||
<Zaloha>0</Zaloha>
|
||||
<TypZarDoby>N</TypZarDoby>
|
||||
<ZarDoba>0</ZarDoba>
|
||||
<Protizapis>0</Protizapis>
|
||||
<BarCode>{$item.ean}</BarCode>
|
||||
<Hmotnost>0</Hmotnost>
|
||||
</NesklPolozka>
|
||||
</Polozka>
|
||||
{/foreach}
|
||||
</SeznamPolozek>
|
||||
</FaktVyd>
|
||||
{/foreach}
|
||||
</SeznamFaktVyd>
|
||||
</MoneyData>
|
||||
170
admin/templates/export/orders_money_foreign.tpl
Normal file
170
admin/templates/export/orders_money_foreign.tpl
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MoneyData description="faktury přijaté a vydané" ExpZkratka="_FP+FV" VyberZaznamu="0">
|
||||
<SeznamFaktVyd>
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}
|
||||
<FaktVyd>
|
||||
<Doklad>{$order.order_no}</Doklad>
|
||||
<Popis>wpjshop faktura {$order.order_no}</Popis>{block dates}
|
||||
<Vystaveno>{$order->date_handle|date_format:'Y-m-d'}</Vystaveno>
|
||||
<DatUcPr>{$order->date_handle|date_format:'Y-m-d'}</DatUcPr>
|
||||
<PlnenoDPH>{$order->date_handle|date_format:'Y-m-d'}</PlnenoDPH>
|
||||
<Uhrazeno>{$order->date_handle|date_format:'Y-m-d'}</Uhrazeno>
|
||||
<DatSkPoh>{$order->date_handle|date_format:'Y-m-d'}</DatSkPoh>
|
||||
<Splatno>{$order->date_handle->add(DateInterval::createFromDateString($dbcfg.shop_due_days|cat:" days"))|date_format:'Y-m-d'}</Splatno>{/block}
|
||||
<KonstSym>{$order.order_no}</KonstSym>
|
||||
<KodDPH>TUZ</KodDPH>
|
||||
<ZjednD>0</ZjednD>
|
||||
<VarSymbol>{$order.order_no}</VarSymbol>
|
||||
{$orderFlags = $order->getFlags()}{if $orderFlags['OSS']}<StatMOSS>{$order->delivery_country}</StatMOSS>{/if}
|
||||
<Ucet>KOMB</Ucet>
|
||||
<Druh>N</Druh>
|
||||
<Dobropis>0</Dobropis>
|
||||
<Uhrada>{strip}
|
||||
{switch Admin\Export::getOrderPayment($order)}
|
||||
{case 'COD'}na dobírku{/case}
|
||||
{case 'CASH'}Hotově{/case}
|
||||
{case 'TRANSFER'}převodem{/case}
|
||||
{default}na dobírku{/switch}{/strip}</Uhrada>
|
||||
<PredKontac>PRODEJ</PredKontac>
|
||||
{$zeroVat = false}
|
||||
{$lowVat = false}
|
||||
{$highVat = false}
|
||||
{if $order.currency == 'CZK'}
|
||||
<SazbaDPH1>15</SazbaDPH1>
|
||||
<SazbaDPH2>21</SazbaDPH2>
|
||||
<Proplatit>0</Proplatit>
|
||||
<Vyuctovano>0</Vyuctovano>
|
||||
<SouhrnDPH>
|
||||
<Zaklad0>{if $order->vats[0]}{$order->vats[0].tax.value_with_vat->printFloatValue(2)}{else}0{/if}</Zaklad0>
|
||||
<Zaklad5>{if $order->vats[15]}{$order->vats[15].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad5>
|
||||
<Zaklad22>{if $order->vats[21]}{$order->vats[21].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad22>
|
||||
<DPH5>{if $order->vats[15]}{$order->vats[15].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH5>
|
||||
<DPH22>{if $order->vats[21]}{$order->vats[21].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH22>
|
||||
{if array_merge(array_keys($order->vats), [15, 21, 0])|count > 3}
|
||||
<SeznamDalsiSazby>
|
||||
{foreach $order->vats as $vat => $value}
|
||||
{if !in_array($vat, [15, 21, 0])}
|
||||
<DalsiSazba>
|
||||
<Sazba>{$vat}</Sazba>
|
||||
<Zaklad>{$value.tax.value_without_vat->printFloatValue(2)}</Zaklad>
|
||||
<DPH>{$value.tax.value_vat->printFloatValue(2)}</DPH>
|
||||
</DalsiSazba>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</SeznamDalsiSazby>
|
||||
{/if}
|
||||
</SouhrnDPH>
|
||||
{else}
|
||||
{$vat_keys = $order->vats|array_keys}
|
||||
|
||||
{if $order->vats[0]}
|
||||
{$zeroVat = $vat_keys|array_shift}
|
||||
{/if}
|
||||
|
||||
{if $vat_keys|count == 2}
|
||||
{$lowVat = $vat_keys|array_shift}
|
||||
{$highVat = $vat_keys|array_shift}
|
||||
{elseif $vat_keys|count == 1}
|
||||
{$highVat = $vat_keys|array_pop}
|
||||
{/if}
|
||||
{if $lowVat}<SazbaDPH1>{$lowVat}</SazbaDPH1>{/if}
|
||||
{if $highVat}<SazbaDPH2>{$highVat}</SazbaDPH2>{/if}
|
||||
<Proplatit>0</Proplatit>
|
||||
<Vyuctovano>0</Vyuctovano>
|
||||
{/if}
|
||||
<Celkem>{$order.total_price}</Celkem>
|
||||
{if $order.currency != 'CZK'}
|
||||
<Valuty>
|
||||
<Mena>
|
||||
<Kod>{$order.currency}</Kod>
|
||||
<Mnozstvi>1</Mnozstvi>
|
||||
<Kurs>{$order.currency_rate}</Kurs>
|
||||
</Mena>
|
||||
<SouhrnDPH>
|
||||
<Zaklad0>{if $zeroVat !== false && $order->vats[$zeroVat]}{$order->vats[$zeroVat].tax.value_with_vat->printFloatValue(2)}{else}0{/if}</Zaklad0>
|
||||
<Zaklad5>{if $lowVat !== false && $order->vats[$lowVat]}{$order->vats[$lowVat].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad5>
|
||||
<Zaklad22>{if $highVat !== false && $order->vats[$highVat]}{$order->vats[$highVat].tax.value_without_vat->printFloatValue(2)}{else}0{/if}</Zaklad22>
|
||||
<DPH5>{if $lowVat !== false && $order->vats[$lowVat]}{$order->vats[$lowVat].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH5>
|
||||
<DPH22>{if $highVat !== false && $order->vats[$highVat]}{$order->vats[$highVat].tax.value_vat->printFloatValue(2)}{else}0{/if}</DPH22>
|
||||
</SouhrnDPH>
|
||||
<Celkem>{$order.total_price}</Celkem>
|
||||
</Valuty>
|
||||
{/if}
|
||||
<PriUhrZbyv>0</PriUhrZbyv>
|
||||
<ValutyProp>0</ValutyProp>
|
||||
<SumZaloha>0</SumZaloha>
|
||||
<SumZalohaC>0</SumZalohaC>
|
||||
<DodOdb>
|
||||
<ObchNazev>{if empty($order.invoice_firm)}{$order.invoice_name} {$order.invoice_surname}{else}{$order.invoice_firm}{/if}</ObchNazev>
|
||||
<ObchAdresa>
|
||||
<Ulice>{$order.invoice_street}</Ulice>
|
||||
<Misto>{$order.invoice_city}</Misto>
|
||||
<PSC>{$order.invoice_zip}</PSC>
|
||||
<KodStatu>{$order.invoice_country}</KodStatu>
|
||||
</ObchAdresa>
|
||||
<FaktNazev>{if empty($order.invoice_firm)}{$order.invoice_name} {$order.invoice_surname}{else}{$order.invoice_firm}{/if}</FaktNazev>
|
||||
<ICO>{$order.invoice_ico}</ICO>
|
||||
<DIC>{$order.invoice_dic}</DIC>
|
||||
<FaktAdresa>
|
||||
<Ulice>{$order.invoice_street}</Ulice>
|
||||
<Misto>{$order.invoice_city}</Misto>
|
||||
<PSC>{$order.invoice_zip}</PSC>
|
||||
<KodStatu>{$order.invoice_country}</KodStatu>
|
||||
</FaktAdresa>
|
||||
<Nazev>{$order.invoice_name} {$order.invoice_surname}</Nazev>
|
||||
<Tel>
|
||||
<Cislo>{$order.invoice_phone}</Cislo>
|
||||
</Tel>
|
||||
<EMail>{$order.invoice_email}</EMail>
|
||||
<PlatceDPH>1</PlatceDPH>
|
||||
<FyzOsoba>0</FyzOsoba>
|
||||
</DodOdb>
|
||||
<KonecPrij>
|
||||
<Nazev>{if empty($order.delivery_firm)}{$order.delivery_name} {$order.delivery_surname}{else}{$order.delivery_firm}{/if}</Nazev>
|
||||
<Adresa>
|
||||
<Ulice>{$order.delivery_street}</Ulice>
|
||||
<Misto>{$order.delivery_city}</Misto>
|
||||
<PSC>{$order.delivery_zip}</PSC>
|
||||
<KodStatu>{$order.delivery_country}</KodStatu>
|
||||
</Adresa>
|
||||
<Tel>
|
||||
<Cislo>{$order.invoice_phone}</Cislo>
|
||||
</Tel>
|
||||
<EMail>{$order.invoice_email}</EMail>
|
||||
<ICO>{$order.invoice_ico}</ICO>
|
||||
<DIC>{$order.invoice_dic}</DIC>
|
||||
<PlatceDPH>1</PlatceDPH>
|
||||
<FyzOsoba>0</FyzOsoba>
|
||||
</KonecPrij>
|
||||
<DopravTuz>0</DopravTuz>
|
||||
<DopravZahr>0</DopravZahr>
|
||||
<Sleva>0</Sleva>
|
||||
<SeznamPolozek>
|
||||
{$index = 0}
|
||||
{foreach $order->fetchItems() as $key => $item}
|
||||
{$index = $index + 1}
|
||||
<Polozka>
|
||||
<Popis>{$item.descr}</Popis>
|
||||
<PocetMJ>{$item.pieces}</PocetMJ>
|
||||
<SazbaDPH>{$item.vat}</SazbaDPH>
|
||||
{if $order.currency == 'CZK'}<Cena>{$item.piece_price.value_with_vat->printFloatValue(2)}</Cena>{/if}
|
||||
<CenaTyp>1</CenaTyp>
|
||||
<Poradi>{$index}</Poradi>
|
||||
<Valuty>{if $order.currency != 'CZK'}{$item.piece_price.value_with_vat->printFloatValue(2)}{else}0{/if}</Valuty>
|
||||
<NesklPolozka>
|
||||
<MJ>Ks</MJ>
|
||||
<Katalog>{$item.code}</Katalog>
|
||||
<Zaloha>0</Zaloha>
|
||||
<TypZarDoby>N</TypZarDoby>
|
||||
<ZarDoba>0</ZarDoba>
|
||||
<Protizapis>0</Protizapis>
|
||||
<BarCode>{$item.ean}</BarCode>
|
||||
<Hmotnost>0</Hmotnost>
|
||||
</NesklPolozka>
|
||||
</Polozka>
|
||||
{/foreach}
|
||||
</SeznamPolozek>
|
||||
</FaktVyd>
|
||||
{/foreach}
|
||||
</SeznamFaktVyd>
|
||||
</MoneyData>
|
||||
95
admin/templates/export/orders_money_s4s5.tpl
Normal file
95
admin/templates/export/orders_money_s4s5.tpl
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<S5Data>
|
||||
<FakturaVydanaList>
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}
|
||||
<FakturaVydana>
|
||||
<CisloDokladu>{$order.order_no}</CisloDokladu>
|
||||
<VariabilniSymbol>{$order.order_no}</VariabilniSymbol>
|
||||
<Nazev>Faktura k objednávce č. {$order.order_no}</Nazev>{block dates}
|
||||
<OdkazNaDoklad>{$order.order_no}</OdkazNaDoklad>
|
||||
<ParovaciSymbol />
|
||||
<KonstantniSymbolText>{$order.order_no}</KonstantniSymbolText>
|
||||
{$dh = $order->date_handle}
|
||||
<DatumVystaveni>{$order->date_handle|date_format:'Y-m-d\Th:m:s'}</DatumVystaveni>
|
||||
<DatumUcetnihoPripadu>{$order->date_handle|date_format:'Y-m-d\Th:m:s'}</DatumUcetnihoPripadu>
|
||||
<DatumPlneni>{$order->date_handle|date_format:'Y-m-d\Th:m:s'}</DatumPlneni>
|
||||
<DatumSplatnosti>{$order->date_handle->add(DateInterval::createFromDateString($dbcfg.shop_due_days|cat:" days"))|date_format:'Y-m-d\Th:m:s'}</DatumSplatnosti>{/block}
|
||||
<DatumSkladovehoPohybu>{$order->date_handle|date_format:'Y-m-d\Th:m:s'}</DatumSkladovehoPohybu>
|
||||
<DatumUplatneni>{$dh|date_format:'Y-m-d\Th:m:s'}</DatumUplatneni>
|
||||
<ZapornyPohyb>False</ZapornyPohyb>
|
||||
<Sleva />
|
||||
<Poznamka>{$order->note_user}</Poznamka>
|
||||
<Zaplaceno_UserData>True</Zaplaceno_UserData>
|
||||
<IC>{$order.invoice_ico}</IC>
|
||||
<DIC>{$order.invoice_dic}</DIC>
|
||||
<Adresa>
|
||||
<Nazev>{if empty($order.delivery_firm)}{$order.delivery_name} {$order.delivery_surname}{else}{$order.delivery_firm}{/if}</Nazev>
|
||||
<Ulice>{$order.delivery_street}</Ulice>
|
||||
<Misto>{$order.delivery_city}</Misto>
|
||||
<Stat>Česká republika</Stat>
|
||||
<AdresaStat><Kod>{$order.delivery_country}</Kod></AdresaStat>
|
||||
<PSC>{$order.delivery_zip}</PSC>
|
||||
</Adresa>
|
||||
<AdresaKoncovehoPrijemce>
|
||||
<Nazev>{if empty($order.delivery_firm)}{$order.delivery_name} {$order.delivery_surname}{else}{$order.delivery_firm}{/if}</Nazev>
|
||||
<Ulice>{$order.delivery_street}</Ulice>
|
||||
<Misto>{$order.delivery_city}</Misto>
|
||||
<Stat>Česká republika</Stat>
|
||||
<AdresaStat><Kod>{$order.delivery_country}</Kod></AdresaStat>
|
||||
<PSC>{$order.delivery_zip}</PSC>
|
||||
<Email>{$order.invoice_email}</Email>
|
||||
<Telefon>{$order.invoice_phone}</Telefon>
|
||||
</AdresaKoncovehoPrijemce>
|
||||
<AdresaPrijemceFaktury>
|
||||
<Nazev>{if empty($order.delivery_firm)}{$order.delivery_name} {$order.delivery_surname}{else}{$order.delivery_firm}{/if}</Nazev>
|
||||
<Ulice>{$order.delivery_street}</Ulice>
|
||||
<Misto>{$order.delivery_city}</Misto>
|
||||
<Stat>Česká republika</Stat>
|
||||
<AdresaStat><Kod>{$order.delivery_country}</Kod></AdresaStat>
|
||||
<PSC>{$order.delivery_zip}</PSC>
|
||||
</AdresaPrijemceFaktury>
|
||||
<BankovniSpojeni>
|
||||
<CisloUctu>{$dbcfg->bank_account_number}</CisloUctu>
|
||||
<IBAN>{$dbcfg->bank_iban}</IBAN>
|
||||
<SpecifickySymbol />
|
||||
<SWIFT>{$dbcfg->bank_swift}</SWIFT>
|
||||
<Banka>
|
||||
<CiselnyKod>{$dbcfg->bank_code}</CiselnyKod>
|
||||
</Banka>
|
||||
</BankovniSpojeni>
|
||||
<ZpusobDopravy>
|
||||
<Kod>D</Kod>
|
||||
</ZpusobDopravy>
|
||||
<ZpusobPlatby>
|
||||
<Kod>D</Kod>
|
||||
</ZpusobPlatby>
|
||||
|
||||
<Polozky>
|
||||
{$index = 0}
|
||||
{foreach $order->fetchItems() as $key => $item}
|
||||
{$index = $index + 1}
|
||||
<PolozkaFakturyVydane>
|
||||
<CisloPolozky>{$index}</CisloPolozky>
|
||||
<Mnozstvi>{$item.pieces}</Mnozstvi>
|
||||
<JednCenaCM>{$item.piece_price.value_with_vat->printFloatValue(2)}</JednCenaCM>
|
||||
<TypCeny>1</TypCeny>
|
||||
<DPH><Sazba>{$item.vat}</Sazba></DPH>
|
||||
<TypObsahu>1</TypObsahu>
|
||||
<Nazev>{$item.descr}</Nazev>
|
||||
<Katalog>{$item.code}</Katalog>
|
||||
{if $item.id_product}
|
||||
<ObsahPolozky>
|
||||
<Artikl>
|
||||
<CarovyKod>{$item.ean}</CarovyKod>
|
||||
<Sklad>
|
||||
<Kod>{$item.code}</Kod>
|
||||
</Sklad>
|
||||
</ObsahPolozky>
|
||||
{/if}
|
||||
</PolozkaFakturyVydane>
|
||||
{/foreach}
|
||||
</Polozky>
|
||||
</FakturaVydana>
|
||||
{/foreach}
|
||||
</FakturaVydanaList>
|
||||
</S5Data>
|
||||
132
admin/templates/export/orders_pohoda.tpl
Normal file
132
admin/templates/export/orders_pohoda.tpl
Normal file
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<dat:dataPack id="fa001" ico="{$dbcfg->shop_ico}" application="StwTest" version = "2.0" note="Import FA z wpjshop"
|
||||
xmlns:dat="http://www.stormware.cz/schema/version_2/data.xsd"
|
||||
xmlns:inv="http://www.stormware.cz/schema/version_2/invoice.xsd"
|
||||
xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd" >
|
||||
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}{change_currency currency=$order->currency}
|
||||
{block xmlVariables}
|
||||
{$flags = $order->getFlags()}
|
||||
{$oss = $flags.OSS}
|
||||
{/block}
|
||||
<dat:dataPackItem id="{$order->order_no}" version="2.0">
|
||||
<inv:invoice version="2.0">
|
||||
<inv:invoiceHeader>
|
||||
<inv:invoiceType>{block invoiceType}issuedInvoice{/block}</inv:invoiceType>
|
||||
<inv:symVar>{block symVar}{$order->order_no}{/block}</inv:symVar>
|
||||
<inv:date>{$order->date_handle|date_format:'Y-m-d'}</inv:date>
|
||||
<inv:partnerIdentity>
|
||||
<typ:address>
|
||||
<typ:email>{$order->invoice_email}</typ:email>
|
||||
<typ:company>{$order->invoice_firm}</typ:company>
|
||||
{$invoice_name = $order->invoice_name|cat:' '|cat:$order->invoice_surname}
|
||||
<typ:name>{substr($invoice_name, 0, 32)}</typ:name>
|
||||
<typ:city>{$order->invoice_city}</typ:city>
|
||||
<typ:street>{substr($order->invoice_street, 0, 32)}</typ:street>
|
||||
<typ:zip>{$order->invoice_zip}</typ:zip>
|
||||
<typ:ico>{$order->invoice_ico}</typ:ico>
|
||||
<typ:dic>{$order->invoice_dic}</typ:dic>
|
||||
<typ:icDph>{$order->invoice_dic}</typ:icDph>
|
||||
<typ:country><typ:ids>{$order->invoice_country}</typ:ids></typ:country>
|
||||
</typ:address>
|
||||
<typ:shipToAddress>
|
||||
<typ:company>{$order->delivery_firm}</typ:company>
|
||||
{$delivery_name = $order->delivery_name|cat:' '|cat:$order->delivery_surname}
|
||||
<typ:name>{substr($delivery_name, 0, 32)}</typ:name>
|
||||
<typ:city>{$order->delivery_city}</typ:city>
|
||||
<typ:street>{substr($order->delivery_street, 0, 32)}</typ:street>
|
||||
<typ:zip>{$order->delivery_zip}</typ:zip>
|
||||
<typ:country><typ:ids>{$order->delivery_country}</typ:ids></typ:country>
|
||||
</typ:shipToAddress>
|
||||
</inv:partnerIdentity>
|
||||
<inv:numberOrder>{if $order->getInvoiceNo()}{$order->getInvoiceNo()}{else}{$order->order_no}{/if}</inv:numberOrder>
|
||||
{block invoice_number}<inv:number><typ:numberRequested>{if $order->getInvoiceNo()}{$order->getInvoiceNo()}{else}{$order->order_no}{/if}</typ:numberRequested></inv:number>{/block}
|
||||
<inv:dateOrder>{$order->date_created|date_format:'Y-m-d'}</inv:dateOrder>
|
||||
<inv:paymentType>
|
||||
{strip}
|
||||
{if $order->getDeliveryType()->getPayment()}
|
||||
{if $order->getDeliveryType()->getPayment()->getPayMethod() == 8}
|
||||
<typ:ids>{substr($order->getDeliveryType()->getPayment()->getName(), 0, 24)}</typ:ids>
|
||||
{else}
|
||||
<typ:ids>{substr($order->getDeliveryType()->getPayment()->getName(), 0, 32)}</typ:ids>
|
||||
{/if}
|
||||
{else}
|
||||
<typ:ids>Nevybráno</typ:ids>
|
||||
{/if}
|
||||
{/strip}
|
||||
</inv:paymentType>
|
||||
<inv:carrier>
|
||||
{strip}
|
||||
{if $order->getDeliveryType()->getDelivery()}
|
||||
<typ:ids>{substr($order->getDeliveryType()->getDelivery()->name, 0, 20)}</typ:ids>
|
||||
{else}
|
||||
<typ:ids>Nevybráno</typ:ids>
|
||||
{/if}
|
||||
{/strip}
|
||||
</inv:carrier>
|
||||
<inv:note>{$order->note_user}</inv:note>
|
||||
{if $oss}
|
||||
<inv:MOSS>
|
||||
<typ:ids>{$order->delivery_country}</typ:ids>
|
||||
</inv:MOSS>
|
||||
<inv:evidentiaryResourcesMOSS>
|
||||
<typ:ids>A</typ:ids>
|
||||
</inv:evidentiaryResourcesMOSS>
|
||||
<inv:classificationVAT>
|
||||
<typ:ids>UN</typ:ids>
|
||||
<typ:classificationVATType>nonSubsume</typ:classificationVATType>
|
||||
</inv:classificationVAT>
|
||||
{/if}
|
||||
</inv:invoiceHeader>
|
||||
{block customParts}{/block}
|
||||
{block invoiceSummary}
|
||||
<inv:invoiceSummary>
|
||||
{*
|
||||
zatím nebylo potřeba řešit, že by vznikaly halířové rozdíly v celkové ceně v případě, kdy
|
||||
se exportuje do Pohody bez položek. Pokud by bylo potřeba lze dodělat: připad rozdílovou položku - viz xml
|
||||
*}
|
||||
{if !isset($order->currency) or $order->currency == 'CZK'}
|
||||
<inv:homeCurrency>
|
||||
{if $order.status_storno == 0}
|
||||
<typ:priceNone>{if $order->vats[0]}{$order->vats[0].total_price_with_vat->printFloatValue(2)}{else}0{/if}</typ:priceNone>
|
||||
|
||||
<typ:price3>{if $order->vats[10]}{$order->vats[10].total_price_without_vat_no_rounding->printFloatValue(4)}{else}0{/if}</typ:price3>
|
||||
<typ:price3Sum>{if $order->vats[10]}{$order->vats[10].total_price_with_vat->printFloatValue(2)}{else}0{/if}</typ:price3Sum>
|
||||
|
||||
<typ:priceLow>{if $order->vats[15]}{$order->vats[15].total_price_without_vat_no_rounding->printFloatValue(4)}{else}0{/if}</typ:priceLow>
|
||||
<typ:priceLowSum>{if $order->vats[15]}{$order->vats[15].total_price_with_vat->printFloatValue(2)}{else}0{/if}</typ:priceLowSum>
|
||||
|
||||
<typ:priceHigh>{if $order->vats[21]}{$order->vats[21].total_price_without_vat_no_rounding->printFloatValue(4)}{else}0{/if}</typ:priceHigh>
|
||||
<typ:priceHighSum>{if $order->vats[21]}{$order->vats[21].total_price_with_vat->printFloatValue(2)}{else}0{/if}</typ:priceHighSum>
|
||||
{else}
|
||||
<typ:priceNone>0</typ:priceNone>
|
||||
<typ:priceLowSum>0</typ:priceLowSum>
|
||||
<typ:price3>0</typ:price3>
|
||||
<typ:priceHighSum>0</typ:priceHighSum>
|
||||
{/if}
|
||||
</inv:homeCurrency>
|
||||
{else}
|
||||
{get_contexts currency=true assign='contexts'}
|
||||
{if $contexts.currency->getDefaultId() == 'EUR'}
|
||||
{$currencyRate = toDecimal(1/$order->currency_rate)}
|
||||
{else}
|
||||
{$currencyRate = toDecimal($order->currency_rate)}
|
||||
{/if}
|
||||
<inv:foreignCurrency>
|
||||
<typ:currency>
|
||||
<typ:ids>{$order->currency}</typ:ids>
|
||||
</typ:currency>
|
||||
<typ:rate>{$currencyRate->printFloatValue(3)}</typ:rate>
|
||||
<typ:amount>1</typ:amount>
|
||||
<typ:priceSum>{$order->total_price_array|format_price:"printcurrency=false"|replace:',':'.'|replace:' ':''}</typ:priceSum>
|
||||
</inv:foreignCurrency>
|
||||
{/if}
|
||||
</inv:invoiceSummary>
|
||||
{/block}
|
||||
</inv:invoice>
|
||||
</dat:dataPackItem>
|
||||
{/change_currency}
|
||||
{/foreach}
|
||||
|
||||
</dat:dataPack>
|
||||
95
admin/templates/export/orders_pohoda_with_items.tpl
Normal file
95
admin/templates/export/orders_pohoda_with_items.tpl
Normal file
@@ -0,0 +1,95 @@
|
||||
{extends 'export/orders_pohoda.tpl'}
|
||||
|
||||
{block customParts}
|
||||
<inv:invoiceDetail>
|
||||
{foreach $order->fetchItems() as $key => $item}
|
||||
<inv:invoiceItem>
|
||||
<inv:code>{$item.code}</inv:code>
|
||||
{if $item.id_product and ($item.code or $item.ean)}
|
||||
<inv:stockItem>
|
||||
<typ:stockItem>
|
||||
{if $item.ean}
|
||||
<typ:EAN>{$item.ean}</typ:EAN>
|
||||
{else}
|
||||
<typ:ids>{$item.code}</typ:ids>
|
||||
{/if}
|
||||
</typ:stockItem>
|
||||
</inv:stockItem>
|
||||
{/if}
|
||||
<inv:text>{$item.descr|substr:0:80}</inv:text>
|
||||
<inv:note>{$item.descr|substr:0:80}</inv:note>
|
||||
<inv:quantity>{$item.pieces}</inv:quantity>
|
||||
<inv:payVAT>true</inv:payVAT>
|
||||
{if !isset($order->currency) or $order->currency == 'CZK'}
|
||||
{switch $item.vat}
|
||||
{case 21}
|
||||
<inv:rateVAT>high</inv:rateVAT>
|
||||
{/case}
|
||||
{case 15}
|
||||
<inv:rateVAT>low</inv:rateVAT>
|
||||
{/case}
|
||||
{case 12}
|
||||
<inv:rateVAT>low</inv:rateVAT>
|
||||
{/case}
|
||||
{case 10}
|
||||
<inv:rateVAT>third</inv:rateVAT>
|
||||
{/case}
|
||||
{case 0}
|
||||
<inv:rateVAT>none</inv:rateVAT>
|
||||
{/case}
|
||||
{default}
|
||||
<inv:rateVAT>historyHigh</inv:rateVAT>
|
||||
<inv:percentVAT>{$item.vat}</inv:percentVAT>
|
||||
{/switch}
|
||||
<inv:homeCurrency>
|
||||
{if $order.status_storno == 0}
|
||||
<typ:unitPrice>{$item.piece_price.value_with_vat->printFloatValue(2)}</typ:unitPrice>
|
||||
<typ:price>{$item.total_price.value_with_vat->printFloatValue(2)}</typ:price>
|
||||
{else}
|
||||
<typ:unitPrice>0</typ:unitPrice>
|
||||
<typ:price>0</typ:price>
|
||||
{/if}
|
||||
</inv:homeCurrency>
|
||||
{else}
|
||||
<inv:rateVAT>{pohoda_get_vat_level order=$order item=$item}</inv:rateVAT>
|
||||
<inv:percentVAT>{$item.vat}</inv:percentVAT>
|
||||
<inv:foreignCurrency>
|
||||
{if $order.status_storno == 0}
|
||||
<typ:unitPrice>{$item.piece_price.value_with_vat->printFloatValue(2)}</typ:unitPrice>
|
||||
<typ:price>{$item.total_price.value_with_vat->printFloatValue(2)}</typ:price>
|
||||
|
||||
{else}
|
||||
<typ:unitPrice>0</typ:unitPrice>
|
||||
<typ:price>0</typ:price>
|
||||
|
||||
{/if}
|
||||
</inv:foreignCurrency>
|
||||
{if $oss}
|
||||
<inv:typeServiceMOSS>
|
||||
<typ:ids>GD</typ:ids>
|
||||
</inv:typeServiceMOSS>
|
||||
{/if}
|
||||
{/if}
|
||||
</inv:invoiceItem>
|
||||
{/foreach}
|
||||
</inv:invoiceDetail>
|
||||
{/block}
|
||||
{block invoiceSummary}
|
||||
{if isset($order->currency) and $order->currency != 'CZK'}
|
||||
<inv:invoiceSummary>
|
||||
{get_contexts currency=true assign='contexts'}
|
||||
{if $contexts.currency->getDefaultId() == 'EUR'}
|
||||
{$currencyRate = toDecimal(1/$order->currency_rate)}
|
||||
{else}
|
||||
{$currencyRate = toDecimal($order->currency_rate)}
|
||||
{/if}
|
||||
<inv:foreignCurrency>
|
||||
<typ:currency>
|
||||
<typ:ids>{$order->currency}</typ:ids>
|
||||
</typ:currency>
|
||||
<typ:rate>{$currencyRate->printFloatValue(3)}</typ:rate>
|
||||
<typ:amount>1</typ:amount>
|
||||
</inv:foreignCurrency>
|
||||
</inv:invoiceSummary>
|
||||
{/if}
|
||||
{/block}
|
||||
305
admin/templates/export/orders_txt_premier.tpl
Normal file
305
admin/templates/export/orders_txt_premier.tpl
Normal file
@@ -0,0 +1,305 @@
|
||||
{strip}
|
||||
X;
|
||||
Číslo;
|
||||
Datum;
|
||||
Splatno;
|
||||
Zdplnění;
|
||||
RelPk;
|
||||
Předkontace;
|
||||
RelTpDPH;
|
||||
ČlDPH;
|
||||
Likv;
|
||||
Firma;
|
||||
Jméno;
|
||||
Celkem;
|
||||
K likvidaci;
|
||||
RefStr;
|
||||
Středisko;
|
||||
Vytvořil;
|
||||
Zámek II;
|
||||
UsrOrder;
|
||||
RefCin;
|
||||
Činnost;
|
||||
Zakázka;
|
||||
RefUcet;
|
||||
Účet;
|
||||
RefZeme;
|
||||
Země;
|
||||
RelTpFak;
|
||||
Typ;
|
||||
RelDrFak;
|
||||
Druh;
|
||||
RelMobch;
|
||||
RelForUh;
|
||||
Forma;
|
||||
RelObDPH;
|
||||
Období DPH;
|
||||
RelObKH;
|
||||
Období KH;
|
||||
RelObSH;
|
||||
Období SH;
|
||||
RelDruh;
|
||||
Zdroj dokladu;
|
||||
ZaokrFV;
|
||||
ZpOdpZal;
|
||||
Štítky;
|
||||
Štítky_2;
|
||||
Polozky;
|
||||
Daňový doklad;
|
||||
Vyřízeno;
|
||||
Odlož výdej;
|
||||
Přeneseno;
|
||||
RelCR;
|
||||
Doklad;
|
||||
Varsym;
|
||||
Pársym;
|
||||
EvčKH DPH;
|
||||
Text;
|
||||
Účpřípadu;
|
||||
RelDobr;
|
||||
RelStorn;
|
||||
Storno;
|
||||
Datstorna;
|
||||
Odp/UplatDPH;
|
||||
Datum KH DPH;
|
||||
Obj;
|
||||
Histsazby;
|
||||
Registrace DIČ;
|
||||
MOSS;
|
||||
Důkazní prostředky MOSS;
|
||||
RelObMOSS;
|
||||
Období MOSS;
|
||||
RelZpVypDPH;
|
||||
Způsob výpočtu DPH;
|
||||
Kč 0;
|
||||
Kč snížená;
|
||||
DPH snížená;
|
||||
Kč základní;
|
||||
DPH základní;
|
||||
Kč 2 snížená;
|
||||
DPH 2 snížená;
|
||||
Záloha;
|
||||
Kurzový rozdíl záloh;
|
||||
Likvhradí;
|
||||
Zaokrouhlení;
|
||||
Uplatněno;
|
||||
Příkaz hradí;
|
||||
KcPUpr;
|
||||
Příkaz;
|
||||
RefCM;
|
||||
Cizí měna;
|
||||
Deneura;
|
||||
CM množství;
|
||||
CM kurz;
|
||||
CM částka;
|
||||
CM záloha;
|
||||
CM celkem;
|
||||
CM k likvidaci;
|
||||
CM likvhradí;
|
||||
CmZaokr;
|
||||
CM příkaz hradí;
|
||||
CmPUpr;
|
||||
OrigKc1;
|
||||
OrigKc2;
|
||||
K zápočtu;
|
||||
Objč;
|
||||
RefAD;
|
||||
RefADdod;
|
||||
Vazba dod adresy;
|
||||
Ulice;
|
||||
PSČ;
|
||||
Obec;
|
||||
IČ;
|
||||
DIČ;
|
||||
IČ DPH;
|
||||
E-mail;
|
||||
Telefon;
|
||||
Mobil;
|
||||
Fax;
|
||||
Firma (dod);
|
||||
Oddělení (dod);
|
||||
Jméno (dod);
|
||||
Ulice (dod);
|
||||
PSČ (dod);
|
||||
Obec (dod);
|
||||
RefZeme2;
|
||||
Země (dod);
|
||||
Telefon (dod);
|
||||
E-mail (dod);
|
||||
Ceny;
|
||||
RefDopravci;
|
||||
Dopravce;
|
||||
Vytvoření zásilky;
|
||||
Číslo účtu;
|
||||
Kód banky;
|
||||
Zpráva;
|
||||
Specsym;
|
||||
Konstsym;
|
||||
IsDocID;
|
||||
Časově rozlišeno;
|
||||
Vytvořeno;
|
||||
Uloženo;
|
||||
Tisk FM;
|
||||
Označil;
|
||||
Editoval;
|
||||
Zámek I;
|
||||
Poznámka;
|
||||
Interní poznámka;
|
||||
{/strip}
|
||||
{foreach $orders as $db_order}{$order = $this->getOrder($db_order.id)}{strip}
|
||||
{block body}
|
||||
False;
|
||||
{$order->order_no};
|
||||
{$order.date_handle->format('Y-m-d')} 00:00:00;
|
||||
{$order.date_handle->modify("+{$dbcfg->shop_due_days} days")->format('Y-m-d')} 00:00:00;
|
||||
{$order.date_handle->format('Y-m-d')} 00:00:00;
|
||||
2;
|
||||
Nevím;
|
||||
165;
|
||||
UD;
|
||||
{$order.date_handle->format('Y-m-d')} 00:00:00;
|
||||
{$order->invoice_firm};
|
||||
{$order->invoice_name} {$order->invoice_surname};
|
||||
{if $order->status_storno}0{else}{$order.total_price->mul(toDecimal($order.currency_rate))->printFloatValue(2)}{/if};
|
||||
0;
|
||||
;
|
||||
;
|
||||
;
|
||||
False;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
2;
|
||||
ČSOB;
|
||||
42;
|
||||
{$order->invoice_country};
|
||||
1;
|
||||
Faktura;
|
||||
;
|
||||
;
|
||||
;
|
||||
4;
|
||||
{$order->items[$order.deliveryItemId].descr};
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
1;
|
||||
1;
|
||||
;
|
||||
;
|
||||
True;
|
||||
False;
|
||||
False;
|
||||
False;
|
||||
False;
|
||||
463;
|
||||
;
|
||||
{$order->order_no};
|
||||
;
|
||||
;
|
||||
Fakturujeme Vám zboží dle Vaší objednávky:;
|
||||
{$order.date_created->format('Y-m-d')} 00:00:00;
|
||||
;
|
||||
;
|
||||
{if $order->status_storno}True{else}False{/if};
|
||||
;
|
||||
;
|
||||
;
|
||||
{$order.date_created->format('Y-m-d')} 00:00:00;
|
||||
False;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
0;
|
||||
Z částky v domácí měně;
|
||||
{if !empty($order.vats[0]) && !$order->status_storno}
|
||||
{$order.vats[0].total_price_without_vat->mul(toDecimal($order.currency_rate))->printFloatValue(2)};
|
||||
{else}0;{/if}
|
||||
{if !empty($order.vats[15]) && !$order->status_storno}
|
||||
{$order.vats[15].total_price_without_vat->mul(toDecimal($order.currency_rate))->printFloatValue(2)};
|
||||
{$order.vats[15].total_price_without_vat->mul(toDecimal(15/100))->mul(toDecimal($order.currency_rate))->printFloatValue(2)};
|
||||
{else}0;0;{/if}
|
||||
{if !empty($order.vats[21]) && !$order->status_storno}
|
||||
{$order.vats[21].total_price_without_vat->mul(toDecimal($order.currency_rate))->printFloatValue(2)};
|
||||
{$order.vats[21].total_price_without_vat->mul(toDecimal(21/100))->mul(toDecimal($order.currency_rate))->printFloatValue(2)};
|
||||
{else}0;0;{/if}
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
{if $order->status_storno}0{else}{$order.total_price->mul(toDecimal($order.currency_rate))->printFloatValue(2)}{/if};
|
||||
0;
|
||||
;
|
||||
0;
|
||||
;
|
||||
;
|
||||
;
|
||||
{$order->currency};
|
||||
False;
|
||||
;
|
||||
{$order->currency_rate};
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
0;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
{$order->order_no};
|
||||
;
|
||||
;
|
||||
;
|
||||
{$order->invoice_street};
|
||||
{$order->invoice_zip};
|
||||
{$order->invoice_city};
|
||||
{$order->invoice_ico};
|
||||
{$order->invoice_dic};
|
||||
;
|
||||
{$order->invoice_email};
|
||||
{$order->invoice_phone};
|
||||
;
|
||||
;
|
||||
{$order->delivery_firm};
|
||||
;
|
||||
{$order->delivery_name} {$order->delivery_surname};
|
||||
{$order->delivery_street};
|
||||
{$order->delivery_zip};
|
||||
{$order->delivery_city};
|
||||
42;
|
||||
{$order->invoice_country};
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
;
|
||||
0308;
|
||||
;
|
||||
False;
|
||||
{$order.date_created->format('Y-m-d H:i:s')};
|
||||
{$order.date_created->format('Y-m-d H:i:s')};
|
||||
False;
|
||||
BM;
|
||||
@;
|
||||
False;
|
||||
{if $order->status_storno}Stornováno{/if};
|
||||
;
|
||||
{/block}{/strip}
|
||||
{/foreach}
|
||||
|
||||
59
admin/templates/export/users_csv.tpl
Normal file
59
admin/templates/export/users_csv.tpl
Normal file
@@ -0,0 +1,59 @@
|
||||
{strip}{block header}
|
||||
"ID";
|
||||
"Aktivní";
|
||||
"Jméno";
|
||||
"Přijmení";
|
||||
"Firma";
|
||||
"Ulice";
|
||||
"Město";
|
||||
"PSČ";
|
||||
"Stát";
|
||||
"Email";
|
||||
"ICO";
|
||||
"DIC";
|
||||
"Tel";
|
||||
"Newsletter";
|
||||
"Skupina";
|
||||
{if $module.PRICE_LEVELS}"Cenová hladina";{/if}
|
||||
{if $module.BONUS_PROGRAM}"Body v bonus programu";{/if}
|
||||
"Poslední objednávka";
|
||||
"Datum přihlášení newsletteru";
|
||||
"Datum odhlášení newsletteru";
|
||||
"Datum registrace";
|
||||
"Datum poslední úpravy";
|
||||
"Počet objednávek";
|
||||
{/block} {/strip}
|
||||
{foreach $users as $user}
|
||||
{strip}
|
||||
{block body}
|
||||
"{$user.id}";
|
||||
"{if $user.figure == 'Y'}Ano{else}Ne{/if}";
|
||||
"{$user.name}";
|
||||
"{$user.surname}";
|
||||
"{$user.firm}";
|
||||
"{$user.street}";
|
||||
"{$user.city}";
|
||||
"{$user.zip}";
|
||||
"{$user.country}";
|
||||
"{$user.email}";
|
||||
"{$user.ico}";
|
||||
"{$user.dic}";
|
||||
"{$user.phone}";
|
||||
"{if $user.get_news == 'Y'}Ano{else}Ne{/if}";
|
||||
"{$user.groups}";
|
||||
{if $module.PRICE_LEVELS}
|
||||
"{$user.price_level_name}";
|
||||
{/if}
|
||||
{if $module.BONUS_PROGRAM}
|
||||
"{$user.bonus_points}";
|
||||
{/if}
|
||||
"{$user.last_order_date}";
|
||||
"{$user.date_subscribe}";
|
||||
"{$user.date_unsubscribe}";
|
||||
"{$user.date_reg}";
|
||||
"{$user.date_updated}";
|
||||
"{$user.orders_count}";
|
||||
{/block}
|
||||
{/strip}{if $user@iteration is div by 100}{flush nocache}{/if}
|
||||
|
||||
{/foreach}
|
||||
167
admin/templates/frame.tpl
Normal file
167
admin/templates/frame.tpl
Normal file
@@ -0,0 +1,167 @@
|
||||
{extends "base.tpl"}
|
||||
|
||||
|
||||
{block js append}
|
||||
<script type="text/javascript">
|
||||
function showInfoMessage(str, type){
|
||||
if (window.parent && window.parent != window && window.parent.showInfoMessage)
|
||||
window.parent.showInfoMessage(str, type);
|
||||
else
|
||||
window.throwMessage(str, type);
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
{block body}
|
||||
{if $body.acn!='erased' && $body.acn!='erased2'}
|
||||
{block modalError}
|
||||
<!-- Modal -->
|
||||
<div class="modal" id="errorModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
{*<h4 class="modal-title">Při ukládání se vyskytla chyba</h4>*}
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{foreach $htmlErrors as $error}
|
||||
<p>{$error nofilter}</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Zavřít</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if !empty($htmlErrors)}
|
||||
<script>
|
||||
// Show modal
|
||||
$(document).ready(function () {
|
||||
$('#errorModal').modal('show');
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{function windowTab id="flap" label="" wpjadmin=false}
|
||||
<li>
|
||||
<a data-toggle="tab" href="#{$id}" data-tab="{$id}">
|
||||
<span class="pin hidden"><span class="glyphicon fc icons_pin"></span> </span>
|
||||
{if $label}{$label}{else}{$id|translate}{/if}
|
||||
{if $wpjadmin}
|
||||
<span class="glyphicon glyphicon-flash" style="color:#AAB2BD;" title="Vidí pouze superadmin"></span>
|
||||
{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/function}
|
||||
|
||||
{block windowContent}
|
||||
<!-- Modal -->
|
||||
<div class="modal" id="infoModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body" data-infoModal="wrapper">
|
||||
<span data-infoModal="content"></span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Zavřít</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row static alert-inforow" style="display:none">
|
||||
<div class="alert autoclose alert-dismissable fade in" id="data-alert-type">
|
||||
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
<span class="glyphicon" id="data-alert-icon"></span><strong id="data-alert-text"> </strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !empty($ErrStr) || $OkStr}
|
||||
{if $ErrStr == 'saved'|translate:'status' || $OkStr}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
showInfoMessage('{if !empty($ErrStr)}{$ErrStr nofilter}{elseif !empty($OkStr)}{$OkStr}{/if}', 'success');
|
||||
})
|
||||
</script>
|
||||
{else}
|
||||
<script type="text/javascript">
|
||||
alert("{$ErrStr}");
|
||||
</script>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{block content}
|
||||
{/block}
|
||||
{/block}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
|
||||
{if $header.refresh}
|
||||
{if $header.refresh == 'parent'}
|
||||
if (window.opener && window.opener != window)
|
||||
{
|
||||
if (!refreshOpener(window.opener.top.mainFrame))
|
||||
refreshOpener(window.opener);
|
||||
}
|
||||
{elseif $header.refresh == 'opener'}
|
||||
if (window.opener && window.opener != window)
|
||||
{
|
||||
refreshOpener(window.opener.top.mainFrame);
|
||||
refreshOpener(window.opener);
|
||||
}
|
||||
{elseif $header.refresh == 'close'}
|
||||
if (window.opener) {
|
||||
refreshOpener(window.opener.top.mainFrame);
|
||||
refreshOpener(window.opener);
|
||||
closeWindow();
|
||||
}
|
||||
{elseif $header.refresh == 'message'}
|
||||
const message = {
|
||||
'sourceUrl': window.location.href,
|
||||
'openerUrl': window.opener.location.href,
|
||||
'data': null
|
||||
};
|
||||
|
||||
window.opener.postMessage(message, '*');
|
||||
{elseif $header.refresh == 'noopener'}
|
||||
window.opener=null;
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
if ($.fn.alert)
|
||||
{
|
||||
$(".alert:visible").alert();
|
||||
|
||||
setTimeout(function(){
|
||||
$(".alert.autoclose:visible").alert("close")
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
$(".alert.autoclose").mouseover(function(e){
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
try {
|
||||
if (window.top.name == "EshopMainFrame") {
|
||||
$('body').keydown(window.top.handleShortcut);
|
||||
} else if (window.top.opener && window.top.opener.top.name == "EshopMainFrame") {
|
||||
try {
|
||||
$('body').keydown(window.top.opener.top.handleShortcut);
|
||||
} catch (e) {
|
||||
/* ? bug chrome Uncaught DOMException: Blocked a frame with origin from accessing a cross-origin frame. */
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
}
|
||||
|
||||
preloadAutocompletes();
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
9
admin/templates/help/index.tpl
Normal file
9
admin/templates/help/index.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
{extends "window.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<div class="well">Systém nápovědy je v rekonstrukci</div>
|
||||
{/block}
|
||||
|
||||
{block "buttons"}
|
||||
|
||||
{/block}
|
||||
455
admin/templates/import/generic.xslt
Normal file
455
admin/templates/import/generic.xslt
Normal file
@@ -0,0 +1,455 @@
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template match="/">
|
||||
<SHOP>
|
||||
<xsl:for-each select="xml/item">
|
||||
<xsl:variable name="code">
|
||||
<xsl:value-of select="current()/kod"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="oldCode">
|
||||
<xsl:value-of select="preceding-sibling::*[1]/kod"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="(string-length($code) > 0 and not($code = $oldCode)) or string-length(ean) > 0">
|
||||
<SHOPITEM convert_to_variation="1">
|
||||
<xsl:if test="string-length($code) > 0">
|
||||
<CODE>
|
||||
<xsl:value-of select="$code"/>
|
||||
</CODE>
|
||||
<PRODUCT_CODE>
|
||||
<xsl:value-of select="$code"/>
|
||||
</PRODUCT_CODE>
|
||||
</xsl:if>
|
||||
<xsl:if test="nazev">
|
||||
<PRODUCT force="1">
|
||||
<xsl:value-of select="nazev"/>
|
||||
</PRODUCT>
|
||||
</xsl:if>
|
||||
<xsl:if test="kategorie">
|
||||
<CATEGORY force="1">
|
||||
<xsl:value-of select="kategorie"/>
|
||||
</CATEGORY>
|
||||
</xsl:if>
|
||||
<xsl:if test="popis-1">
|
||||
<SHORT_DESCRIPTION>
|
||||
<xsl:value-of select="popis-1"/>
|
||||
</SHORT_DESCRIPTION>
|
||||
</xsl:if>
|
||||
<xsl:if test="anotace">
|
||||
<SHORT_DESCRIPTION>
|
||||
<xsl:value-of select="anotace"/>
|
||||
</SHORT_DESCRIPTION>
|
||||
</xsl:if>
|
||||
<xsl:if test="popis-2">
|
||||
<DESCRIPTION>
|
||||
<xsl:value-of select="popis-2"/>
|
||||
</DESCRIPTION>
|
||||
</xsl:if>
|
||||
<xsl:if test="popis">
|
||||
<DESCRIPTION>
|
||||
<xsl:value-of select="popis"/>
|
||||
</DESCRIPTION>
|
||||
</xsl:if>
|
||||
<xsl:if test="seo-titulek">
|
||||
<META_TITLE>
|
||||
<xsl:value-of select="seo-titulek"/>
|
||||
</META_TITLE>
|
||||
</xsl:if>
|
||||
<xsl:if test="seo-popis">
|
||||
<META_DESCRIPTION>
|
||||
<xsl:value-of select="seo-popis"/>
|
||||
</META_DESCRIPTION>
|
||||
</xsl:if>
|
||||
<xsl:if test="parametry">
|
||||
<PARAMETERS>
|
||||
<xsl:value-of select="parametry"/>
|
||||
</PARAMETERS>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="getPrice"/>
|
||||
<xsl:call-template name="getCommonPrice"/>
|
||||
<xsl:call-template name="getPriceBuy"/>
|
||||
<xsl:call-template name="getVat"/>
|
||||
<xsl:call-template name="getDiscount"/>
|
||||
<xsl:call-template name="getPriceList"/>
|
||||
<xsl:call-template name="getLinks"/>
|
||||
|
||||
<xsl:if test="vyrobce">
|
||||
<PRODUCER>
|
||||
<xsl:value-of select="vyrobce"/>
|
||||
</PRODUCER>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="zaruka-mes">
|
||||
<WARRANTY>
|
||||
<xsl:value-of select="zaruka-mes"/>
|
||||
</WARRANTY>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="hmotnost-kg">
|
||||
<WEIGHT>
|
||||
<xsl:value-of select="hmotnost-kg"/>
|
||||
</WEIGHT>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="sirka-cm">
|
||||
<WIDTH>
|
||||
<xsl:value-of select="sirka-cm"/>
|
||||
</WIDTH>
|
||||
</xsl:if>
|
||||
<xsl:if test="vyska-cm">
|
||||
<HEIGHT>
|
||||
<xsl:value-of select="vyska-cm"/>
|
||||
</HEIGHT>
|
||||
</xsl:if>
|
||||
<xsl:if test="hloubka-cm">
|
||||
<DEPTH>
|
||||
<xsl:value-of select="hloubka-cm"/>
|
||||
</DEPTH>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="zobrazovat-ve-srovnavacich">
|
||||
<SHOW_IN_FEED>
|
||||
<xsl:if test="string(zobrazovat-ve-srovnavacich) = 'ne'">N</xsl:if>
|
||||
<xsl:if test="not(string(zobrazovat-ve-srovnavacich) = 'ne')">Y</xsl:if>
|
||||
</SHOW_IN_FEED>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="zobrazovat-zbozi">
|
||||
<xsl:variable name="showProduct" select="normalize-space(string(zobrazovat-zbozi))"/>
|
||||
<HIDDEN>
|
||||
<xsl:if test="$showProduct = 'ne'">Y</xsl:if>
|
||||
<xsl:if test="$showProduct = 'ukončen'">O</xsl:if>
|
||||
<xsl:if test="$showProduct != 'ne' and $showProduct != 'ukončen'">N</xsl:if>
|
||||
</HIDDEN>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="cena-za-proklik-kc">
|
||||
<MAX_CPC>
|
||||
<xsl:value-of select="cena-za-proklik-kc"/>
|
||||
</MAX_CPC>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="getParameters"/>
|
||||
|
||||
<xsl:if test="string-length(merna-jednotka) > 0">
|
||||
<MEASURE_UNIT>
|
||||
<xsl:value-of select="merna-jednotka"/>
|
||||
</MEASURE_UNIT>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="number(jednotek-v-baleni) > 0">
|
||||
<MEASURE_QUANTITY>
|
||||
<xsl:value-of select="jednotek-v-baleni"/>
|
||||
</MEASURE_QUANTITY>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="varCnt"
|
||||
select="count(*[substring(name(),1, 8) = 'varianta' and not(normalize-space(text()) = '')])"/>
|
||||
<xsl:if test="not($varCnt = 0)">
|
||||
<VARIATIONS>
|
||||
<xsl:call-template name="getVariations">
|
||||
<xsl:with-param name="parentCode" select="$code"/>
|
||||
<xsl:with-param name="rootElement" select="/xml/item"/>
|
||||
</xsl:call-template>
|
||||
</VARIATIONS>
|
||||
</xsl:if>
|
||||
<xsl:if test="$varCnt = 0">
|
||||
<xsl:if test="string-length(ean) > 0">
|
||||
<EAN>
|
||||
<xsl:value-of select="ean"/>
|
||||
</EAN>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(string-length(ean)) and string-length(kod-ean) >= 8">
|
||||
<EAN>
|
||||
<xsl:value-of select="kod-ean"/>
|
||||
</EAN>
|
||||
</xsl:if>
|
||||
<xsl:if test="skladem-ks">
|
||||
<IN_STORE>
|
||||
<xsl:value-of select="skladem-ks"/>
|
||||
</IN_STORE>
|
||||
</xsl:if>
|
||||
<xsl:variable name="in_store_min" select="minimalne-skladem-ks"/>
|
||||
<xsl:if test="$in_store_min">
|
||||
<IN_STORE_MIN>
|
||||
<xsl:value-of select="$in_store_min"/>
|
||||
</IN_STORE_MIN>
|
||||
</xsl:if>
|
||||
<xsl:if test="dostupnost">
|
||||
<AVAILABILITY>
|
||||
<xsl:value-of select="dostupnost"/>
|
||||
</AVAILABILITY>
|
||||
</xsl:if>
|
||||
<xsl:variable name="photos" select="*[substring(name(),1, 10) = 'fotografie' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($photos) > 0">
|
||||
<PHOTOS>
|
||||
<xsl:for-each select="$photos">
|
||||
<PHOTO>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PHOTO>
|
||||
</xsl:for-each>
|
||||
</PHOTOS>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</SHOPITEM>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</SHOP>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getVat">
|
||||
<xsl:if test="number(translate(sazba-dph,',','.')) > 0">
|
||||
<VAT>
|
||||
<xsl:value-of select="number(translate(sazba-dph,',','.'))"/>
|
||||
</VAT>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(number(translate(sazba-dph,',','.')) > 0)">
|
||||
<xsl:if test="number(translate(cena-s-dph-kc,',','.')) > number(translate(cena-bez-dph-kc,',','.'))">
|
||||
<VAT>
|
||||
<xsl:value-of select="number(translate(cena-s-dph-kc,',','.')) div number(translate(cena-bez-dph-kc,',','.')) * 100"/>
|
||||
</VAT>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="oss-kategorie">
|
||||
<VAT_CATEGORY>
|
||||
<xsl:value-of select="oss-kategorie"/>
|
||||
</VAT_CATEGORY>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getPrice">
|
||||
<xsl:if test="number(translate(cena-bez-dph-kc,',','.')) > 0">
|
||||
<PRICE>
|
||||
<xsl:value-of select="number(translate(cena-bez-dph-kc,',','.'))"/>
|
||||
</PRICE>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(number(translate(cena-bez-dph-kc,',','.')) > 0)">
|
||||
<xsl:if test="number(translate(sazba-dph,',','.')) > 0 and number(translate(cena-s-dph-kc,',','.')) > 0">
|
||||
<PRICE>
|
||||
<xsl:value-of select="100 div (100 + number(translate(sazba-dph,',','.'))) * number(translate(cena-s-dph-kc,',','.'))"/>
|
||||
</PRICE>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getCommonPrice">
|
||||
<xsl:if test="number(translate(bezna-cena-kc,',','.')) > 0">
|
||||
<PRICE_COMMON>
|
||||
<xsl:value-of select="number(translate(bezna-cena-kc,',','.'))"/>
|
||||
</PRICE_COMMON>
|
||||
</xsl:if>
|
||||
<xsl:if test="number(translate(skrtla-cena-kc,',','.')) > 0">
|
||||
<PRICE_COMMON>
|
||||
<xsl:value-of select="number(translate(skrtla-cena-kc,',','.'))"/>
|
||||
</PRICE_COMMON>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getDiscount">
|
||||
<xsl:if test="number(translate(sleva,',','.')) > 0">
|
||||
<DISCOUNT>
|
||||
<xsl:value-of select="number(translate(sleva,',','.'))"/>
|
||||
</DISCOUNT>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(number(translate(sleva,',','.')) > 0)">
|
||||
<xsl:if test="number(translate(cena-po-sleve-bez-dph-kc,',','.')) > 0 and number(translate(cena-bez-dph-kc,',','.')) > 0">
|
||||
<DISCOUNT>
|
||||
<xsl:value-of
|
||||
select="(1 - number(translate(cena-po-sleve-bez-dph-kc,',','.')) div number(translate(cena-bez-dph-kc,',','.'))) * 100"/>
|
||||
</DISCOUNT>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(number(translate(cena-po-sleve-bez-dph-kc,',','.')) > 0 and number(translate(cena-bez-dph-kc,',','.')) > 0)">
|
||||
<xsl:if test="number(translate(cena-po-sleve-s-dph-kc,',','.')) > 0 and number(translate(cena-s-dph-kc,',','.')) > 0">
|
||||
<DISCOUNT>
|
||||
<xsl:value-of
|
||||
select="(1 - number(translate(cena-po-sleve-s-dph-kc,',','.')) div number(translate(cena-s-dph-kc,',','.'))) * 100"/>
|
||||
</DISCOUNT>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(cena-po-sleve-bez-dph-kc) and not(cena-po-sleve-s-dph-kc) and number(translate(sleva,',','.')) = 0">
|
||||
<DISCOUNT>0</DISCOUNT>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getParameters">
|
||||
<xsl:variable name="parameters" select="*[substring(name(),1, 8) = 'parametr' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($parameters) > 0">
|
||||
<xsl:for-each select="$parameters">
|
||||
<PARAMETER>
|
||||
<xsl:variable name="tagName" select="name()"/>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of
|
||||
select="normalize-space(substring(/xml/head/*[name() = $tagName][1], 10))"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PARAMETER>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getVariations">
|
||||
<xsl:param name="parentCode"/>
|
||||
<xsl:param name="rootElement"/>
|
||||
<xsl:for-each select="$rootElement[kod=$parentCode]">
|
||||
<VARIATION>
|
||||
<CODE>
|
||||
<xsl:if test="normalize-space(kod-ean) = ''">
|
||||
<xsl:value-of select="concat(kod,'_',position(),'_U')"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(normalize-space(kod-ean) = '')">
|
||||
<xsl:value-of select="concat(kod,'_',kod-ean,'_U')"/>
|
||||
</xsl:if>
|
||||
</CODE>
|
||||
<xsl:if test="string-length(ean) > 0">
|
||||
<EAN>
|
||||
<xsl:value-of select="ean"/>
|
||||
</EAN>
|
||||
</xsl:if>
|
||||
<xsl:if test="not(string-length(ean)) and string-length(kod-ean) >= 8">
|
||||
<EAN>
|
||||
<xsl:value-of select="kod-ean"/>
|
||||
</EAN>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="getPrice"/>
|
||||
<xsl:call-template name="getCommonPrice"/>
|
||||
<xsl:call-template name="getPriceBuy"/>
|
||||
<xsl:call-template name="getVat"/>
|
||||
<xsl:call-template name="getDiscount"/>
|
||||
<xsl:variable name="labels" select="*[substring(name(),1, 8) = 'varianta' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($labels) > 0">
|
||||
<xsl:for-each select="$labels">
|
||||
<LABEL>
|
||||
<xsl:variable name="tagName" select="name()"/>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="normalize-space(substring(/xml/head/*[name() = $tagName][1], 10))"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="text()"/>
|
||||
</LABEL>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="skladem-ks">
|
||||
<IN_STORE>
|
||||
<xsl:value-of select="skladem-ks"/>
|
||||
</IN_STORE>
|
||||
</xsl:if>
|
||||
<xsl:variable name="in_store_min" select="minimalne-skladem-ks"/>
|
||||
<xsl:if test="$in_store_min">
|
||||
<IN_STORE_MIN>
|
||||
<xsl:value-of select="$in_store_min"/>
|
||||
</IN_STORE_MIN>
|
||||
</xsl:if>
|
||||
<xsl:if test="dostupnost">
|
||||
<AVAILABILITY>
|
||||
<xsl:value-of select="dostupnost"/>
|
||||
</AVAILABILITY>
|
||||
</xsl:if>
|
||||
<xsl:variable name="photosVariations" select="*[substring(name(),1, 10) = 'fotografie' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($photosVariations) > 0">
|
||||
<PHOTOS>
|
||||
<xsl:for-each select="$photosVariations">
|
||||
<PHOTO>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PHOTO>
|
||||
</xsl:for-each>
|
||||
</PHOTOS>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="number(jednotek-v-baleni) > 0">
|
||||
<MEASURE_QUANTITY>
|
||||
<xsl:value-of select="jednotek-v-baleni"/>
|
||||
</MEASURE_QUANTITY>
|
||||
</xsl:if>
|
||||
|
||||
</VARIATION>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getPriceBuy">
|
||||
<xsl:for-each select="*[substring(name(),1, 23) = 'cena-dodavatele-bez-dph' and not(normalize-space(text()) = '')]">
|
||||
<xsl:if test="text()">
|
||||
<PRICE_BUY>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PRICE_BUY>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each
|
||||
select="*[substring(name(),1, 20) = 'nakupni-cena-bez-dph' and not(normalize-space(text()) = '')]">
|
||||
<xsl:if test="text()">
|
||||
<PRICE_BUY>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PRICE_BUY>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getPriceList">
|
||||
<xsl:variable name="priceLists" select="*[substring(name(),1, 13) = 'cenik-bez-dph' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:variable name="priceLists2" select="*[substring(name(),1, 11) = 'cenik-sleva' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($priceLists) > 0 or count($priceLists2) > 0">
|
||||
<PRICELISTS>
|
||||
<xsl:for-each select="$priceLists">
|
||||
<PRICELIST>
|
||||
<xsl:variable name="tagName" select="name()"/>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of
|
||||
select="normalize-space(substring(/xml/head/*[name() = $tagName][1], 15))"/>
|
||||
</xsl:attribute>
|
||||
<PRICE>
|
||||
<xsl:value-of select="text()"/>
|
||||
</PRICE>
|
||||
</PRICELIST>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="$priceLists2">
|
||||
<PRICELIST>
|
||||
<xsl:variable name="tagName" select="name()"/>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of
|
||||
select="normalize-space(substring(/xml/head/*[name() = $tagName][1], 13))"/>
|
||||
</xsl:attribute>
|
||||
<DISCOUNT>
|
||||
<xsl:value-of select="text()"/>
|
||||
</DISCOUNT>
|
||||
</PRICELIST>
|
||||
</xsl:for-each>
|
||||
</PRICELISTS>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- ___________________________________________________________________________________________________________ -->
|
||||
<xsl:template name="getLinks">
|
||||
<xsl:variable name="links" select="*[substring(name(),1, 5) = 'odkaz' and not(normalize-space(text()) = '')]"/>
|
||||
<xsl:if test="count($links) > 0">
|
||||
<LINKS>
|
||||
<xsl:for-each select="$links">
|
||||
<xsl:if test="string-length(name()) > 0">
|
||||
<LINK>
|
||||
<xsl:variable name="tagName" select="name()"/>
|
||||
<xsl:variable name="linkType">
|
||||
<xsl:value-of select="translate(normalize-space(substring(/xml/head/*[name() = $tagName][1], 7)), '[]', '')"/>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="type">
|
||||
<xsl:value-of select="$linkType"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="text()"/>
|
||||
</LINK>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</LINKS>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
120
admin/templates/import/xmlFeed.xslt
Normal file
120
admin/templates/import/xmlFeed.xslt
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
|
||||
<xsl:output indent="yes" />
|
||||
|
||||
<xsl:template match="/SHOP">
|
||||
<SHOP>
|
||||
<xsl:for-each select="SHOPITEM[not(ITEMGROUP_ID=preceding-sibling::SHOPITEM/ITEMGROUP_ID)]">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</SHOP>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="SHOPITEM">
|
||||
<SHOPITEM>
|
||||
<!-- Product code -->
|
||||
<xsl:variable name="code">
|
||||
<xsl:if test="ITEM_ID">
|
||||
<xsl:value-of select="ITEM_ID"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="ITEMGROUP_ID">
|
||||
<xsl:value-of select="ITEMGROUP_ID"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<CODE>
|
||||
<xsl:value-of select="$code"/>
|
||||
</CODE>
|
||||
<PRODUCT>
|
||||
<xsl:value-of select="PRODUCTNAME"/>
|
||||
</PRODUCT>
|
||||
<PRODUCT_CODE>
|
||||
<xsl:value-of select="$code"/>
|
||||
</PRODUCT_CODE>
|
||||
|
||||
<!-- Product info -->
|
||||
<CATEGORY>
|
||||
<xsl:value-of select="translate(CATEGORYTEXT, '|', '/')"/>
|
||||
</CATEGORY>
|
||||
<xsl:copy-of select="PRODUCT" />
|
||||
<xsl:copy-of select="DESCRIPTION" />
|
||||
<xsl:copy-of select="PRICE" />
|
||||
<xsl:copy-of select="VAT" />
|
||||
<xsl:if test="not(PRICE)">
|
||||
<xsl:variable name="vat">
|
||||
<xsl:choose>
|
||||
<xsl:when test="VAT">
|
||||
<xsl:value-of select="number(translate(VAT, '%', ''))"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="number('21')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<PRICE>
|
||||
<xsl:value-of select="number(translate(PRICE_VAT, ',', '.')) div ((100+$vat) div 100)"/>
|
||||
</PRICE>
|
||||
</xsl:if>
|
||||
<xsl:copy-of select="EAN" />
|
||||
<PRODUCER>
|
||||
<xsl:value-of select="MANUFACTURER"/>
|
||||
</PRODUCER>
|
||||
|
||||
<!-- Photos -->
|
||||
<PHOTOS>
|
||||
<xsl:if test="IMGURL">
|
||||
<PHOTO>
|
||||
<xsl:value-of select="IMGURL"/>
|
||||
</PHOTO>
|
||||
</xsl:if>
|
||||
</PHOTOS>
|
||||
|
||||
<xsl:if test="ITEMGROUP_ID">
|
||||
<!-- Variations -->
|
||||
<VARIATIONS>
|
||||
<xsl:variable name="variation_code" select="ITEMGROUP_ID"/>
|
||||
<xsl:for-each select=".|following-sibling::SHOPITEM[ITEMGROUP_ID=$variation_code]">
|
||||
<VARIATION>
|
||||
<CODE>
|
||||
<xsl:value-of select="$variation_code"/>
|
||||
<xsl:call-template name="join">
|
||||
<xsl:with-param name="list" select="PARAM/VAL/text()" />
|
||||
<xsl:with-param name="separator" select="'_'" />
|
||||
</xsl:call-template>
|
||||
</CODE>
|
||||
<xsl:for-each select="PARAM">
|
||||
<LABEL>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="PARAM_NAME"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="VAL"/>
|
||||
</LABEL>
|
||||
</xsl:for-each>
|
||||
</VARIATION>
|
||||
</xsl:for-each>
|
||||
</VARIATIONS>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Parameters -->
|
||||
<xsl:for-each select="PARAM">
|
||||
<PARAMETER>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="PARAM_NAME"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="VAL"/>
|
||||
</PARAMETER>
|
||||
</xsl:for-each>
|
||||
</SHOPITEM>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Concatenating template -->
|
||||
<xsl:template name="join">
|
||||
<xsl:param name="list" />
|
||||
<xsl:param name="separator"/>
|
||||
|
||||
<xsl:for-each select="$list">
|
||||
<xsl:value-of select="$separator" />
|
||||
<xsl:value-of select="." />
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
129
admin/templates/index.tpl
Normal file
129
admin/templates/index.tpl
Normal file
@@ -0,0 +1,129 @@
|
||||
{extends "base.tpl"}
|
||||
{block title} {'login'|translate:'web'} | {$dbcfg.index_title}{/block}
|
||||
|
||||
{block body_class}class="login"{/block}
|
||||
|
||||
{block body}
|
||||
|
||||
{if isset($error) && !empty($error)}
|
||||
<div class="container alert-container">
|
||||
<div class="row">
|
||||
<div class="alert alert-warning alert-dismissable"><span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
{if $error == 1}{'errorNotAllValid'|translate:'index'}{/if}
|
||||
{if $error == 2}{'errorBadLogin'|translate:'index'}{/if}
|
||||
{if $error == 3}{'errorBadPassw'|translate:'index'}{/if}
|
||||
{if $error == 4}{'errorLoginExpired'|translate:'index'}{/if}
|
||||
{if $error == 5}{'errorLogout'|translate:'index'}{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="container form-container" style="background-image: url('/admin/static/images/login/form_background.jpg');">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<a href="https://www.wpj.cz/">
|
||||
<img class="logo" src="/admin/static/images/logo.svg?v1" width="150" alt="wpjshop">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form name="login" method="post" action="index.php" class="form-horizontal login-form">
|
||||
<input type="hidden" name="url" value="{$url}">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<label class="form-control-label">Jméno</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-lg" name="login" size="30" maxlength="100" value="{if isset($login)}{$login}{/if}" autocomplete="off">
|
||||
{if $error == 1}<span class="warning glyphicon glyphicon-exclamation-sign" title="{'errorNotAllValid'|translate:'index'}"></span>{/if}
|
||||
{if $error == 2}<span class="error glyphicon glyphicon-remove-sign" title="{'errorBadLogin'|translate:'index'}"></span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<label class="form-control-label">Heslo</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control input-lg" name="password" size="30" maxlength="100" value="{if isset($password)}{$password}{/if}" autocomplete="off">
|
||||
{if $error == 1}<span class="warning glyphicon glyphicon-exclamation-sign" title="{'errorNotAllValid'|translate:'index'}"></span>{/if}
|
||||
{if $error == 3}<span class="error glyphicon glyphicon-remove-sign" title="{'errorBadPassw'|translate:'index'}"></span>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input data-hash type="hidden" name="hash">
|
||||
<div id="icon-hash" hidden>
|
||||
<span class="glyphicon glyphicon-barcode"></span>
|
||||
</div>
|
||||
<input type="hidden" name="url" value="{if isset($url)}{$url}{/if}">
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-center">
|
||||
<button type="submit" class="btn btn-success btn-lg" name="Submit">{'submitLogin'|translate:'index'}</button>
|
||||
{if isLocalDevelopment()}
|
||||
<script>
|
||||
function loginWpjAdmin() {
|
||||
$('input[name=password],input[name=login]').val('wpjadmin');
|
||||
$('button[type=submit]').click();
|
||||
}
|
||||
</script>
|
||||
<button type="button" class="btn btn-warning btn-lg" onclick="loginWpjAdmin()">WpjAdmin</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{if $error == 3}
|
||||
document.forms['login'].password.focus();
|
||||
{else}
|
||||
document.forms['login'].login.focus();
|
||||
{/if}
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<div class="footer">
|
||||
<p>
|
||||
<span>Provozovatel: <a href="http://www.wpj.cz/">wpj s.r.o.</a> | Podpora: <a href="mailto:wpj@wpj.cz">wpj@wpj.cz</a></span></p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready}
|
||||
$('.form-control').on('keydown', function() {
|
||||
$(this).parent('.input-group').find('span').hide();
|
||||
});
|
||||
{/block}
|
||||
</script>
|
||||
|
||||
{block "js-onready" append}
|
||||
<script src="/admin/static/js/qwebchannel.js?v4"></script>
|
||||
<script>
|
||||
// Deprecated
|
||||
if (true/*!window.qt*/) {
|
||||
function onCodeReceived(code) {
|
||||
$('[data-hash]').val(code);
|
||||
$('button[type=submit]').click();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="/admin/static/js/webchannel.js?v4"></script>
|
||||
<script>
|
||||
if (false/*window.qt*/) {
|
||||
window.webChannel.then(() => {
|
||||
window.kupshopCheckout.codeReceived.connect(function(code) {
|
||||
$('[data-hash]').val(code);
|
||||
$('button[type=submit]').trigger('click');
|
||||
});
|
||||
$('#icon-hash').show();
|
||||
})
|
||||
}
|
||||
// Deprecated
|
||||
if (true/*!window.qt*/) {
|
||||
$iconHash = $('#icon-hash');
|
||||
const closeIcon = () => $iconHash.hide();
|
||||
scannerSocket.addEventListener('open', () => $iconHash.show());
|
||||
scannerSocket.addEventListener('close', closeIcon);
|
||||
scannerSocket.addEventListener('error', closeIcon);
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
306
admin/templates/list.tpl
Normal file
306
admin/templates/list.tpl
Normal file
@@ -0,0 +1,306 @@
|
||||
{extends "frame.tpl"}
|
||||
|
||||
{block name=body_class}{if $smarty.get.window == 1}class="window"{/if}{/block}
|
||||
|
||||
{block "css-entry" append}
|
||||
{encore_entry_link_tags entry='list' build='admin'}
|
||||
{/block}
|
||||
|
||||
{block "js-entry" append}
|
||||
{encore_entry_script_tags entry='list' build='admin'}
|
||||
{/block}
|
||||
|
||||
{block name="js" append}
|
||||
{if $searchWnd}
|
||||
<script type="text/javascript">
|
||||
function searchResult(val, data) {
|
||||
if (val == null)
|
||||
return
|
||||
|
||||
if (top.transferValues != null) {
|
||||
top.transferValues(val, data)
|
||||
} else {
|
||||
alert('Chyba skriptu')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "content"}
|
||||
{function paginationList}
|
||||
{include "utils/pager.tpl"}
|
||||
{/function}
|
||||
|
||||
<div class="container-fluid list-wrapper{if $smarty.get.window} list-wrapper-window{/if} {block "list-wrapper-class"}{/block}">
|
||||
{block topPagination}
|
||||
{/block}
|
||||
|
||||
{block "list-content"}
|
||||
<div class="wpj-panel {block "list-panel-class"}{/block}">
|
||||
{block "list-filter"}
|
||||
{include "utils/listFilter.tpl"}
|
||||
{if !empty($filtersValue)}
|
||||
{*¨todo - kde to je ?*}
|
||||
<div class="wpj-panel-heading">
|
||||
<div class="list-filters-wrapper">
|
||||
<div class="list-filters-left">
|
||||
{foreach $filtersValue as $filter}
|
||||
<div class="filter-item">
|
||||
<div class="list_filter">
|
||||
<select name="IDpr" class="selecter input-sm">
|
||||
{$filter@key}
|
||||
{foreach $filter as $option}
|
||||
<option value="{$option@key}"
|
||||
{if $option.choiced == true}selected{/if}>{$option.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<script type="text/javascript">
|
||||
$('.list_filter select').change(function(e) {
|
||||
$this = $(this)
|
||||
window.location.href = window.location.href + '&' + $this.serialize()
|
||||
})
|
||||
</script>
|
||||
{block "list-filter-item"}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block listTable}
|
||||
<table class="{block 'table-class'}table table-striped{/block} {block unsortable}{/block}"{* width="100%" border="0"
|
||||
cellspacing="0" cellpadding="0"*}>
|
||||
{block list}
|
||||
{block 'list-header'}
|
||||
{$sum = 0}
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
{if not $column.size|is_numeric}
|
||||
{continue}
|
||||
{/if}
|
||||
{$sum = $sum+$column.size}
|
||||
{/foreach}
|
||||
<thead>
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{* todo header - sorting + row & col-xs-12*}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
{if $column.size|is_numeric}
|
||||
{$width=($column['size']/$sum*100)|cat:'%'}
|
||||
{else}
|
||||
{$width=$column.size}
|
||||
{/if}
|
||||
<th style="width:{$width}" class="{$column.class}">
|
||||
{if $column@last}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{/if}
|
||||
{if $orderParam.sort == $label}
|
||||
{if $orderParam.direction == "DESC"}
|
||||
{$order = ""}
|
||||
{else}
|
||||
{$order = "-"}
|
||||
{/if}
|
||||
{else}
|
||||
{$order = ""}
|
||||
{/if}
|
||||
{$labelTitle = $object->printHeaderLabel($column.title, $column)}
|
||||
{if $pager && $column.field and $label != 'check'}
|
||||
<a href='{$pager->getUrl(["order" => $order|cat:$label ])}'
|
||||
title="{$labelTitle}">
|
||||
{$labelTitle}
|
||||
{if $orderParam.sort == $label}
|
||||
<span class="bi bi-chevron-{if $order == ''}down{else}up{/if}"></span>
|
||||
{/if}
|
||||
</a>
|
||||
{else}
|
||||
<span title="{$labelTitle}">{$labelTitle}</span>
|
||||
{/if}
|
||||
{if $column.wpjAdmin and isSuperuser()}
|
||||
<span class="glyphicon glyphicon-flash" style="color:#AAB2BD;"
|
||||
title="Vidí pouze wpjAdmin"></span>
|
||||
{/if}
|
||||
|
||||
{if $column.tooltip}
|
||||
<a class="help-tip" data-toggle="tooltip" title="{$column.tooltip|translate}">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</a>
|
||||
{/if}
|
||||
{if $label == 'check' or $label == 'Vybrat'}
|
||||
{block 'list-header-check'}{/block}
|
||||
{/if}
|
||||
{if $column@last}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
</thead>
|
||||
{/block}
|
||||
|
||||
<tbody>
|
||||
{block 'list-rows'}
|
||||
{foreach $SQL as $row}
|
||||
{$table = $object->getTableDef()}
|
||||
<tr {if $table.class}class="{$object->resolveCallable($table.class, $row)}"{/if}>
|
||||
{foreach $table.fields as $column}
|
||||
{if !(($column.wpjAdmin && !isSuperuser()) || ($column['visible'] == 'N'))}
|
||||
<td>
|
||||
<div class="list_item {if $isEditing}is-editable{/if} {$object->getItemClass($column.class, $row, $column.fieldType)}">
|
||||
{$object->printListRowItem($column, $row)}
|
||||
</div>
|
||||
</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/block}
|
||||
</tbody>
|
||||
{/block}
|
||||
</table>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
{$addItem = $object->getAddItem()}
|
||||
{if $addItem}
|
||||
<a href="javascript:nw('{$addItem.type}', '0', '{$addItem.params}&autoclose=1');" class="btn btn-success btn-block">
|
||||
<span class="glyphicon glyphicon-plus"></span> Přidat položku
|
||||
</a>
|
||||
{block addItem}
|
||||
{/block}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="pagination-sticky">
|
||||
{include "utils/pager.tpl"}
|
||||
|
||||
<div class="pagination-buttons">
|
||||
{block buttons}
|
||||
<div class="{if $pageCount > 5}dropup{else}dropdown{/if} dropup-actions">
|
||||
<button class="btn dropdown-toggle" type="button" id="listDropdownTrigger" data-toggle="dropdown">
|
||||
Akce
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="adminActionsDropdownTrigger" id="listDropdownTrigger">
|
||||
{if $showExport}
|
||||
{block 'exportButtons'}
|
||||
<li>
|
||||
<a title="Export zobrazených dat do .xlsx" data-export-url value="Export">
|
||||
Export zobrazených dat do .xlsx
|
||||
</a>
|
||||
</li>
|
||||
{/block}
|
||||
{/if}
|
||||
{block buttons_dropup}{/block}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "list-filter-mass-edit"}
|
||||
{if $showMassEdit}
|
||||
<a title="Hromadná úprava" href="{$pager->getUrl(['s'=>'listEdit.php'])}"
|
||||
class="btn btn-secondary"><span class="bi bi-list-check m-r-1"></span>Hromadná úprava
|
||||
</a>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block delivery_buttons}{/block}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
{*{if $columns.id}*}
|
||||
$('.table').on('click', 'tr, li', function(e) {
|
||||
var sel = getSelection().toString()
|
||||
if (sel)
|
||||
return false
|
||||
|
||||
if ($(e.target).is(':button') || $(e.target).closest('a').length > 0 || $(e.currentTarget).is('.no-row-click')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$link = $(e.currentTarget).find('a')
|
||||
if ($link.length > 0) {
|
||||
tag = $(e.target).prop('tagName')
|
||||
parentElem = $(e.target).prop('parentElement');
|
||||
if (tag != 'A' && tag != 'INPUT' && tag != 'SELECT' && tag != 'TEXTAREA' && tag != 'OPTION' && tag != 'LABEL' && $link.attr('href') && parentElem.className != 'chosen-results' && $(e.target).closest('.dbbackup').length <= 0) {
|
||||
if ('{$smarty.get.s}' == 'list.php') {
|
||||
window.location = $link.attr('href')
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
{*{/if}*}
|
||||
|
||||
$('body').tooltip({
|
||||
html: true,
|
||||
selector: '.list_item:not(.columnFeeds):not(.edit_list_item):not(.is-editable):not(.hiddenTooltip), .list_item.columnCampaigns',
|
||||
title: function() {
|
||||
var $this = $(this)
|
||||
var padding = [parseInt($this.css('padding-left')) + parseInt($this.css('padding-right')), parseInt($this.css('padding-top')) + parseInt($this.css('padding-bottom'))]
|
||||
if ((this.scrollWidth - padding[0] - $this.width() > 5 || this.scrollHeight - padding[1] - $this.height() > 5) || (this.classList.value.indexOf('columnCampaigns') > 0 && $this.html().trim().length > 0)) {
|
||||
return $this.html()
|
||||
}
|
||||
},
|
||||
placement: function() {
|
||||
return $(this.$element).find('img').length > 0 ? 'right' : 'bottom'
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
$('.wpj-panel').tooltip({
|
||||
html: true,
|
||||
selector: '.columnFeeds .glyphicon, .columnFeeds .bi',
|
||||
placement: 'bottom',
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
var posx = getWindowStorage('listPosition_x', '')
|
||||
window.scrollTo(0, posx)
|
||||
|
||||
var ID = getWindowStorage('listHighRow', '')
|
||||
|
||||
rows = $('tr A[href^=javascript]')
|
||||
rows_obj = getPrevNextArray(rows)
|
||||
$(rows_obj).each(function() {
|
||||
if ($(this)[0].ID == ID) {
|
||||
$($(this)[0].item).closest('tr').addClass('highRow')
|
||||
}
|
||||
})
|
||||
|
||||
setWindowStorage('listPosition_x', null)
|
||||
setWindowStorage('listHighRow', null)
|
||||
})
|
||||
|
||||
function customRefresh(url) {
|
||||
setWindowStorage('listPosition_x', window.scrollY, window)
|
||||
|
||||
var js = $('.highRow').find('td a[href^=javascript]').attr('href')
|
||||
var ID
|
||||
if (typeof js == 'undefined')
|
||||
ID = 0
|
||||
else
|
||||
ID = js.replace(/javascript:nw\(\'(.+)'\, '(\d+)'\, '(.*)'\);/, '$2')
|
||||
|
||||
setWindowStorage('listHighRow', ID, window)
|
||||
}
|
||||
|
||||
$('a[data-export-url]').on('click', function() {
|
||||
window.open(window.location + '&acn=export')
|
||||
});
|
||||
{/block}
|
||||
</script>
|
||||
84
admin/templates/list/artsections.tpl
Normal file
84
admin/templates/list/artsections.tpl
Normal file
@@ -0,0 +1,84 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block css append}
|
||||
<link href="./static/js/jquery.tree-drag-drop.css?t={$header.date}" rel="stylesheet" media="screen">
|
||||
<style>
|
||||
{$sizeSum = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
{$sizeSum = $sizeSum + $column.size}
|
||||
{/foreach}
|
||||
{if $sizeSum > 0}{$singlePartRelSize = 100/$sizeSum}{else}{$singlePartRelSize = 10}{/if}
|
||||
{$partCounter = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
.tdd-row > .tdd-column-{$column@index + 1} {
|
||||
left: {$singlePartRelSize*$partCounter}%;
|
||||
width: {$singlePartRelSize*$column.size}%;
|
||||
}
|
||||
|
||||
{$partCounter = $partCounter + $column.size}
|
||||
{/foreach}
|
||||
</style>
|
||||
<link href="./static/js/jquery.tree-drag-drop.css?t={$header.date}" rel="stylesheet" media="screen">
|
||||
{/block}
|
||||
|
||||
{block js append}
|
||||
<script src="./static/js/jquery.tree-drag-drop.js?t={$header.date}"></script>
|
||||
{/block}
|
||||
|
||||
{block "list-filter"}{/block}
|
||||
|
||||
{block bottomPagination}{/block}
|
||||
|
||||
{block name="list-panel-class"}menu-list{/block}
|
||||
|
||||
{block listTable}
|
||||
<div class="tdd-row thh-row">
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
<div class="tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
<small>{$object->printHeaderLabel($column.title, $column)} </small>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{function printTree}
|
||||
{foreach $data as $entry}
|
||||
{$width = 500 - ($entry.level * 26)}
|
||||
<li class="node {$view->resolveCallable($tableDef.class, $entry)}" data-id="{$view->getListRowValue($entry, $tableDef.id)}">
|
||||
<div class="nodeWrapper tdd-row">
|
||||
{foreach $tableDef.fields as $name => $column}
|
||||
<div class="list_item tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
{$view->printListRowItem($column, $entry)}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{if !empty($entry.submenu)}
|
||||
<ul class="tdd-tree">
|
||||
{printTree data=$entry.submenu tableDef=$tableDef}
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
{/function}
|
||||
<div class="treeDragDrop table" id="treeDragDrop_artsections">
|
||||
<ul class="tdd-tree nestedSortable nestedSortableRoot">
|
||||
{printTree data=$SQL tableDef=$columns}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block unsortable}unsortable{/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
initListTree('sections', "{$ctrl.currUrl.Rel nofilter}&acn=drag");
|
||||
{/block}
|
||||
</script>
|
||||
15
admin/templates/list/dbbackup.tpl
Normal file
15
admin/templates/list/dbbackup.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{extends "list.tpl"}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
$('body').on('click', '[data-rename]', function() {
|
||||
var $this = $(this),
|
||||
newName = window.prompt("Zadejte nové jméno zálohy", $this.data('rename'));
|
||||
|
||||
if (newName)
|
||||
window.location = $this.attr('href') + '&new_name=' + newName;
|
||||
|
||||
return false;
|
||||
});
|
||||
{/block}
|
||||
</script>
|
||||
216
admin/templates/list/menu.tpl
Normal file
216
admin/templates/list/menu.tpl
Normal file
@@ -0,0 +1,216 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block css append}
|
||||
<style>
|
||||
{$sizeSum = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
{$sizeSum = $sizeSum + $column.size}
|
||||
{/foreach}
|
||||
{if $sizeSum > 0}{$singlePartRelSize = 100/$sizeSum}{else}{$singlePartRelSize = 10}{/if}
|
||||
{$partCounter = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
.tdd-row > .tdd-column-{$column@index + 1} {
|
||||
left: {$singlePartRelSize*$partCounter}%;
|
||||
width: {$singlePartRelSize*$column.size}%;
|
||||
}
|
||||
|
||||
{$partCounter = $partCounter + $column.size}
|
||||
{/foreach}
|
||||
</style>
|
||||
{/block}
|
||||
|
||||
{block name="list-panel-class"}menu-list{/block}
|
||||
|
||||
{block addFilter}
|
||||
{* todo podle sekcí ?? *}
|
||||
{*<div class="filter-item">
|
||||
{if $smarty.get.opened == 'all'}
|
||||
<a class="btn btn-xs btn-ghost" href="launch.php?s={$view->getPageHandler()}&type={$view->getListName()}">
|
||||
<i class="bi bi-dash-circle m-r-1"></i>Sbalit vše
|
||||
</a>
|
||||
{else}
|
||||
<a class="btn btn-xs btn-ghost" href="launch.php?s={$view->getPageHandler()}&type={$view->getListName()}&opened=all">
|
||||
<i class="bi bi-plus-circle m-r-1"></i>Rozbalit vše
|
||||
</a>
|
||||
{/if}
|
||||
</div>*}
|
||||
{/block}
|
||||
|
||||
{block "list-filter-pager"}
|
||||
{if $pager}
|
||||
<div class="filter-item">
|
||||
<span class="small text-muted">
|
||||
{$pager.total|number_format:0:".":" "} položek
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block "list-filter-columns-settings"}{/block}
|
||||
|
||||
{block listTable}
|
||||
<div class="tdd-row thh-row">
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
<div class="tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
<small>{$object->printHeaderLabel($column.title, $column)} </small>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="table">
|
||||
{foreach $SQL.menu as $menuID => $menu}
|
||||
<div data-node-id="{$menuID}">
|
||||
<div class="sections-root">
|
||||
<div class="tdd-row">
|
||||
{* todo dynamic column index *}
|
||||
<div class="tdd-column tdd-column-1">
|
||||
<strong>{$menu.name}</strong>
|
||||
</div>
|
||||
<div class="tdd-column tdd-column-2">
|
||||
{if isSuperuser() and $menuID}
|
||||
<a href="javascript:nw('menu', {$menu.id}, '')">[{$menuID}] {if $menu.code}[{$menu.code}]{/if}</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="tdd-column tdd-column-5 columnBtns">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-success btn-block btn-sm dropdown-toggle" data-toggle="dropdown" id="newItemDropdown_{$menuID}">
|
||||
<span class="bi bi-plus-lg m-r-1"></span>{'nestNewItem'|translate:'menulinks'}
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $SQL.menuItemTypes as $typeID => $typeName}
|
||||
<li>
|
||||
<a href="javascript:nw('menu', '0', '{$menuID}&data[type]={$typeID}{if $menuID !== ''}&data[id_menu]={$menuID}{/if}&data[parent]={if $menuID === ''}null{else}{$menuID}{/if}');">
|
||||
<span class="{$SQL.menuItemTypesClasses[$typeID]}"></span> {'add'|cat:$typeName|translate:'menulinks'}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
{function printTree}
|
||||
{foreach $data as $entry}
|
||||
<li class="node {$view->resolveCallable($tableDef.class, $entry)}" data-node-id="{$view->getListRowValue($entry, $tableDef.id)}">
|
||||
<div class="nodeWrapper tdd-row">
|
||||
{foreach $tableDef.fields as $name => $column}
|
||||
<div class="list_item tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
{$view->printListRowItem($column, $entry)}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{if !empty($entry.submenu)}
|
||||
<ul>
|
||||
{printTree data=$entry.submenu tableDef=$tableDef}
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
{/function}
|
||||
|
||||
<div class="treeDragDrop table" id="treeDragDrop_{if $menuID}{$menuID}{else}null{/if}">
|
||||
<ul class="tdd-tree nestedSortable nestedSortableRoot">
|
||||
{printTree data=$menu['submenu'] tableDef=$columns}
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block js append}
|
||||
<script src="./static/js/jquery.mjs.nestedSortable.js"></script>
|
||||
{/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
$('.nestedSortableRoot').on('click', '.opener', function(event) {
|
||||
event.preventDefault();
|
||||
$(this).closest('li').toggleClass('mjs-nestedSortable-collapsed').toggleClass('mjs-nestedSortable-expanded');
|
||||
$(this).toggleClass('bi-plus-circle').toggleClass('bi-dash-circle');
|
||||
return false;
|
||||
});
|
||||
var sortableContainers = [];
|
||||
{foreach $SQL.menu as $menuID => $menu}
|
||||
{*initListTree("sections", "{$ctrl.currUrl.Rel nofilter}&acn=drag&id_menu={$id_menu}", '#treeDragDrop_{$id_menu}');*}
|
||||
var nodesContainer = $('#treeDragDrop_{if $menuID}{$menuID}{else}null{/if} > ul');
|
||||
sortableContainers.push(nodesContainer);
|
||||
nodesContainer.nestedSortable({
|
||||
handle: '.drag-drop-mover',
|
||||
items: 'li.node',
|
||||
listType: 'ul',
|
||||
toleranceElement: '> div.nodeWrapper',
|
||||
placeholder: 'placeholder',
|
||||
isTree: true,
|
||||
connectWith: '.nestedSortableRoot',
|
||||
start: function(event, ui) {
|
||||
ui.item.startPos = ui.item.index();
|
||||
var $parent = ui.item.parents('[data-node-id]');
|
||||
ui.item.startParent = $parent.length ? $parent.data('node-id') : null;
|
||||
},
|
||||
update: function(event, ui) {
|
||||
// fire only once when moving between multiple nestedSortables (use the update method of the target)
|
||||
// https://stackoverflow.com/a/7340208
|
||||
if (this !== ui.item.closest('.nestedSortableRoot')[0]) {
|
||||
return;
|
||||
}
|
||||
$.each(sortableContainers, function(index, sortable) {
|
||||
sortable.nestedSortable('disable');
|
||||
});
|
||||
|
||||
// fix collapse toggle
|
||||
$('.nestedSortableRoot .node').each(function(index, el) {
|
||||
var $node = $(el);
|
||||
var $nodeToggle = $node.find('> .nodeWrapper > .nodeToggle');
|
||||
if ($node.find('> ul > .node').length) {
|
||||
$nodeToggle.fadeIn();
|
||||
} else {
|
||||
$nodeToggle.fadeOut();
|
||||
}
|
||||
if ($node.is('.mjs-nestedSortable-expanded')) {
|
||||
$nodeToggle.find('> span').addClass('glyphicon-minus-sign').removeClass('glyphicon-plus-sign');
|
||||
}
|
||||
});
|
||||
|
||||
var $parent = ui.item.parents('[data-node-id]');
|
||||
var data = {ldelim}tree: {ldelim}{rdelim}{rdelim};
|
||||
data['tree']['id'] = ui.item.data('node-id');
|
||||
if ($parent.length) {
|
||||
data['tree']['target'] = $parent.data('node-id');
|
||||
}
|
||||
data['tree']['position'] = ui.item.index();
|
||||
|
||||
// up or down?
|
||||
if (ui.item.startParent === data['tree']['target'] && ui.item.startPos <= data['tree']['position']) {
|
||||
data['tree']['position'] += 1;
|
||||
}
|
||||
|
||||
$.post('{$ctrl.currUrl.Rel nofilter}&acn=drag&menuID={if $menuID}{$menuID}{else}null{/if}', data, function(res) {
|
||||
//console.log (res.data.msg);
|
||||
//TODO: error handling
|
||||
return true;
|
||||
});
|
||||
|
||||
$.each(sortableContainers, function(index, sortable) {
|
||||
sortable.nestedSortable('enable');
|
||||
});
|
||||
},
|
||||
});
|
||||
{/foreach}
|
||||
{/block}
|
||||
</script>
|
||||
|
||||
{block unsortable}unsortable{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
{/block}
|
||||
131
admin/templates/list/orderPayment.tpl
Normal file
131
admin/templates/list/orderPayment.tpl
Normal file
@@ -0,0 +1,131 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<form method="post" id="payments-form">
|
||||
|
||||
<script>
|
||||
var $form = $('#payments-form');
|
||||
</script>
|
||||
|
||||
{$smarty.block.parent}
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block name="list-filter" prepend}
|
||||
{$addItem = $object->getAddItem()}
|
||||
{if !$addItem}
|
||||
<div class="panel-heading">
|
||||
<div class="panel-group panel-group-lists" id="orderPayments">
|
||||
<div>
|
||||
<div class="row bottom-space">
|
||||
{if $module.POS}
|
||||
<div class="col-md-3 control-label">
|
||||
<strong>Fyzicky v kase: </strong> {$in_pos|format_price}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-md-{if $module.POS}}2{else}5{/if}">
|
||||
<a href="#" data-form-add class="btn btn-sm btn-success pull-left"><span class="glyphicon glyphicon-plus"></span> Přidat platbu</a>
|
||||
</div>
|
||||
|
||||
{ifmodule BANK_AUTO_PAYMENTS__FIO_BANK}
|
||||
<div class="col-md-2 col-md-offset-1 text-right">
|
||||
<button type="submit" name="acn" value="fioCheckPayments" href="" class="btn btn-sm btn-success btn-block">
|
||||
<span class="glyphicon glyphicon-credit-card"></span> Zkontrolovat platby
|
||||
</button>
|
||||
</div>
|
||||
{elsemodule}
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
{/ifmodule}
|
||||
|
||||
{if $module.POS}
|
||||
<div class="col-md-2 text-right">
|
||||
<a href="launch.php?s=printCenter.php&type=order&ID=1&set=POSClosure&date_from={$smarty.get.dateFrom}&date_to={$smarty.get.dateTo}&{if $specific_pos}specific_pos={$specific_pos}{/if}"
|
||||
class="btn btn-sm btn-primary btn-block"
|
||||
target="_blank">
|
||||
<span class="glyphicon glyphicon-print"></span> Vytisknout pokladní uzávěrku
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $module.POS || $module.NEW_POS}
|
||||
<div class="col-md-2 {if !$module.POS}col-md-offset-2{/if}">
|
||||
<button type='button' class="btn btn-sm btn-block btn-primary" name="action" value="multiInvoicePrint" onclick='$.redirectPost({ url:"launch.php?s=printCenter.php&type=order&set=order&", data: $form.serializeArray(), target:"Tisk faktur" })'> <span class="glyphicon glyphicon-print"></span> Vytisknout faktury</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="addItem">
|
||||
<div class="panel panel-heading panel-header">
|
||||
<div class="row">
|
||||
<div class="col-md-3 control-label">
|
||||
<strong>Poznámka</strong>
|
||||
</div>
|
||||
<div class="col-md-2 control-label">
|
||||
<strong>Přijato</strong>
|
||||
</div>
|
||||
<div class="col-md-2 control-label">
|
||||
<strong>Vydáno</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="">
|
||||
<div class="panel panel-body panel-send" id="orderPayments">
|
||||
<div class="form-group" data-form-new>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<input type="text" class="form-control input-sm" name="data[orderPayments][0][note]" value=""/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="data[orderPayments][0][inserted]" value=""/>
|
||||
<span class="input-group-addon">{$dbcfg.currency}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="data[orderPayments][0][choosed]" value=""/>
|
||||
<span class="input-group-addon">{$dbcfg.currency}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<input type="submit" name="Submit" class="btn btn-sm btn-primary pull-left" value="Přidat" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" style="display:none" name="cash" id="order_payments_show_in_cash" {if $smarty.get.cash || $smarty.post.cash}checked{/if}>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
if ($form) {
|
||||
$form.on('keypress', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
$form.find('input[type="submit"][name="Submit"]').trigger('click');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
initForm({
|
||||
selector: '#orderPayments',
|
||||
beforeAdd: function(original){
|
||||
var $new = original();
|
||||
$new.find(':input[type=text]').val('');
|
||||
$new.find(':input[type=submit]').remove('');
|
||||
}
|
||||
});
|
||||
{*
|
||||
var checked = JSON.parse(localStorage.getItem("order_payments_show_in_cash"));
|
||||
if (checked == true){
|
||||
{if !$smarty.get.cash}
|
||||
window.location.href = window.location.href+'&cash=1';
|
||||
{/if}
|
||||
}
|
||||
*}
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
125
admin/templates/list/orders.tpl
Normal file
125
admin/templates/list/orders.tpl
Normal file
@@ -0,0 +1,125 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block 'table-class'}table table-striped{/block}
|
||||
|
||||
{block "list-filter" append}
|
||||
{if !empty($sold)}
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
Prodejnost: <strong>Celkem</strong>: {$sold_total}
|
||||
</div>
|
||||
{foreach $sold as $year}
|
||||
<div class="col-md-2">
|
||||
<strong>{$year.year}</strong>: {$year.count}ks
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block content}
|
||||
<style>
|
||||
{block "list-styles"}
|
||||
/* Delivery type statuses */
|
||||
{foreach $styles as $id => $style}
|
||||
{if $style.value}
|
||||
.badge-{$id} {
|
||||
background-color: {$style.value};
|
||||
border-color: {$style.value};
|
||||
}
|
||||
{else}
|
||||
.badge-{$id} {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
/* Order statuses */
|
||||
{foreach getOrderStatuses() as $id => $status}
|
||||
{if $dbcfg.highlight_order_rows == "Y"}
|
||||
{if $status.color}
|
||||
.status{$id}, .status{$id} td {
|
||||
background-color: {$status.color|color_lighter:13};
|
||||
}
|
||||
|
||||
.status{$id}:hover, .status{$id}:hover td {
|
||||
background-color: {$status.color|color_lighter:10};
|
||||
}
|
||||
{/if}
|
||||
tr.storno, tr.storno td {
|
||||
background-color: #f3cacb;
|
||||
}
|
||||
|
||||
tr.storno:hover, tr.storno:hover td {
|
||||
background-color: {'#f3cacb'|color_lighter:-5};
|
||||
}
|
||||
{/if}
|
||||
{if $status.color and $id != 0}
|
||||
.badge.status-{$id} {
|
||||
background-color: #{$status.color};
|
||||
border-color: #{$status.color};
|
||||
}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
</style>
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
|
||||
{block buttons prepend}
|
||||
{$sum = $view->getTotalPriceSum()}
|
||||
{if $sum}
|
||||
<div class="well well-sm m-b-0">
|
||||
Cena celkem: {$sum|format_price}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
{block js_autoreload}
|
||||
{if !$dbcfg.autoreload_orders_list || $dbcfg.autoreload_orders_list == "Y"}
|
||||
var minute_timeout = false;
|
||||
var second_timeout = false;
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
minute_timeout = true;
|
||||
if (minute_timeout && second_timeout)
|
||||
{
|
||||
customRefresh();
|
||||
window.location.reload();
|
||||
}
|
||||
}, 60000);
|
||||
|
||||
reloader();
|
||||
|
||||
function reloader()
|
||||
{
|
||||
resetTimer('orderList', 20000, function()
|
||||
{
|
||||
second_timeout = true;
|
||||
if (minute_timeout && second_timeout)
|
||||
{
|
||||
customRefresh();
|
||||
window.location.reload();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(document).mousedown(function(){
|
||||
reloader();
|
||||
});
|
||||
$(document).keydown(function(){
|
||||
reloader();
|
||||
});
|
||||
{/if}
|
||||
{/block}
|
||||
{/block}
|
||||
</script>
|
||||
149
admin/templates/list/ordersMassProcess.tpl
Normal file
149
admin/templates/list/ordersMassProcess.tpl
Normal file
@@ -0,0 +1,149 @@
|
||||
{extends "list.tpl"}
|
||||
|
||||
{block 'list-header-check'}
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" name="select-all" id="select-all" checked/>
|
||||
<label for="select-all">{*Zaškrtnout vše*}</label>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block 'table-class'}table table-mass-process{/block}
|
||||
|
||||
{block content}
|
||||
<style>
|
||||
{block "list-styles"}
|
||||
/* Order statuses */
|
||||
{foreach getOrderStatuses() as $id => $status}
|
||||
{if $status.color and $id != 0}
|
||||
.badge.status-{$id} {
|
||||
background-color: #{$status.color};
|
||||
border-color: #{$status.color};
|
||||
}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/block}
|
||||
</style>
|
||||
|
||||
<form method="post" id="balikobot-form">
|
||||
{$smarty.block.parent}
|
||||
</form>
|
||||
<script>
|
||||
var $form = $('#balikobot-form');
|
||||
$('#select-all').click(function(event) {
|
||||
if (this.checked) {
|
||||
$form.find(':checkbox').each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
} else {
|
||||
$form.find(':checkbox').each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var unchecked = localStorage.getItem('listcheckedbalikonos');
|
||||
if (unchecked) {
|
||||
unchecked = JSON.parse(unchecked);
|
||||
for (var i = 0; i < unchecked.length; i++) {
|
||||
$("[value='" + unchecked[i] + "']").prop('checked', false);
|
||||
}
|
||||
localStorage.removeItem('listcheckedbalikonos');
|
||||
}
|
||||
|
||||
$("thead a").click(function() {
|
||||
var orders = $("[name='orders[]']:not(:checked)");
|
||||
|
||||
var unchecked = [];
|
||||
for (var i = 0; i < orders.length; i++) {
|
||||
unchecked.push(orders.eq(i).val());
|
||||
}
|
||||
|
||||
localStorage.setItem('listcheckedbalikonos', JSON.stringify(unchecked));
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="pagination-sticky">
|
||||
{include "utils/pager.tpl"}
|
||||
|
||||
<div class="pagination-buttons">
|
||||
{block buttons}
|
||||
<div class="{if $pageCount > 5}dropup{else}dropdown{/if} dropup-actions">
|
||||
<button class="btn dropdown-toggle" type="button" id="massProcessDropdownTrigger" data-toggle="dropdown">
|
||||
Tisk
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="adminActionsDropdownTrigger" id="massProcessDropdown">
|
||||
{block buttons_dropup}
|
||||
<li>
|
||||
<a href=""
|
||||
onclick='$.redirectPost({ url:"launch.php?s=printCenter.php&type=order&set=order&", data:$form.serializeArray(), target:"Tisk faktur" });return false;'>
|
||||
HTML faktury</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""
|
||||
onclick='$.redirectPost({ url:"launch.php?s=printCenterPDF.php&type=order&set=multiplePDF&invoice_force=2", data:$form.serializeArray(), target:"Tisk faktur" });return false;'>
|
||||
PDF faktury</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""
|
||||
onclick='$.redirectPost({ url:"launch.php?s=printCenter.php&type=order&set=order&template=orderViewprintPickingList.tpl", data:$form.serializeArray(), target:"Tisk vychystávacího listu" });return false;'>
|
||||
Vychystávací listy</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""
|
||||
onclick='$.redirectPost({ url:"launch.php?s=printCenter.php&type=orders&template=massOrderViewprintPickingList.tpl", data:$form.serializeArray(), target:"Tisk hromadného vychystávacího listu" });return false;'>
|
||||
Hromadný vychystávací list</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""
|
||||
onclick='$.redirectPost({ url:"launch.php?s=printCenter.php&type=order&recap=1", data:$form.serializeArray(), target:"Tisk rekapitulace objednávky" });return false;'>
|
||||
Rekapitulace objednávky</a>
|
||||
</li>
|
||||
{/block}
|
||||
</ul>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block delivery_buttons}{/block}
|
||||
|
||||
{if !$smarty.get.balikonos}
|
||||
<div class="status-change">
|
||||
<div class="chosen-wrapper">
|
||||
{if $pageCount <= 5}
|
||||
{$css_class = "selecter selecter-down"}
|
||||
{else}
|
||||
{$css_class = "selecter selecter-up"}
|
||||
{/if}
|
||||
{print_select name="status" var=$cfg.Order.Status.global selected=$cfg.Modules.orders_mass_process.invoice_default_to
|
||||
param='form="balikobot-form"' class=$css_class}
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" name="donotsend" value="ON" class="check" id="donotsend">
|
||||
<label for="donotsend"><strong>Ne</strong>odesílat zákazníkovi e-mail</label>
|
||||
</div>
|
||||
|
||||
<button type='submit' name=acn class="btn btn-primary" value="multiInvoiceChangeStatus" form="balikobot-form"
|
||||
onclick="if (!confirm('Opravdu chcete změnit stav?')) return false;">Změnit stav
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if findModule("balikonos")}
|
||||
{if $cfg.Modules.balikonos.provider === 'balikobot'}
|
||||
<button type='button' class="btn btn-primary" name=action value=balikonos data-submit-loading
|
||||
onclick='$.redirectPost({ url:"launch.php?s=list.php&type=balikobot&action=insert{if $smarty.get.balikobot_user}&balikobot_user={$smarty.get.balikobot_user}{/if}", data:$form.serializeArray() })'>
|
||||
Nahrát do Balíkobota
|
||||
</button>
|
||||
{else}
|
||||
<button type='button' class="btn btn-primary" name=action value=balikonos data-submit-loading
|
||||
onclick='$.redirectPost({ url:"launch.php?s=list.php&type=balikonos&action=insert", data:$form.serializeArray() })'>
|
||||
Nahrát do Balíkonoše
|
||||
</button>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
181
admin/templates/list/photos.tpl
Normal file
181
admin/templates/list/photos.tpl
Normal file
@@ -0,0 +1,181 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block "list-filter"}
|
||||
{/block}
|
||||
|
||||
{block "list-wrapper-class"}list-photos{/block}
|
||||
{block "list-panel-class"}{/block}
|
||||
|
||||
{block listTable}
|
||||
<div class="row">
|
||||
<form data-photos-container class="photos-selection-container">
|
||||
<div class="{if $searchWnd}col-md-2 col-sm-3 col-xs-6{else}col-md-1 col-sm-2 col-xs-4{/if}" data-uploader-wrapper>
|
||||
<div class="file-uploader" data-file-upload>
|
||||
<div id="file-uploader"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-file-upload-list
|
||||
class="{if $searchWnd}col-md-2 col-sm-3 col-xs-6{else}col-md-1 col-sm-2 col-xs-4{/if} photos photos-file-upload-list"></div>
|
||||
|
||||
{foreach from=$SQL item=image}
|
||||
<div class="{if $searchWnd}col-md-2 col-sm-3 col-xs-6{else}col-md-1 col-sm-2 col-xs-4{/if} photos">
|
||||
{if getVal('multiSelect')}
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" id="checkbox_{$image.id}" data-photo="{$image.id}" class="check">
|
||||
<label for="checkbox_{$image.id}"></label>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="thumbnail">
|
||||
{if $image.id_video}
|
||||
<span class="glyphicon glyphicon-film"></span>
|
||||
{/if}
|
||||
{if $image.image_tablet || $image.image_mobile}
|
||||
<span class="glyphicon glyphicon-phone"></span>
|
||||
{/if}
|
||||
<a href="{if getVal('multiSelect')}#photo{else}javascript:{if $searchWnd}searchResult('{$image.id}'){else}nw('photo', '{$image.id}'){/if};{/if}">
|
||||
<img src="{static_url url=$image.img.src}" class="img-rounded img-responsive" alt="">
|
||||
</a>
|
||||
{if $image.descr}
|
||||
<div class="caption text-center list_item">{$image.descr}</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</form>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="row footer window-btns">
|
||||
<div class="col-xs-8">
|
||||
{include "utils/pager.tpl"}
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
{if getVal('multiSelect')}
|
||||
<button class="btn btn-primary btn-block submitPhotosSelectionBtn" data-submit-selection-btn>Vybrat obrázky</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{* Image uploader *}
|
||||
{block js append}
|
||||
<script src="/admin/static/fineuploader/jquery.fine-uploader.min.js"></script>
|
||||
<script type="text/template" id="qq-simple-thumbnails-template">
|
||||
<div class="qq-uploader-selector qq-uploader">
|
||||
<div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone>
|
||||
<div>
|
||||
<span></span>Přesuňte soubory sem
|
||||
</div>
|
||||
</div>
|
||||
<div class="qq-upload-button-selector">
|
||||
<p>
|
||||
<strong>Nahrát obrázek{ifmodule VIDEOS} nebo video{/ifmodule}</strong>
|
||||
<small>podporované formáty jsou .jpg, .jpeg, .png, .webp, .avif, .gif{if {find_module name='videos'}}, .mp4, .mkv, .m4a{/if}</small>
|
||||
</p>
|
||||
</div>
|
||||
<span class="qq-drop-processing-selector qq-drop-processing">
|
||||
<span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"></span>
|
||||
<span>Zpracovávám soubory...</span>
|
||||
</span>
|
||||
|
||||
<div class="qq-upload-list-selector qq-upload-list">
|
||||
<div class="qq-upload-instance">
|
||||
<span class="qq-upload-spinner-selector qq-upload-spinner"></span>
|
||||
<input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
|
||||
<a class="qq-upload-cancel-selector qq-upload-cancel" href="#">Zrušit <span class="fc icons_close"></span></a>
|
||||
<span class="qq-upload-status-text-selector qq-upload-status-text"></span>
|
||||
<span class="qq-upload-file-selector qq-upload-file"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
// Keep in sync with engine/admin/templates/adminPhotos.tpl !!
|
||||
var $el = $('[data-file-upload]');
|
||||
var $fileUploader = $el.find('#file-uploader');
|
||||
var extensions = ['jpeg', 'jpg', 'png', 'svg', 'webp', 'avif', 'gif'];
|
||||
{ifModule VIDEOS}
|
||||
extensions.push('mp4', 'mkv', 'm4a', 'm4v', 'mov');
|
||||
{/ifModule}
|
||||
|
||||
var uploaderOptions = {
|
||||
template: 'qq-simple-thumbnails-template',
|
||||
listElement: $('[data-file-upload-list]')[0],
|
||||
thumbnails: {
|
||||
placeholders: {
|
||||
waitingPath: 'static/fineuploader/placeholders/waiting-generic.png',
|
||||
notAvailablePath: 'static/fineuploader/placeholders/not_available-generic.png',
|
||||
},
|
||||
},
|
||||
request: {
|
||||
inputName: 'uploader',
|
||||
endpoint: 'launch.php?s=list.php&type=photos&acn=uploadImage&photos_type={$smarty.get.photos_type}',
|
||||
},
|
||||
blobProperties: {
|
||||
name: 'filename',
|
||||
},
|
||||
validation: {
|
||||
allowedExtensions: extensions,
|
||||
},
|
||||
callbacks: {
|
||||
onComplete: function(id, name, response) {
|
||||
var imageId = response.id;
|
||||
|
||||
if (response.success) {
|
||||
var href = '#photo';
|
||||
{if !getVal('multiSelect')}
|
||||
href = "javascript:{if $searchWnd}searchResult('" + imageId + "'){else}nw('photo', '" + imageId + "'){/if};";
|
||||
{/if}
|
||||
|
||||
var $photo = $('<div class="{if $searchWnd}col-md-2 col-sm-3 col-xs-6{else}col-md-1 col-sm-2 col-xs-4{/if} photos">\n' +
|
||||
'{if getVal('multiSelect')}<div class="checkbox">' +
|
||||
'<input type="checkbox" id="checkbox_' + imageId + '" data-photo="' + imageId + '" class="check" checked="checked">' +
|
||||
'<label for="checkbox_' + imageId + '"></label></div>{/if}' +
|
||||
' <div class="thumbnail">\n' +
|
||||
' <a href="' + href + '">\n' +
|
||||
' <img src="" class="img-rounded img-responsive" alt="">\n' +
|
||||
' </a>' +
|
||||
' <div class="caption text-center list_item">' + name + '</div>' +
|
||||
' </div>' +
|
||||
' </div>');
|
||||
$fileUploader.fineUploader('drawThumbnail', id, $photo.find('img'), 250, false);
|
||||
$('[data-uploader-wrapper]').after($photo);
|
||||
}
|
||||
},
|
||||
onAllComplete: function(succeeded, failed) {
|
||||
if (!failed.length) {
|
||||
$('[data-file-upload-list]').empty();
|
||||
}
|
||||
},
|
||||
},
|
||||
maxConnections: 1,
|
||||
};
|
||||
|
||||
$fileUploader.fineUploader(uploaderOptions);
|
||||
|
||||
{if getVal('multiSelect')}
|
||||
var $photosContainer = $('[data-photos-container]');
|
||||
$photosContainer.on('click', '.thumbnail > a', function(event) {
|
||||
event.preventDefault();
|
||||
var $checkbox = $(this).closest('.photos').find('input[type=checkbox]');
|
||||
$checkbox.prop('checked', !$checkbox.prop('checked'));
|
||||
});
|
||||
|
||||
$('[data-submit-selection-btn]').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var selectedIDs = [];
|
||||
$photosContainer.find('[data-photo]:checked').each(function(index, el) {
|
||||
selectedIDs.push($(el).attr('data-photo'));
|
||||
});
|
||||
searchResult(selectedIDs);
|
||||
});
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
13
admin/templates/list/pos.tpl
Normal file
13
admin/templates/list/pos.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block name="list-filter"}
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
{ifmodule POS}
|
||||
<div class="col-md-3">
|
||||
<strong>Fyzicky v kase: </strong>{$var.in_pos|format_price}
|
||||
</div>
|
||||
{/ifmodule}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
767
admin/templates/list/products.massModification.fields.tpl
Normal file
767
admin/templates/list/products.massModification.fields.tpl
Normal file
@@ -0,0 +1,767 @@
|
||||
{function printDefaultField style="" maxlength="" attributes=""}
|
||||
<input data-type="{$namefield}" type="text" class="input full-size" name="{$item.input[0]}[{$IDpr}]" value="{$row[$item.field]}" onchange="update(this,'{$IDpr}')" {if $maxlength}maxlength="{$maxlength}"{/if} {if $style}style="{$style}"{/if} {$attributes} />
|
||||
{/function}
|
||||
|
||||
{function printCustomDataField style="" maxlength="" attributes=""}
|
||||
<input data-type="{$namefield}" type="text" class="input full-size" name="{$item.input[0]}[{$IDpr}][{$item.input[1]}]" value="{$row[$item.field]}" onchange="update(this,'{$IDpr}')" {if $maxlength}maxlength="{$maxlength}"{/if} {if $style}style="{$style}"{/if} {$attributes} />
|
||||
{/function}
|
||||
|
||||
{function printUnitSelection}
|
||||
{if $param.unit|count > 1}
|
||||
<span class="param-unit">
|
||||
<select class='selecter unit noflex' name="parameters[{$IDpr}][{$IDp}][{$param.value_id}][unit]" {$event}>
|
||||
{foreach $param.unit as $key => $unit}
|
||||
<option value="{$unit}" {if $unit == $param.row.unit}selected{/if}>{$unit}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</span>
|
||||
{else}
|
||||
{$param.unit[0]}
|
||||
{/if}
|
||||
{/function}
|
||||
|
||||
{function printField}
|
||||
{$ret = $object->printEditField($key, $row, $IDpr)}
|
||||
|
||||
{if $ret !== false && mb_substr($namefield, 0, 10) === 'figureFeed'}
|
||||
{$data = $view->getFeedData($item.feed.id, $IDpr)}
|
||||
{switch $item.item}
|
||||
{case "title"}
|
||||
<input data-type="{$namefield}" type="text" class="input full-size" name="feed[{$IDpr}][{$item.feed.id}][{$item.item}]" value="{$data[$item.item]}" onchange="update(this,'{$IDpr}')" maxlength="255" />
|
||||
{/case}
|
||||
{case "active"}
|
||||
{$figures = ['' => 'Nerozhoduje', '1' => 'Ano', '0' => 'Ne']}
|
||||
{if !$IDpr}
|
||||
{$figures['-1'] = "Vyberte"}
|
||||
{$data[$item.item] = "-1"}
|
||||
{/if}
|
||||
{$param = "onchange='update(this, {$IDpr})'"}
|
||||
{print_select name="feed[{$IDpr}][{$item.feed.id}][{$item.item}]" var=$figures selected=$data[$item.item] param=$param}
|
||||
{/case}
|
||||
{case "cpc"}
|
||||
<input type="text" class="input" name="feed[{$IDpr}][{$item.feed.id}][{$item.item}]" size="10" maxlength="50" value="{$data[$item.item]}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
{case "gift_text"}
|
||||
<input type="text" class="input" name="feed[{$IDpr}][{$item.feed.id}][{$item.item}]" maxlength="160" value="{$data[$item.item]}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
{case "id_section"}
|
||||
<select class="ajax-selecter" name="feed[{$IDpr}][{$item.feed.id}][{$item.item}]" data-type="feed_{if $item.feed.section_mapping}{$item.feed.section_mapping}{else}{$item.feed.type}{/if}" data-text-single="Vyberte sekci">
|
||||
<option value="{$data[$item.item]}" selected>{$data['section_name']}</option>
|
||||
</select>
|
||||
{/case}
|
||||
{default}
|
||||
{printDefaultField}
|
||||
{/switch}
|
||||
|
||||
{elseif $ret !== false && mb_strpos($namefield, 'storeItems') !== false}
|
||||
{$data = $view->getStoresData($item.store.id, $IDpr)}
|
||||
<input data-type="{$namefield}" type="text" class="input full-size" name="store[{$IDpr}][{$item.store.id}][{$item.item}]" value="{$data[$item.item]}" onchange="update(this,'{$IDpr}')"/>
|
||||
{elseif $ret !== false && mb_substr($namefield, 0, 15) === 'figurePriceList'}
|
||||
{$data = $view->getPriceListData($item.priceList.id, $IDpr)}
|
||||
<input data-type="{$namefield}" type="text" class="input full-size" name="priceList[{$IDpr}][{$item.priceList.id}][{$item.item}]" value="{$data[$item.item]}" onchange="update(this,'{$IDpr}')" maxlength="255" />
|
||||
{elseif mb_substr($namefield, 0, 15) === 'figureParameter'}
|
||||
{$IDp = $item.parameter}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-id_parameter="{$IDp}" data-multi="item">
|
||||
{if findModule('products_parameters', 'configurations')}
|
||||
<div>
|
||||
<label>
|
||||
<input type="hidden" name="parameters_configurations[{$IDpr}][{$IDp}][enabled]" value="N">
|
||||
<input type="checkbox" name="parameters_configurations[{$IDpr}][{$IDp}][enabled]" value="Y"
|
||||
{if $view->productHasParametersConfigurations($IDpr, $IDp)}checked="checked"{/if}
|
||||
onchange="update(this, '{$IDpr}')">
|
||||
Volitelné u produktu
|
||||
<a class="help-tip" data-toggle="tooltip"
|
||||
title="Požadovat od zákazníka vybrat hodnotu parametru před vložením do košíku. Zvolíte-li příplatek, tato částka se přičte k ceně produktu.">
|
||||
<i class="bi bi-question-circle"></i>
|
||||
</a>
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
{foreach $ret as $key => $param}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$param.value_id}">
|
||||
{if $param.value_type == 'list'}
|
||||
<select type="text"
|
||||
name="parameters[{$IDpr}][{$IDp}][{$param.value_id}][value]"
|
||||
class="selecter"
|
||||
data-preload="ParametersValuesOnly"
|
||||
data-filter-type="autocomplete" data-autocomplete="parametersListValuesByParameter"
|
||||
data-autocomplete-params="id_parameter={$IDp}" onchange="update(this,'{$IDpr}')">
|
||||
<option value=""></option>
|
||||
<option value="{$param.value}" selected="selected"></option>
|
||||
</select>
|
||||
{else}
|
||||
<input type="text" class="input fullflex" style="min-width: 50px;" name="parameters[{$IDpr}][{$IDp}][{$param.value_id}][value]" size="10" maxlength="255" value="{$param.value}"/>
|
||||
{/if}
|
||||
<div class="unit">{printUnitSelection}</div>
|
||||
{if findModule('products_parameters', 'configurations')}
|
||||
<label>
|
||||
Příplatek:
|
||||
<input type="text" style="width: 60px;" class="input" name="parameters[{$IDpr}][{$IDp}][{$param.value_id}][price]"
|
||||
size="10" maxlength="50" value="{$param.row.configuration_price}" onchange="update(this,'{$IDpr}')"/>
|
||||
</label>
|
||||
{/if}
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="parameters[{$IDpr}][{$IDp}][{$param.value_id}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat parametr"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat parametr"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
{elseif $ret !== false}
|
||||
{switch $namefield}
|
||||
{case "figureProducer"}
|
||||
{$name = $view->getProducerName($row.producer)}
|
||||
{print_select name="producer[{$IDpr}]" var=[$row.producer => $view->getProducerName($row.producer)] param="data-type='producers' data-value='{$name}'" class="ajax-selecter"}
|
||||
{/case}
|
||||
{case "figureDiscount"}
|
||||
{printDefaultField style="width: calc(100% - 2em);"} %
|
||||
{/case}
|
||||
|
||||
{case "figureLongDescr"}
|
||||
<textarea name="longDescr[{$IDpr}]" rows="14" cols="30">{$row.long_descr}</textarea>
|
||||
{insert_wysiwyg target="longDescr[{$IDpr}]" type="ProductDescription"}
|
||||
<script type="text/javascript">
|
||||
CKEDITOR.instances['longDescr[{$IDpr}]'].on('change', function() {
|
||||
var me = this;
|
||||
resetTimer('longDescr', 200, function() {
|
||||
me.updateElement();
|
||||
update(me.element.$, '{$IDpr}');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/case}
|
||||
{case "figureParamsDescr"}
|
||||
<textarea name="paramsDescr[{$IDpr}]" rows="14" cols="30">{$row.parameters}</textarea>
|
||||
{insert_wysiwyg target="paramsDescr[{$IDpr}]" type="ProductDescription"}
|
||||
<script type="text/javascript">
|
||||
CKEDITOR.instances['paramsDescr[{$IDpr}]'].on('change', function() {
|
||||
var me = this;
|
||||
resetTimer('paramsDescr', 200, function() {
|
||||
me.updateElement();
|
||||
update(me.element.$, '{$IDpr}');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/case}
|
||||
{case "figureFigure"}
|
||||
{$figures = ['Y' => 'Viditelné', 'N' => 'Skryté', 'O' => 'Prodej ukončen']}
|
||||
{if !$row.figure}
|
||||
{$figures['0'] = "Nezvoleno"}
|
||||
{$row.figure = "0"}
|
||||
{/if}
|
||||
{$param = "id='figures{$IDpr}' onchange='update(this, {$IDpr})'"}
|
||||
{print_select name="figures[{$IDpr}]" var=$figures selected=$row.figure param=$param}
|
||||
{/case}
|
||||
|
||||
{case 'figureCharge'}
|
||||
<div style="white-space: nowrap;">
|
||||
<div style="float: left;">
|
||||
{$param = "onchange='update(this, {$IDpr})'"}
|
||||
{print_select name="charge_id[{$IDpr}]" var=$CHARGES selected=$row.charge_id param=$param}
|
||||
</div>
|
||||
<div>
|
||||
<span class="small" for="charge_included{$IDpr}" style="padding: 0px 3px; opacity:.5;"> included:</span>
|
||||
<input type="checkbox" id="charge_included{$IDpr}" name="charge_included[{$IDpr}]"
|
||||
onchange="update(this,'{$IDpr}')" value="Y" {$row['charge_included']|checked:'Y'} />
|
||||
</div>
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case "figureCollections"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret.own as $key => $product}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$key}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="collections[{$IDpr}][{$key}][id_product_related]" data-type="product_id">
|
||||
<option value="{$product.id}" selected>{$product.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="collections[{$IDpr}][{$key}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
{if !empty($ret.others)}<br /><strong>v cizích:</strong>{/if}
|
||||
{foreach $ret.others as $product}
|
||||
<a href="javascript:nw('product', '{$product.id}', 'noopener');" tabindex="-1">
|
||||
{$product.title}
|
||||
</a>
|
||||
<br />
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case "figureProductSets"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $key => $product}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$key}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="sets[{$IDpr}][{$key}][id_product_set]" data-type="product_id">
|
||||
<option value="{$product.id}" selected>{$product.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="sets[{$IDpr}][{$key}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case "figureProductGifts"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $key => $product}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$key}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="gifts[{$IDpr}][{$key}][id_product_gift]" data-type="product_id">
|
||||
<option value="{$product.id}" selected>{$product.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="gifts[{$IDpr}][{$key}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case "figureProductLabels"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $key => $label}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$key}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="labels[{$IDpr}][{$key}][id_label]" data-type="labels">
|
||||
<option value="{$label.id}" selected>{$label.name}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="labels[{$IDpr}][{$key}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case "figurePhotos"}
|
||||
<div class="photos-items" style="display: inline; float: left;" data-id="{$IDpr}">
|
||||
<input type="hidden" class="prod-id" name="photo[{$IDpr}]" value="{$IDpr}" onchange="update(this,'{$IDpr}')">
|
||||
<span class="photos-row-form" style="float:left; display:none">
|
||||
<input type="hidden" class="photo-id" name="photos[{$IDpr}][][id_photo]" value="">
|
||||
{if $IDpr}
|
||||
<a style="cursor: pointer; position: relative;top: 25px;left: 65px;">
|
||||
<span class="list-no glyphicon glyphicon-remove-circle photos-del">
|
||||
<i>Smazat obrázek</i>
|
||||
</span>
|
||||
</a>
|
||||
{/if}
|
||||
<span class="thumbnail" style="margin: 0"><img class="img-rounded" style="height:80px !important;" src="" title="Obrázek č. " /></span>
|
||||
{if !empty($cfg.Photo.kind)}
|
||||
<span>
|
||||
<select class="selecter" name="photos[{$IDpr}][{$key}][show_in_lead]">
|
||||
{foreach $cfg.Photo.kind as $type => $name}
|
||||
<option {if $photo.show_in_lead == $type}selected{/if} value="{$type}">{$name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
<div style="float:right ">
|
||||
{* <input type="hidden" class="input photo-name" name="photos[{$IDpr}][]" id="photo{$IDpr}" size="45" maxlength="80" value="" onchange="update(this,'{$IDpr}')" />*}
|
||||
<a href="" title="Vyhledat obrázek" class="btn btn-sm add-photo {if $IDpr}disabled{/if}" id="photo{$IDpr}">
|
||||
<span class=" glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
</div>
|
||||
{foreach $ret as $key => $photo}
|
||||
<span class="photos-row" style="float:left;max-width: 88px !important;">
|
||||
<input type="hidden" name="photos[{$IDpr}][{$key}][id_photo]" value="{$photo.id}">
|
||||
<a style="cursor: pointer; position: relative;top: 25px;left: 65px;">
|
||||
<span class="list-no glyphicon glyphicon-remove-circle photos-del disabled">
|
||||
<i>Smazat obrázek</i>
|
||||
</span>
|
||||
</a>
|
||||
<span class="thumbnail" style="margin: 0">
|
||||
<img class="img-rounded" style="height:80px !important;" src="{$photo.src}" title="Obrázek č. {$photo.id}" />
|
||||
</span>
|
||||
{if !empty($cfg.Photo.kind)}
|
||||
<span>
|
||||
<select class="selecter" name="photos[{$IDpr}][{$key}][show_in_lead]">
|
||||
{foreach $cfg.Photo.kind as $type => $name}
|
||||
<option {if $photo.show_in_lead == $type}selected{/if} value="{$type}">{$name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureRelated"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $key => $product}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$key}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="products_related[{$IDpr}][{$key}][id_rel_product]" data-type="product_id">
|
||||
<option value="{$product.id_rel_product}" selected>{$product.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
{if $view->productsRelatedTypes}
|
||||
<div style="width:100px !important;">
|
||||
{print_select var=$view->productsRelatedTypes name="products_related[{$IDpr}][{$key}][type]" selected=$product.type}
|
||||
</div>
|
||||
{/if}
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="products_related[{$IDpr}][{$key}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat sekci"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat sekci"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
{/case}
|
||||
{case "figureMetaTitle"}
|
||||
{printDefaultField maxlength=70}
|
||||
{/case}
|
||||
{case "figureMetaDescription"}
|
||||
<textarea class="form-control input-sm" name="metaDescription[{$IDpr}]" maxlength="250" onclick="update(this,'{$IDpr}')">{$row.meta_description}</textarea>
|
||||
{/case}
|
||||
{case "figureMetaKeywords"}
|
||||
{printDefaultField maxlength=100}
|
||||
{/case}
|
||||
{case "figureAttachments"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach array_merge($ret, [[]]) as $key => $attach}
|
||||
<div class="section-row row attachments" style="margin-left: 0;" data-multi="row" data-multi-id="{$attach@iteration}">
|
||||
<div class="col-md-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="input" style="width: 220px;" id="attachLink" name="attachments[{$IDpr}][{$attach@iteration}][link]" value="{$attach.link}" placeholder="{'attachmentNote'|translate:"products"}"/>
|
||||
<div class="input-group-btn attach" style="width: 20px;">
|
||||
{insert_file_browse link="attachLink"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="input" style="width: 220px;" name="attachments[{$IDpr}][{$attach@iteration}][title]" value="{$attach.title}" placeholder="Název přílohy"/>
|
||||
</div>
|
||||
{ifmodule ATTACHMENTS__ATTACHMENTS_TYPES}
|
||||
<div class="col-md-4">
|
||||
<select title="Vyberte typ" name="attachments[{$IDpr}][{$attach@iteration}][type]" class="selecter">
|
||||
{foreach $cfg['Modules']['attachments']['attachments_types'] as $code => $label}
|
||||
<option value="{$code}" {if $code == $attach.type}selected{/if}>{$label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/ifmodule}
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="attachments[{$IDpr}][{$attach@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat článek"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat článek"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "productsLinks"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach array_merge($ret, [[]]) as $key => $link}
|
||||
<div class="section-row row attachments" style="margin-left: 0;" data-multi="row" data-multi-id="{$link@iteration}">
|
||||
<div class="col-md-5">
|
||||
<div class="input-group">
|
||||
<input type="text" class="input" style="width: 250px;" id="attachLink" name="links[{$IDpr}][{$link@iteration}][link]" value="{$link.link}" placeholder="{'attachmentNote'|translate:"products"}" />
|
||||
<div class="input-group-btn attach" style="width: 20px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="input" style="width: 230px;" name="links[{$IDpr}][{$link@iteration}][title]" value="{$link.title}" placeholder="Název odkazu"/>
|
||||
</div>
|
||||
{if !empty($cfg.Links.Types)}
|
||||
<div class="col-md-2">
|
||||
<select title="{'linkType'|translate}" name="links[{$IDpr}][{$link@iteration}][type]" class="selecter">
|
||||
{foreach $cfg.Links.Types as $name => $title}
|
||||
<option value="{$name}" {if $link.type == $name}selected{/if}>{$title}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="links[{$IDpr}][{$link@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat článek"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat článek"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureCategory"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $key => $section}
|
||||
<div class="section-row" data-multi="row" data-multi-id="{$section.id_section}">
|
||||
<div class="fullflex">
|
||||
{$section = $view->getSectionInfo($section.id_section)}
|
||||
<select data-visibleOnly="false" class="ajax-selecter" name="sections[{$IDpr}][{$section.id_section}][id_section]" data-type="categories" data-value="{$section.name}">
|
||||
<option value="{$section.id_section}" selected>{$section.path}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="sections[{$IDpr}][{$section.id_section}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat sekci"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat sekci"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureTemplates"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $template}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$template@iteration}">
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="templates[{$IDpr}][{$template@iteration}][id_template]" data-type="templates">
|
||||
<option value="{$template.id}" selected>{$template.name}</option>
|
||||
</select>
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="templates[{$IDpr}][{$template@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat šablonu"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat šablonu"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureQuantityDiscount"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $discount}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$discount@iteration}">
|
||||
<div class="fullflex">
|
||||
od <input type="text" class="input fullflex" name="quantity_discount[{$IDpr}][{$discount@iteration}][pieces]" size="15" maxlength="255" value="{$discount.pieces}"/> ks
|
||||
<input type="text" class="input fullflex" name="quantity_discount[{$IDpr}][{$discount@iteration}][discount]" size="15" maxlength="255" value="{$discount.discount}"/> %
|
||||
<input type="hidden" name="quantity_discount[{$IDpr}][{$discount@iteration}][id]" value="{$discount.id}">
|
||||
</div>
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="quantity_discount[{$IDpr}][{$discount@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat slevu"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat slevu"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureCodeOfSuppliers"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $code}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$code['id']}">
|
||||
<div style="clear: both;">
|
||||
<span style="width: 24%;display: inline-block;">
|
||||
{$param = "onchange='update(this, {$IDpr})'"}
|
||||
{print_select name="codeOfSuppliers[{$IDpr}][{$code['id']|default:0}][supplier]" var=$view->suppliers selected=$code['id_supplier'] param=$param}
|
||||
</span>
|
||||
<input type="text" name="codeOfSuppliers[{$IDpr}][{$code['id']|default:0}][code]" maxlength=50 value="{$code['code']}" style="width: 25%;" placeholder="Kód dodavatele">
|
||||
<input type="text" name="codeOfSuppliers[{$IDpr}][{$code['id']|default:0}][ean]" maxlength=50 value="{$code['ean']}" style="width: 25%;" placeholder="EAN dodavatele">
|
||||
<input type="text" name="codeOfSuppliers[{$IDpr}][{$code['id']|default:0}][in_store]" maxlength=50 value="{$code['in_store']}" style="width: 24%;" placeholder="Počet kusů dodavatele">
|
||||
</div>
|
||||
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="codeOfSuppliers[{$IDpr}][{$code['id']|default:0}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat šablonu"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat šablonu"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case 'figureEAN'}
|
||||
<input type="text" class="input" name="ean[{$IDpr}]" size="13" maxlength="20" value="{formatEAN($row['ean'])}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figureShowMax'}
|
||||
<input type="text" class="input" name="in_store_show_max[{$IDpr}]" size="5" maxlength="10" value="{$row['in_store_show_max']}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figureNote'}
|
||||
<input type="text" class="input" name="note[{$IDpr}]" size="10" maxlength="50" value="{$row['note']}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figureInStoreMin'}
|
||||
<input type="text" class="input" name="in_store_min[{$IDpr}]" size="10" maxlength="50" value="{$row['in_store_min']}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figureMaxCPC'}
|
||||
<input type="text" class="input" name="max_cpc[{$IDpr}]" size="10" maxlength="50" value="{$row['max_cpc']}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figurePriceFinal'}
|
||||
{if !empty($row)}
|
||||
{$price = calcPrice($row['price'], getVat($row['vat']), $row['discount'])}
|
||||
{else}
|
||||
{$price = ''}
|
||||
{/if}
|
||||
<input type="text" class="input" name="priceFinal[{$IDpr}]" size="15" value="{$price}" onkeypress="checkInputData('float')" onchange="update(this,'{$IDpr}')" />
|
||||
<input type="hidden" class="input" name="priceFinalVat[{$IDpr}]" value="{$row['vat']}" />
|
||||
<input type="hidden" class="input" name="priceFinalPrice[{$IDpr}]" value="{$row['price']}" />
|
||||
{/case}
|
||||
|
||||
{case 'figurePosition'}
|
||||
<input type="text" class="input" name="position[{$IDpr}]" size="10" maxlength="50" value="{$row['position']}" onchange="update(this,'{$IDpr}')" />
|
||||
{/case}
|
||||
|
||||
{case 'figureShowInFeed'}
|
||||
<div align="center">
|
||||
<input type="checkbox" id="show_in_feed{$IDpr}" name="show_in_feed[{$IDpr}]"
|
||||
onchange="update(this,'{$IDpr}')" value="1" {$row['show_in_feed']|checked:'Y'} />
|
||||
<label for="show_in_feed{$IDpr}"> Ano</label>
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case 'figureSerialNumberRequire'}
|
||||
<div align="center">
|
||||
<input type="checkbox" id="serial_number_require{$IDpr}" name="serial_number_require[{$IDpr}]"
|
||||
onchange="update(this,'{$IDpr}')" value="1" {$row['serial_number_require']|checked:'Y'} />
|
||||
<label for="serial_number_require{$IDpr}"> Ano</label>
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case 'figureShowInSearch'}
|
||||
<div align="center">
|
||||
<input type="checkbox" id="show_in_search{$IDpr}" name="show_in_search[{$IDpr}]"
|
||||
onchange="update(this,'{$IDpr}')" value="1" {$row['show_in_search']|checked:'Y'} />
|
||||
<label for="show_in_search{$IDpr}"> Ano</label>
|
||||
</div>
|
||||
{/case}
|
||||
|
||||
{case 'figureProductUnits'}
|
||||
{$units = $view->getProductUnits()}
|
||||
|
||||
{if !$row.unit}
|
||||
{$units['0'] = "Nezvoleno"}
|
||||
{$row.unit = "0"}
|
||||
{/if}
|
||||
|
||||
{print_select name="product_unit[{$IDpr}]" var=$units selected=$row.unit}
|
||||
{/case}
|
||||
{case 'figureMeasureUnit'}
|
||||
{$units = $view->getProductUnits()}
|
||||
{if !$row.measure_unit}
|
||||
{$units['0'] = "Nezvoleno"}
|
||||
{$row.unit = "0"}
|
||||
{/if}
|
||||
|
||||
{print_select name="measure_unit[{$IDpr}]" var=$units selected=$row.measure_unit}
|
||||
{/case}
|
||||
{case 'figureParamGroups'}
|
||||
<div>
|
||||
<select class="selecter ajax-selecter productsFrm_id_parameter_group" name="paramGroups[{$IDpr}]" data-type="parameter_groups" data-autocomplete="parameter_groups" data-preload="parameterGroups" onchange="update(this,'{$IDpr}')" >
|
||||
<option value="{$row['id_parameter_group']}" selected></option>
|
||||
</select>
|
||||
</div>
|
||||
{/case}
|
||||
{case 'figurePrintLabels'}
|
||||
<div>
|
||||
<input placeholder="1" class="form-control input-sm" style="width:65px;float:left;height:32px; border-bottom-right-radius: 0px; border-top-right-radius: 0px; margin-top:-1px" type="figurePrintLabels" name="printLabels[{$IDpr}]" value="" onchange="update(this,'{$IDpr}')">
|
||||
<span class="input-group-btn">
|
||||
<a href="javascript:void(0)" onclick="submitPrintCenter('{$IDpr}')" class="btn btn-primary btn-sm" title="vytisknout"><span class="glyphicon glyphicon-print"></span></a>
|
||||
</span>
|
||||
</div>
|
||||
{/case}
|
||||
{case 'figureDateAdded'}
|
||||
<input type="text" id="dateAdded{$IDpr}" class="input" name="dateAdded[{$IDpr}]" size="45" maxlength="80" {if $row['date_added']} value="{date('d.m.Y H:i:s', strtotime($row['date_added']))}" {/if} onchange="update(this,`{$IDpr}`)" autocomplete="off" />
|
||||
{insert_calendar selector="#dateAdded`$IDpr`" format='datetime'}
|
||||
{/case}
|
||||
{case 'figureStockInDate'}
|
||||
<input type="text" id="stockInDate{$IDpr}" class="input" name="stockInDate[{$IDpr}]" size="45" maxlength="80" {if $row['date_stock_in']} value="{date('d.m.Y H:i:s', strtotime($row['date_stock_in']))}" {/if} onchange="update(this,`{$IDpr}`)" autocomplete="off" />
|
||||
{insert_calendar selector="#stockInDate`$IDpr`" format='datetime'}
|
||||
{/case}
|
||||
{case "articlesProduct"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach $ret as $article}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$article@iteration}">
|
||||
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="articles_product[{$IDpr}][{$article@iteration}][id]" data-type="article">
|
||||
<option value="{$article.id}" selected>{$article.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="articles_product[{$IDpr}][{$article@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat článek"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat článek"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "productsCharges"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
{foreach array_merge($ret, [[]]) as $charge}
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$charge@iteration}">
|
||||
|
||||
<div class="fullflex">
|
||||
<select class="ajax-selecter" name="products_charges[{$IDpr}][{$charge@iteration}][id]" data-type="product_charge">
|
||||
<option value="{$charge.id}" selected>{$charge.title}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input data-multi="delete" class="hidden" type="checkbox" name="products_charges[{$IDpr}][{$charge@iteration}][delete]"/>
|
||||
<span class="label noflex" data-multi="add" title="Přidat příplatek"><i class="glyphicon glyphicon-plus"></i></span>
|
||||
<span class="label noflex" data-multi="del" title="Odebrat příplatek"><i class="glyphicon glyphicon-minus"></i></span>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureDimensions"}
|
||||
<div class="multi-item" data-multi-id="{$IDpr}" data-multi="item">
|
||||
<div class="param-row" data-multi="row" data-multi-id="{$IDpr}">
|
||||
<div style="clear: both;">
|
||||
{foreach $item.input as $key => $inputName}
|
||||
<input type="text" name="{$inputName}[{$IDpr}]" value="{$row[$inputName]}" onchange="update(this,'{$IDpr}')" style="{if $inputName === 'depth'}width:24%;{else}width:25%;{/if}" placeholder="{$inputName|translate} [cm]" title="{$inputName|translate} [cm]">
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/case}
|
||||
{case "figureOssVats"}
|
||||
{$ossName = $view->getOssCategoryName($row.id_cn)}
|
||||
<div style="max-width: 500px !important;">
|
||||
{print_select name="id_cn[{$IDpr}]" var=[''=>'',$row.id_cn => $ossName] selected=$row.id_cn param="data-type='ossVatsCategories' data-value='{$ossName}'" class="ajax-selecter"}
|
||||
</div>
|
||||
{/case}
|
||||
{default}
|
||||
{capture name="pfExtend" assign="pfExtend"}
|
||||
{block "printField"}{/block}
|
||||
{/capture}
|
||||
|
||||
{$customField = $pfExtend|strip:""}
|
||||
|
||||
{if $customField != ""}
|
||||
{$customField nofilter}
|
||||
{elseif $item.input[0] == 'data'}
|
||||
{printCustomDataField}
|
||||
{else}
|
||||
{printDefaultField}
|
||||
{/if}
|
||||
{/switch}
|
||||
{/if}
|
||||
{/function}
|
||||
|
||||
{block "list-filter"}
|
||||
{$param2 = ['figure' => $figure, 'prepare' => 1, 'filter' => $filter]}
|
||||
{$param2 = http_build_query($param2)}
|
||||
{include file="utils/listFilter.tpl" productsMassModification=1}
|
||||
{/block}
|
||||
<form method="POST" action="launch.php?s=list.php&type=productsMassModification&page={$pager.number}&{if $smarty.get.order}&order={$smarty.get.order}{/if}{if $smarty.get.adminFilter}&adminFilter={$smarty.get.adminFilter}{/if}" class="viewParams masseditform" role="form">
|
||||
<input type="submit" name="submitSave" class="hidden" value="1" />
|
||||
<input type="submit" name="submitSaveAndNext" class="hidden" value="1" />
|
||||
|
||||
<table class="table table-striped panel panel-default {block unsortable}{/block} massEditTable unselectable" width="100%">
|
||||
|
||||
{* Header columns *}
|
||||
<thead>
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{if $column@iteration > 1}
|
||||
<th style="width: 35px;"></th>
|
||||
{/if}
|
||||
|
||||
<th {if $column@iteration == 1}data-name{/if}>
|
||||
{strip}
|
||||
<div style='width:{$column['size']}px;'>
|
||||
{if $orderParam.sort == $label}
|
||||
{if $orderParam.direction == 'DESC'}
|
||||
{$order = ""}
|
||||
{else}
|
||||
{$order = "-"}
|
||||
{/if}
|
||||
{else}
|
||||
{$order = ""}
|
||||
{/if}
|
||||
{if $pager}
|
||||
<a href='{$pager->getUrl(["order" => $order|cat:$label ])}' title="Setřídit sestupně podle sloupce {$label}">
|
||||
{$label}
|
||||
{if $orderParam.sort == $label}
|
||||
<span class="glyphicon glyphicon-chevron-{if $order == ''}down{else}up{/if}"></span>
|
||||
{/if}
|
||||
{if $column.parameter}
|
||||
<a href="javascript:nw('parameter', '{$column.parameter}', 'noopener');">
|
||||
<span class="badge badge-default" style="margin-left: 10px">
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
</span>
|
||||
</a>
|
||||
{/if}
|
||||
</a>
|
||||
{else}
|
||||
{$label}
|
||||
{/if}
|
||||
</div>
|
||||
{/strip}
|
||||
</th>
|
||||
{/foreach}
|
||||
|
||||
<th class="spacer" width="90%">
|
||||
</th>
|
||||
|
||||
</thead>
|
||||
|
||||
{* Mass modification *}
|
||||
<tr class="massEditRow">
|
||||
<td>
|
||||
{'editAll'|translate}
|
||||
</td>
|
||||
|
||||
{foreach $editItems as $key => $item}
|
||||
{if $figure[$key]}
|
||||
{printField namefield=$key row=array() IDpr=0}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td class="spacer">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{* Products *}
|
||||
{$lastIDpr = -1}
|
||||
{foreach $SQL as $row}
|
||||
{$IDpr = $row.id}
|
||||
|
||||
{if !$figure.Variants || $lastIDpr != $IDpr}
|
||||
{$lastIDpr = $IDpr}
|
||||
<tr data-id="{$IDpr}">
|
||||
<td title="{$row.title}" data-name>
|
||||
<div class="list_item">
|
||||
<a href="javascript:nw('product', '{$IDpr}', 'noopener');" tabindex="-1">
|
||||
{$row.title}
|
||||
</a>
|
||||
<input type="hidden" name="ID[]" value="{$IDpr}" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{foreach $editItems as $key => $item}
|
||||
{if $figure[$key]}
|
||||
{printField namefield=$key row=$row IDpr=$IDpr}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td class="spacer">
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{if $figure.Variants}
|
||||
{$variations = $object->getVariations($row.pv_id)}
|
||||
{foreach $variations as $rowv}
|
||||
{$rowv['price'] = $rowv['pv_price']}
|
||||
{$IDpr = 'v'|cat:$rowv['id']}
|
||||
<tr class="variation" data-id="{$IDpr}">
|
||||
<td title="{$rowv.title}" data-name>
|
||||
<div class="list_item">
|
||||
{$rowv.title}
|
||||
<input type="hidden" name="ID[]" value="{$IDpr}" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
{foreach $editItems as $key => $item}
|
||||
{if $figure[$key]}
|
||||
{if array_search($key, $editVariantKeys) === false}
|
||||
<td></td><td></td>
|
||||
{else}
|
||||
{printField namefield=$key row=$rowv IDpr=$IDpr}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
||||
{/if}
|
||||
|
||||
{if $row@iteration is div by 100}
|
||||
{flush nocache}
|
||||
{/if}
|
||||
|
||||
{/foreach}
|
||||
</table>
|
||||
</form>
|
||||
286
admin/templates/list/products.massModification.tpl
Normal file
286
admin/templates/list/products.massModification.tpl
Normal file
@@ -0,0 +1,286 @@
|
||||
{extends "../frame.tpl"}
|
||||
|
||||
{block "css-entry" append}
|
||||
{encore_entry_link_tags entry='list' build='admin'}
|
||||
{/block}
|
||||
|
||||
{block "js-onready" append}
|
||||
{asset_compile}
|
||||
<script src="./static/js/ProductsMassModification.js"></script>
|
||||
{/asset_compile}
|
||||
{/block}
|
||||
|
||||
{block body_class}class="list-mass-modification"{/block}
|
||||
|
||||
{block "content"}
|
||||
<div class="container-fluid">
|
||||
<form method="POST" action="launch.php?s=list.php&type=productsMassModification{if $smarty.get.order}&order={$smarty.get.order}{/if}" class="viewParams"
|
||||
role="form">
|
||||
|
||||
<div class="row">
|
||||
<input type="hidden" name="s" value="list.php">
|
||||
<input type="hidden" name="type" value="productsMassModification">
|
||||
|
||||
<div class="col-xs-12">
|
||||
<div class="panel panel-success first" id="massmodification_panel_wrapper">
|
||||
<div class="panel-heading panel-heading-flex panel-heading-massmodification">
|
||||
<p class="panel-title">{'massModification'|translate}</p>
|
||||
<a href="#" class="panel-heading-close" data-massmodification-clear>
|
||||
{'reset'|translate:'productsFilter'}
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
</a>
|
||||
<script type="text/javascript">
|
||||
$('#massmodification_panel_wrapper').on('click', '[data-massmodification-clear]', function(){
|
||||
$('#massmodification_panel_wrapper').find(':input[type="checkbox"]:checked').removeAttr('checked');
|
||||
$('#massmodification_panel_wrapper').find('select option:selected').removeAttr('selected');
|
||||
$('#massmodification_panel_wrapper').find('select + .chosen-container').find('.search-choice').remove();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="panel-body" id="search2">
|
||||
<div class="row">
|
||||
{foreach $figureItems.items as $name => $items}
|
||||
<div class="col-md-2 col-xs-12 control-label">
|
||||
<h1 class="h4 main-panel-title">{$name|translate}</h1>
|
||||
|
||||
{foreach $items as $item_figure}
|
||||
<div class="checkbox pull-left" style="width:100%;">
|
||||
<input type="checkbox" name="figure[{$item_figure.key_name}]" value="ON"
|
||||
id="x2{$item_figure.key_name}" {$figure[$item_figure.key_name]|checked}
|
||||
class="check">
|
||||
<label for="x2{$item_figure.key_name}">{$item_figure.name}</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="row">
|
||||
{if {find_module name='products_parameters'}}
|
||||
<br>
|
||||
<div class="col-md-6" id="figureParameters">
|
||||
<h1 class="h4 main-panel-title">Parametry</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="checkbox pull-left">
|
||||
<input id="ParametersInCategory" type="checkbox"
|
||||
name="figure[ParametersInCategory]"
|
||||
value="ON" {$figure.ParametersInCategory|checked} class="check">
|
||||
<label for="ParametersInCategory">Ve vybrané kategorii</label>
|
||||
</div>
|
||||
<div class="checkbox pull-left">
|
||||
<input id="ParametersEmpty" type="checkbox" name="find[ParametersEmpty]"
|
||||
value="ON" {$find.ParametersEmpty|checked} class="check">
|
||||
<label for="ParametersEmpty">Pouze nevyplněné</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 control-label">
|
||||
<select name="figure[params][]" multiple='multiple' class="selecter small">
|
||||
{foreach $params as $param_id => $param}
|
||||
<option value="{$param_id}" {$param_id|selected:$figure.params}>{$param.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-md-6" id="figureFeed">
|
||||
<h1 class="h4 main-panel-title">Feedy</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6 control-label">
|
||||
<select name="figure[feeds][]" multiple='multiple' class="selecter small">
|
||||
{foreach $view->getFeeds() as $feed}
|
||||
<option value="{$feed.id}" {$feed.id|selected:$figure.feeds}>{$feed.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 control-label">
|
||||
{foreach $view->getFeedFields() as $field => $feedItem}
|
||||
<div class="checkbox pull-left">
|
||||
<input type="checkbox" name="figure[feed{$field}]" value="ON"
|
||||
id="x2feed{$field}" {$figure["feed{$field}"]|checked}
|
||||
class="check">
|
||||
<label for="x2feed{$field}">{$feedItem.title}</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if {find_module name="pricelists"}}
|
||||
<div class="col-md-6" id="figurePriceLists">
|
||||
<h1 class="h4 main-panel-title">Ceníky</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6 control-label">
|
||||
<select name="figure[pricelists][]" multiple='multiple' class="selecter small">
|
||||
{foreach $view->getPriceLists() as $priceList}
|
||||
<option value="{$priceList.id}" {$priceList.id|selected:$figure.pricelists}>{$priceList.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 control-label">
|
||||
{foreach $view->getPriceListFields() as $field => $priceListItem}
|
||||
<div class="checkbox pull-left">
|
||||
<input type="checkbox" name="figure[priceList{$field}]" value="ON" id="priceList{$field}" {$figure['priceList'|cat:{$field}]|checked} class="check">
|
||||
<label for="priceList{$field}">{$priceListItem.title}</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if {find_module name="stores"}}
|
||||
<div class="col-md-6" id="figureStores">
|
||||
<h1 class="h4 main-panel-title">Sklady</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6 control-label">
|
||||
<select name="figure[stores][]" multiple='multiple' class="selecter small">
|
||||
{foreach $view->getStores() as $store}
|
||||
<option value="{$store.id}" {$store.id|selected:$figure.stores}>{$store.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-6 control-label">
|
||||
{foreach $view->getStoresFields() as $field => $storeItem}
|
||||
<div class="checkbox pull-left">
|
||||
<input type="checkbox" name="figure[store{$field}]" value="ON"
|
||||
id="x2store{$field}" {$figure["store$field"]|checked}
|
||||
class="check">
|
||||
<label for="x2store{$field}">{$storeItem.title}</label>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{include "block.productsFilter.tpl" }
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-4">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{'view'|translate}</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group horizontal">
|
||||
<div class="col-md-3 control-label right"><label>{'itemCount'|translate}</label></div>
|
||||
<div class="col-md-3">
|
||||
{print_select name="figure[divide]" var=$figureDivide selected=$figure.divide param='data-width="auto"'}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="checkbox pull-left">
|
||||
<input id="showVariants" type="checkbox" name="figure[Variants]"
|
||||
value="1" {$figure.Variants|checked} class="check"/>
|
||||
<label for="showVariants">{'showVar'|translate}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-8">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{'search'|translate}</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group horizontal">
|
||||
<div class="col-md-2">
|
||||
<input type="text" name="find[Title]" value="{$find.Title}"
|
||||
class="form-control input-sm" placeholder="{'name'|translate}"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="text" name="find[Description]" value="{$find.Description}"
|
||||
class="form-control input-sm" placeholder="{'other'|translate}"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input type="text" name="find[Code]" value="{$find.Code}" class="form-control input-sm"
|
||||
placeholder="{'code'|translate}" id="paste">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-sm" title="Zvětšit" data-toggle="modal" data-target="#codeModal">
|
||||
<span class="glyphicon glyphicon-resize-full"></span>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
{include "utils/codesModal.tpl" modal_id="codeModal" title="Kódy/EANy produktů"}
|
||||
|
||||
<script>
|
||||
initCodesModal('#paste', '#paste-modal', '#codeModal')
|
||||
</script>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="checkbox pull-left">
|
||||
<input type="checkbox" id="CodeEmpty" name="find[CodeEmpty]"
|
||||
value="ON" {$find.CodeEmpty|checked} class="check"/>
|
||||
<label for="CodeEmpty">{'empty'|translate}</label>
|
||||
</div>
|
||||
</div>
|
||||
{if $cfg.Modules.products.note}
|
||||
<div class="col-md-2">
|
||||
<input type="text" name="find[Note]" value="{$find.Note}"
|
||||
class="form-control input-sm" placeholder="Poznámka"/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="checkbox pull-left">
|
||||
<input type="checkbox" id="NoteEmpty" name="find[NoteEmpty]"
|
||||
value="ON" {$find.NoteEmpty|checked} class="check"/>
|
||||
<label for="NoteEmpty">prázdná</label>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom:20px; display: flex; align-items: center;">
|
||||
<div class="col-md-3 col-lg-2 col-xs-12">
|
||||
{* je vedle paginace ale v jinym formu *}
|
||||
<input type="hidden" name="prepare"
|
||||
value="{if !empty($smarty.get.prepare)}{$smarty.get.prepare}{elseif !empty($smarty.post.prepare)}{$smarty.post.prepare}{/if}"
|
||||
class="check"/>
|
||||
<input type="submit" name="submitSettings" class="btn btn-primary btn-block"
|
||||
value="{'changeView'|translate}">
|
||||
</div>
|
||||
<div class="col-md-3 col-lg-2 col-xs-12 text-right" style="flex-grow: 1; color: #555;">
|
||||
Počet produktů: {$pager.total}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
{include "list/products.massModification.fields.tpl"}
|
||||
</div>
|
||||
<div class="container-fluid footer">
|
||||
<div class="row window-btns">
|
||||
<div class="slide-right">
|
||||
<div class="col-md-3 col-lg-2">
|
||||
<input type="submit" name="submitSave" class="btn btn-success btn-block" data-submit
|
||||
value="{'save'|translate}"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-lg-2">
|
||||
{if $pager.count > 1}
|
||||
<input type="submit" name="submitSaveAndNext" class="btn btn-success btn-block" data-submit
|
||||
value="{'saveNext'|translate}"
|
||||
{if $pager.number == $pager.count}disabled='disabled'{/if} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
{include file="utils/pager.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
12
admin/templates/list/products.prices.tpl
Normal file
12
admin/templates/list/products.prices.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{extends "list.tpl"}
|
||||
|
||||
{block "content" prepend}
|
||||
<style>
|
||||
tr.up td {
|
||||
background-color: #FF858D;
|
||||
}
|
||||
tr.down td {
|
||||
background-color: #DADDFC;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
38
admin/templates/list/products.tpl
Normal file
38
admin/templates/list/products.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block "list-filter" append}
|
||||
{* todo *}
|
||||
{if !isset($filtersStorage)}
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
|
||||
{if !empty($filtersValue)}
|
||||
{foreach $filtersValue as $filter}
|
||||
<div class="col-md-2 no-margin">
|
||||
<div class="list_filter">
|
||||
<select name="IDpr" class="selecter input-sm">
|
||||
{$filter@key}
|
||||
{foreach $filter as $option}
|
||||
<option value="{$option@key}" {if $option.choiced == true}selected{/if}>{$option.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<script type="text/javascript">
|
||||
$(".list_filter select").on('change',function (e) {
|
||||
$this = $(this);
|
||||
window.location.href = window.location.href + "&" + $this.serialize();
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
sortableList("products");
|
||||
{/block}
|
||||
</script>
|
||||
78
admin/templates/list/reviews.tpl
Normal file
78
admin/templates/list/reviews.tpl
Normal file
@@ -0,0 +1,78 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block body_class}class="list-reviews"{/block}
|
||||
|
||||
{block "content"}
|
||||
<form method="post" action="launch.php?s=list.php&type=reviews&type_list={$smarty.get.type_list}">
|
||||
{$smarty.block.parent}
|
||||
</form>
|
||||
{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{paginationList pager=$pager}
|
||||
</div>
|
||||
{if $smarty.get.type_list=='ShowNotConfirmed'}
|
||||
<div class="col-md-2 col-md-offset-4">
|
||||
<input type="submit" name="Submit" class="btn btn-primary btn-block" value="Schválit vše"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
$('[data-form-delete]').on('click', function() {
|
||||
var row = $(this).closest('tr');
|
||||
var reviewId = row.find('[data-form-delete-input]').data('formDeleteInput');
|
||||
var data = { };
|
||||
data[reviewId] = { 'delete': 1 };
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'launch.php?s=list.php&type=reviews',
|
||||
data: {
|
||||
'data': {
|
||||
'reviews': data
|
||||
}
|
||||
},
|
||||
success: function(msg) {
|
||||
row.fadeOut(500);
|
||||
showInfoMessage("Smazáno", 'success');
|
||||
row.remove();
|
||||
},
|
||||
error: function() {
|
||||
showInfoMessage("Chyba při odeslání. Obnovte prosím stránku a zkuste to znovu.", 'error');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('[data-form-top]').on('click', function() {
|
||||
var row = $(this).closest('tr');
|
||||
var reviewId = row.find('[data-form-top-input]').data('formTopInput');
|
||||
var data = { };
|
||||
data[reviewId] = { 'top': 1 };
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'launch.php?s=list.php&type=reviews',
|
||||
data: {
|
||||
'data': {
|
||||
'reviews': data
|
||||
}
|
||||
},
|
||||
success: function(msg) {
|
||||
{if $smarty.get.type_list!='ShowNotConfirmed'}
|
||||
row.find('.review-figure').html('{KupShop\CatalogBundle\Util\ReviewsUtil::$rank[5]|translate:'reviews'}');
|
||||
row.find('.review-top').addClass('disabled');
|
||||
{else}
|
||||
row.fadeOut(500);
|
||||
{/if}
|
||||
showInfoMessage("Uloženo", 'success');
|
||||
row.remove();
|
||||
},
|
||||
error: function() {
|
||||
showInfoMessage("Chyba při odeslání. Obnovte prosím stránku a zkuste to znovu.", 'error');
|
||||
}
|
||||
});
|
||||
});
|
||||
{/block}
|
||||
</script>
|
||||
40
admin/templates/list/sections.ajax.tpl
Normal file
40
admin/templates/list/sections.ajax.tpl
Normal file
@@ -0,0 +1,40 @@
|
||||
{function printTree}
|
||||
{foreach $data as $entry}
|
||||
{if !$zero && $entry.id === 0}
|
||||
{continue}
|
||||
{/if}
|
||||
{$width = 500 - ($entry.level * 26)}
|
||||
<li class="node {$view->resolveCallable($tableDef.class, $entry)}"
|
||||
data-id="{$view->getListRowValue($entry, $tableDef.id)}">
|
||||
<div class="nodeWrapper tdd-row">
|
||||
{foreach $tableDef.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
<div class="list_item {if $isEditing}is-editable{/if} tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
{$view->printListRowItem($column, $entry)}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{if !empty($entry.children) && ($openedSections == 'all' || in_array($entry.id, $openedSections))}
|
||||
<ul class="tdd-tree">
|
||||
{printTree data=$entry.children tableDef=$tableDef}
|
||||
</ul>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
{/function}
|
||||
|
||||
{if $SQL[0].id === 0}
|
||||
<div class="table">
|
||||
<ul class="sections-root">
|
||||
{printTree data=[$SQL[0]] tableDef=$columns zero=true}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="treeDragDrop sections-sortable table" id="sectionsRoot">
|
||||
<ul class="tdd-tree nestedSortable nestedSortableRoot">
|
||||
{printTree data=$SQL tableDef=$columns}
|
||||
</ul>
|
||||
</div>
|
||||
247
admin/templates/list/sections.tpl
Normal file
247
admin/templates/list/sections.tpl
Normal file
@@ -0,0 +1,247 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block css append}
|
||||
<style>
|
||||
{$sizeSum = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
{$sizeSum = $sizeSum + $column.size}
|
||||
{/foreach}
|
||||
{if $sizeSum > 0}{$singlePartRelSize = 100/$sizeSum}{else}{$singlePartRelSize = 10}{/if}
|
||||
{$partCounter = 0}
|
||||
{foreach $columns.fields as $name => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
.tdd-row > .tdd-column-{$column@index + 1} {
|
||||
left: {$singlePartRelSize*$partCounter}%;
|
||||
width: {$singlePartRelSize*$column.size}%;
|
||||
}
|
||||
|
||||
{$partCounter = $partCounter + $column.size}
|
||||
{/foreach}
|
||||
</style>
|
||||
{/block}
|
||||
|
||||
{block js append}
|
||||
<script src="./static/js/jquery.mjs.nestedSortable.js"></script>
|
||||
{/block}
|
||||
|
||||
{block name="list-panel-class"}menu-list{/block}
|
||||
|
||||
{block 'list-filter'}
|
||||
<div class="wpj-panel-heading">
|
||||
<div class="list-filters-wrapper">
|
||||
<div class="list-filters-left">
|
||||
<div class="filter-item">
|
||||
{if $smarty.get.opened == 'all'}
|
||||
<a class="btn btn-xs btn-ghost" href="launch.php?s={$view->getPageHandler()}&type={$view->getListName()}">
|
||||
<i class="bi bi-dash-circle m-r-1"></i>Sbalit vše
|
||||
</a>
|
||||
{else}
|
||||
<a class="btn btn-xs btn-ghost" href="launch.php?s={$view->getPageHandler()}&type={$view->getListName()}&opened=all">
|
||||
<i class="bi bi-plus-circle m-r-1"></i>Rozbalit vše
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-filters-right">
|
||||
<div class="filter-item">
|
||||
<button title="Upravit zobrazení sloupců" onclick="nw('ListColumns', '', 'pg={$smarty.get.type}')"
|
||||
class="btn btn-xs btn-ghost">
|
||||
<i class="bi bi-arrows-move m-r-1"></i>{'editListColumns'|translate:'filters'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block listTable}
|
||||
{block 'sections-header'}
|
||||
<div class="tdd-row thh-row">
|
||||
{foreach $columns.fields as $label => $column}
|
||||
{if ($column.wpjAdmin and !isSuperuser()) or $column.visible == 'N'}
|
||||
{continue}
|
||||
{/if}
|
||||
<div class="tdd-column tdd-column-{$column@index + 1} {$view->resolveCallable($column.class, $entry) nofilter}">
|
||||
<small>{$object->printHeaderLabel($column.title, $column)} </small>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div class="table">
|
||||
{include "./sections.ajax.tpl"}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="pagination-sticky">
|
||||
<div class="pagination-buttons">
|
||||
{if findModule('products_sections', 'virtual_to_db')}
|
||||
<div class="filter-item">
|
||||
<a href="launch.php?s=list.php&type={$view->getListName()}&acn=generateVirtualSections"
|
||||
class="btn btn-danger"
|
||||
title="Přegeneruje virtuální sekce, které se jinak přegeneovávájí jednou za dvě hodiny.">
|
||||
Přegenerovat virtuální sekce
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{block "list-filter-mass-edit"}
|
||||
{if $showMassEdit}
|
||||
<a title="Hromadná úprava" href="launch.php?s=listEdit.php&type={$view->getListName()}"
|
||||
class="btn btn-secondary"><span class="bi bi-list-check m-r-1"></span>Hromadná úprava
|
||||
</a>
|
||||
{/if}
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block unsortable}unsortable{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
|
||||
function setCookie(c_name, value, exdays) {
|
||||
var exdate = new Date();
|
||||
exdate.setDate(exdate.getDate() + exdays);
|
||||
var c_value = encodeURIComponent(value) + '; path=/' + (exdays == null ? '' : '; expires=' + exdate.toUTCString());
|
||||
document.cookie = c_name + '=' + c_value;
|
||||
}
|
||||
|
||||
const getOpened = () => $.map($('.treeDragDrop').find('li .opener:not(.plus)'), function(elem) {
|
||||
return $(elem).closest("li").data("id");
|
||||
});
|
||||
|
||||
function customRefresh(url) {
|
||||
const openedBranches = getOpened();
|
||||
if (openedBranches.length) {
|
||||
setCookie('products_list_opened_sections', JSON.stringify(openedBranches))
|
||||
}
|
||||
|
||||
setWindowStorage("listPosition_x", window.scrollY, window);
|
||||
|
||||
var js = $('.highRow').find("td a[href^=javascript]").attr('href');
|
||||
var ID;
|
||||
if (typeof js == 'undefined')
|
||||
ID = 0;
|
||||
else
|
||||
ID = js.replace(/javascript:nw\(\'(.+)'\, '(\d+)'\, '(.*)'\);/, '$2');
|
||||
|
||||
setWindowStorage("listHighRow", ID, window);
|
||||
}
|
||||
|
||||
|
||||
{literal}
|
||||
function initListTreeAjax(name, url, selector) {
|
||||
var $tree = $(selector ? selector : '#sectionsRoot > ul');
|
||||
|
||||
$('#sectionsRoot > ul').nestedSortable({
|
||||
handle: '.drag-drop-mover',
|
||||
items: '.node',
|
||||
listType: 'ul',
|
||||
toleranceElement: '> .nodeWrapper',
|
||||
placeholder: 'placeholder',
|
||||
isTree: true,
|
||||
connectWith: '.nestedSortableRoot',
|
||||
start: function(event, ui) {
|
||||
/* on drag start find index and parent id of moved item */
|
||||
ui.item.startPos = ui.item.index();
|
||||
var $parent = ui.item.parents('[data-id]');
|
||||
ui.item.startParent = $parent.length ? $parent.data('id') : null;
|
||||
},
|
||||
update: function(event, ui) {
|
||||
var $parent = ui.item.parents('[data-id]');
|
||||
var $prev = ui.item.prev();
|
||||
var $next = ui.item.next();
|
||||
|
||||
var data = {
|
||||
tree: {
|
||||
id: ui.item.data('id'),
|
||||
position: ui.item.index()
|
||||
}
|
||||
};
|
||||
|
||||
if ($parent.length) {
|
||||
data['tree']['target'] = $parent.data('id');
|
||||
}
|
||||
|
||||
if ($prev.length) {
|
||||
data['tree']['after'] = $prev.data('id');
|
||||
}
|
||||
|
||||
if ($next.length) {
|
||||
data['tree']['before'] = $next.data('id');
|
||||
}
|
||||
|
||||
// up or down?
|
||||
if (ui.item.startParent === data['tree']['target'] && ui.item.startPos <= data['tree']['position']) {
|
||||
data['tree']['position'] += 1;
|
||||
}
|
||||
|
||||
$.post(url, data, function(res) {
|
||||
//TODO: error handling
|
||||
return true;
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
$tree.on("click", "li .opener:not(.disabled)", function() {
|
||||
var $li = $(this).closest("li");
|
||||
var $this = $(this);
|
||||
var $ul = $li.children("ul").first();
|
||||
var id = $li.data("id");
|
||||
|
||||
const toggleOpen = () => {
|
||||
$this.removeClass("plus").addClass('minus');
|
||||
$li.removeClass('mjs-nestedSortable-collapsed').addClass('mjs-nestedSortable-expanded');
|
||||
}
|
||||
|
||||
const toggleClosed = () => {
|
||||
$this.removeClass("minus").addClass('plus');
|
||||
$li.addClass('mjs-nestedSortable-collapsed').removeClass('mjs-nestedSortable-expanded');
|
||||
}
|
||||
|
||||
if (!$this.is(".plus")) {
|
||||
toggleClosed();
|
||||
} else {
|
||||
if ($ul.length < 1) {
|
||||
$.ajax({
|
||||
url: window.location,
|
||||
type: "get",
|
||||
data: {
|
||||
root: id
|
||||
},
|
||||
success: function(response) {
|
||||
$li.append($(response).html());
|
||||
toggleOpen();
|
||||
{/literal}
|
||||
{block subsectionLoaded}
|
||||
|
||||
{/block}
|
||||
{literal}
|
||||
},
|
||||
error: function() {
|
||||
showInfoMessage('Chyba při načítání podsekcí', 'danger');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
toggleOpen();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
return this;
|
||||
}
|
||||
{/literal}
|
||||
|
||||
initListTreeAjax("sections", "{$ctrl.currUrl.Rel nofilter}&acn=drag");
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
|
||||
90
admin/templates/list/stockIn.tpl
Normal file
90
admin/templates/list/stockIn.tpl
Normal file
@@ -0,0 +1,90 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block buttons_dropup}
|
||||
<li>
|
||||
<a href="{$ctrl.currUrl.Rel}&acn=StockInExport" title="Export naskladnění s položkami">
|
||||
Export naskladnění s položkami
|
||||
</a>
|
||||
</li>
|
||||
{/block}
|
||||
|
||||
{block "list-content" append}
|
||||
{if isset($price)}
|
||||
<div class="col-md-12">
|
||||
<div class="well">
|
||||
Cena celkem: <b>{$price|format_price}</b>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $smarty.get.index == 'future'}
|
||||
<div class="col-md-2 col-md-offset-10">
|
||||
<div class="well">
|
||||
<input type="button" class="btn btn-primary btn-block" onClick="massStockIn();" value="Hromadná kontrola"/>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function massStockIn() {
|
||||
let checked = $('input[name="stockIns"]:checked').map(function () {
|
||||
return this.value;
|
||||
}).get().join('_');
|
||||
|
||||
nw('stockInCheck', checked);
|
||||
}
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="list-filter" append}
|
||||
{if !empty($var.closure_now.with_vat)}
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-3 control-label">
|
||||
<strong>Aktuální hodnota skladu: </strong>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<strong>{$var.closure_now.with_vat|format_price} </strong>s DPH
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<strong> {$var.closure_now.without_vat|format_price} </strong>bez DPH
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<a href="?s=list.php&type=stockIn&acn=exportCurrentStore" class="btn btn-primary">Exportovat aktuální hodnotu skladu</a>
|
||||
</div>
|
||||
</div>
|
||||
{if !empty($var.closure_last)}
|
||||
<div class="row">
|
||||
<div class="col-md-3 control-label">
|
||||
<strong>Poslední uzávěrka: </strong>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<strong>{$var.closure_last.without_vat|format_price} </strong>bez DPH
|
||||
</div>
|
||||
<div class="col-md-1 control-label">
|
||||
<strong>Rozdíl: </strong>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<strong> {{$var.closure_now.without_vat-$var.closure_last.without_vat}|format_price} </strong>bez DPH
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
<script>
|
||||
{block onready append}
|
||||
var reload_timer;
|
||||
timeout_reload();
|
||||
|
||||
$(document).on('click', 'input', function () {
|
||||
clearTimeout(reload_timer);
|
||||
timeout_reload();
|
||||
});
|
||||
|
||||
function timeout_reload() {
|
||||
reload_timer = setTimeout(function () {
|
||||
window.location.reload(1);
|
||||
}, 60 * 1000);
|
||||
}
|
||||
{/block}
|
||||
</script>
|
||||
62
admin/templates/list/stockInMissing.tpl
Normal file
62
admin/templates/list/stockInMissing.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
{extends "../list.tpl"}
|
||||
|
||||
{block 'table-class' append} stockInMissingTable {/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
let constData = {
|
||||
{if $smarty.get.sellInterval}sellInterval: {$smarty.get.sellInterval},{/if}
|
||||
{if $smarty.get.interval}interval: {$smarty.get.interval},{/if}
|
||||
};
|
||||
function initStockInMissingTableAjax(name, url, selector) {
|
||||
var $table = $(selector ? selector : '.stockInMissingTable');
|
||||
$table.on("click", '[data-acn="OrdersOfSupplierAdd"]', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
var addData = $this.data('adddata');
|
||||
$pieces = $this.parent().prev().find('[name="pieces"]');
|
||||
addData.pieces = $pieces.val() || $pieces.attr('placeholder');
|
||||
addData.pieces = /^\d+$/.test(addData.pieces) ? parseInt(addData.pieces) : 0;
|
||||
|
||||
if(addData.pieces <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $tr = $this.closest('tr').parent().closest('tr');
|
||||
$.ajax({
|
||||
url: 'launch.php?s=list.php&type=stockInMissing',
|
||||
type: "post",
|
||||
data: {
|
||||
...constData,
|
||||
data: addData
|
||||
},
|
||||
success: function (response) {
|
||||
$tr.replaceWith($(response).find('.stockInMissingTable > tbody > tr').first());
|
||||
},
|
||||
error: function (xhr) {
|
||||
showInfoMessage('Chyba při objednání produktů', 'danger');
|
||||
}
|
||||
});
|
||||
});
|
||||
return this;
|
||||
}
|
||||
initStockInMissingTableAjax("stockInMissing", "{$ctrl.currUrl.Rel nofilter}");
|
||||
|
||||
$('.stockInMissingTable').on("click", '[data-acn="OrdersAdd"]', function (e) {
|
||||
e.preventDefault();
|
||||
const $this = $(this);
|
||||
|
||||
$this.parents('tr.no-row-click').siblings().removeClass('highRow');
|
||||
$this.parents('tr.no-row-click').addClass('highRow');
|
||||
|
||||
const addData = $this.data('adddata');
|
||||
|
||||
let order_url = addData.order_url.replaceAll('{ldelim}CODE{rdelim}', addData.code);
|
||||
const target = 'supplier' + addData.id_supplier.toString();
|
||||
|
||||
const win = window.top.open(order_url, target, '');
|
||||
win.focus();
|
||||
});
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
110
admin/templates/listEdit.tpl
Normal file
110
admin/templates/listEdit.tpl
Normal file
@@ -0,0 +1,110 @@
|
||||
{extends $parent}
|
||||
|
||||
{block css append}
|
||||
<style>
|
||||
.edit_list_item { overflow: visible !important; }
|
||||
|
||||
.chosen-container-multi .chosen-choices li.search-field {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
{/block}
|
||||
|
||||
{block "js-entry" append}
|
||||
{encore_entry_script_tags entry='listEdit' build='admin'}
|
||||
{$isEditing = true}
|
||||
{/block}
|
||||
|
||||
{block "js" append}
|
||||
<script src="/admin/static/js/wpj.actions.modal.js"></script>
|
||||
{/block}
|
||||
|
||||
{block content}
|
||||
<form method="post" class="massEditForm">
|
||||
{$smarty.block.parent}
|
||||
</form>
|
||||
<script>
|
||||
$('select[name="selectedAction"]').change(function (e) {
|
||||
const $trigger = $(this);
|
||||
const action = $(this).val();
|
||||
if (action == -1000) {
|
||||
return;
|
||||
}
|
||||
|
||||
openActionConfig($trigger, action, '{$filtersStorage.listName}');
|
||||
|
||||
$('#saveBtn').attr('data-dismiss', "modal")
|
||||
$('#saveBtn').val('Uložit');
|
||||
|
||||
$('#saveBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
if (typeof CKEDITOR !== 'undefined') {
|
||||
$.each(CKEDITOR.instances, function () {
|
||||
this.updateElement();
|
||||
});
|
||||
}
|
||||
const formData = $('#modalForm').serialize();
|
||||
|
||||
$('#actionsConfig').val(formData);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
|
||||
{block 'list-rows' prepend}
|
||||
<tr>
|
||||
{$table = $object->getTableDef()}
|
||||
|
||||
{foreach $table.fields as $column}
|
||||
{if $column.visible == 'N'}{continue}{/if}
|
||||
<td class="editFirstRow">
|
||||
<div class="list_item {if $column.fieldType}edit_list_item{/if}">
|
||||
{if $column.fieldType}
|
||||
{$object->printListFirstRowItem($column)}
|
||||
{elseif $column@iteration == 1}
|
||||
<b>Upravit vše</b>
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</td>
|
||||
{/foreach}
|
||||
|
||||
</tr>
|
||||
{/block}
|
||||
|
||||
{block "list-filter-item"}{/block}
|
||||
|
||||
{block bottomPagination}
|
||||
<div class="pagination-sticky">
|
||||
{call paginationList pager=$pager}
|
||||
|
||||
<div class="pagination-buttons">
|
||||
{block bottomPaginationDivide}
|
||||
<div style="width: 100px">
|
||||
<input type="hidden" name="divide_url" value="{$pager->getUrl(['divide' => 0])}">
|
||||
{print_select name="divide_items" var=$divide.items selected=$divide.item param='data-width="auto"'}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block "list-filter-mass-edit"}
|
||||
<div class="filter-item filter-item-border">
|
||||
<a title="Zrušit změny" href="{$pager->getUrl(['s'=>'list.php'])}{if $listQueryString}&{$listQueryString}{/if}"
|
||||
class="btn btn-danger"> Zrušit změny
|
||||
</a>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="acn" value="save">
|
||||
<input type="submit" name="submitMassEdit" value="Uložit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block js_autoreload}
|
||||
{/block}
|
||||
36
admin/templates/listSortable.tpl
Normal file
36
admin/templates/listSortable.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
{extends "[shared]/list.tpl"}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
(function () {
|
||||
let wasEnabled = false;
|
||||
const $massEditForm = $('.massEditForm');
|
||||
const isMassEdit = !!$massEditForm.length;
|
||||
|
||||
if (!isMassEdit) {
|
||||
sortableList("{$smarty.get.type}");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sortableList("{$smarty.get.type}", function () {
|
||||
{literal}
|
||||
if (wasEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// enable column only after DnD use
|
||||
const sortItem = $massEditForm.find('[data-sort]').get(0);
|
||||
const nameParts = sortItem.name?.replaceAll(']', '')?.split('[') ?? [''];
|
||||
if (nameParts.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sortFieldName = nameParts[1];
|
||||
$massEditForm.find(`.columnEnabler[name*="checked[${sortFieldName}]"]`).attr('checked', 'checked');
|
||||
wasEnabled = true;
|
||||
{/literal}
|
||||
});
|
||||
})();
|
||||
{/block}
|
||||
</script>
|
||||
26
admin/templates/llm/text-dropdown.tpl
Normal file
26
admin/templates/llm/text-dropdown.tpl
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class="dropdown">
|
||||
<button class="badge badge-info dropdown-toggle" type="button" id="button-llm-{$target}" data-toggle="dropdown">
|
||||
<span class="bi bi-stars m-r-1"></span>AI
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-offset dropdown-menu-right" role="menu" aria-labelledby="menu1">
|
||||
{foreach $actions as $action}
|
||||
<li role="presentation">
|
||||
<a onclick="wpj.llmModal.applyAction({$action.json|@json_encode}, 'button-llm-{$target}')">
|
||||
{$action.title}
|
||||
</a>
|
||||
<a onclick="wpj.llmModal.initModal({$action.json|@json_encode})">
|
||||
<span class="bi bi-gear"></span>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
{if $actions}
|
||||
<li role="separator" class="divider"></li>
|
||||
{/if}
|
||||
<li role="presentation">
|
||||
<a href="?s=main.php&l=s:menu.php|type:LlmPrompt&r=s:list.php|type:LlmPrompt" target="_blank">
|
||||
<span class="bi bi-stars m-r-1"></span>Nastavení promptů
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
439
admin/templates/main.tpl
Normal file
439
admin/templates/main.tpl
Normal file
@@ -0,0 +1,439 @@
|
||||
{extends "base.tpl"}
|
||||
|
||||
{block sentry}
|
||||
{include "utils/sentry.tpl"}
|
||||
{/block}
|
||||
|
||||
{block title}
|
||||
{$body.title}
|
||||
{/block}
|
||||
|
||||
{block body}
|
||||
<div id="body-content">
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="javascript:nf('blank', 'launch.php?s=board.php')">
|
||||
<img class="logo" src="/admin/static/images/logo.svg?v1" width="100" height="28" alt="wpjshop">
|
||||
</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav" role="menu">
|
||||
{function menu}
|
||||
{foreach $menu as $item}
|
||||
{if $item.visible}
|
||||
{if $item['submenu']}
|
||||
<li class="{if $item.level != 0}dropdown-submenu{else}dropdown{/if} menuitem-{$item.name|strip_accent}">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown"
|
||||
{if $item.right}
|
||||
href="launch.php?s=main.php&l={$view->encodeUrl($item.left)}&r={$view->encodeUrl($item.right)}" data-left="{$item.left}" data-right="{$item.right}"
|
||||
{else}
|
||||
href="#"
|
||||
{/if}
|
||||
>
|
||||
{if $item.title}{$item.title}{else}{$item.name|translate:"navigation"} {/if}{if $item.level == 0}
|
||||
<b class="caret"></b>
|
||||
{/if}
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{menu menu=$item.submenu}
|
||||
</ul>
|
||||
</li>
|
||||
{else}
|
||||
<li class="menuitem-{$item.name|strip_accent}">
|
||||
<a
|
||||
{if $item.script}
|
||||
href="javascript:{$item.script}"
|
||||
{elseif $item.href}
|
||||
href="{$item.href}" target="{$item.target}"
|
||||
{else}
|
||||
href="launch.php?s=main.php&l={$view->encodeUrl($item.left)}&r={$view->encodeUrl($item.right)}" data-left="{$item.left}"
|
||||
data-right="{$item.right}"
|
||||
{/if}
|
||||
>{if $item.title}{$item.title}{else}{$item.name|translate:"navigation"}{/if}
|
||||
{if $item.superadmin}
|
||||
<span class="glyphicon glyphicon-flash" style="color:#AAB2BD;" title="Vidí pouze superadmin"></span>
|
||||
{/if}</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/function}
|
||||
|
||||
{menu menu=$body.menu}
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{get_contexts domain=1 assign='domain_contexts'}
|
||||
{$domains = $domain_contexts.domain->getSupportedWithScheme()}
|
||||
{if $domains|count > 1}
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dro pdown" href="{$cfg.Addr.rel}" target="_blank">
|
||||
{ifmodule COMPONENTS}
|
||||
<img src="/favicon.ico" class="shop-logo" width="16" alt="{$dbcfg.shop_title}">
|
||||
{elsemodule}
|
||||
<img src="/templates/images/favicon.ico" class="shop-logo" width="16" alt="{$dbcfg.shop_title}">
|
||||
{/ifmodule}
|
||||
<span class="shop-name">{$cfg.Addr.print|replace:'/':''|replace:'www.':''}</span>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{foreach $domains as $domain => $address}
|
||||
{if $domain|strstr:'kupshop.local'}{continue}{/if}
|
||||
<li>
|
||||
<a href="{$address}" target="_blank">{$domain|replace:'/':''|replace:'www.':''}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a href="{$cfg.Addr.rel}" target="_blank" class="link-to-shop">
|
||||
{ifmodule COMPONENTS}
|
||||
<img src="/favicon.ico" class="shop-logo" width="16" alt="{$dbcfg.shop_title}">
|
||||
{elsemodule}
|
||||
<img src="/templates/images/favicon.ico" class="shop-logo" width="16" alt="{$dbcfg.shop_title}">
|
||||
{/ifmodule}
|
||||
<span class="shop-name">{$cfg.Addr.print|replace:'/':''|replace:'www.':''}</span>
|
||||
<span class="glyphicon glyphicon-new-window-alt"></span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="https://napoveda.wpjshop.cz/" class="help-link" data-beacon>
|
||||
<span class="bi bi-question-circle m-r-1"></span>
|
||||
<span>Nápověda</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown" id="quick-access">
|
||||
<a href="#" data-toggle="dropdown"><i class="glyphicon glyphicon-heart-empty"></i></a>
|
||||
<ul class="dropdown-menu" id="search">
|
||||
<li class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<form data-search="product">
|
||||
<input type="submit" name="default" class="hidden">
|
||||
<div class="form-search search-only">
|
||||
<i class="search-icon glyphicon glyphicon-search"></i>
|
||||
<input type="text" class="form-control search-query" name="search-product" id="search-product"
|
||||
style="width: 100%;" placeholder="Najít produkt">
|
||||
|
||||
<script>
|
||||
$('#search-product').adminAutoComplete({
|
||||
select: function(e, data) {
|
||||
var item = data.data.items[data.item.data('autocomplete-item')];
|
||||
nw('product', item.id, '&quick-access=1');
|
||||
setTimeout(cleanup, 1);
|
||||
return false;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<form data-search="order">
|
||||
<input type="submit" name="default" class="hidden">
|
||||
<div class="form-search search-only">
|
||||
<i class="search-icon glyphicon glyphicon-search"></i>
|
||||
<input type="text" class="form-control search-query" name="search-order" id="search-order"
|
||||
style="width: 100%;" placeholder="Najít objednávku">
|
||||
|
||||
<script>
|
||||
$('#search-order').adminOrderAutoComplete({
|
||||
select: function(e, data) {
|
||||
var item = data.data.items[data.item.data('autocomplete-item')];
|
||||
nw('order', item.id, '&quick-access=1');
|
||||
setTimeout(cleanup, 1);
|
||||
return false;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<form data-search="user">
|
||||
<input type="submit" name="default" class="hidden">
|
||||
<div class="form-search search-only">
|
||||
<i class="search-icon glyphicon glyphicon-search"></i>
|
||||
<input type="text" class="form-control search-query" name="search-user" id="search-user"
|
||||
style="width: 100%;" placeholder="Najít uživatele">
|
||||
|
||||
<script>
|
||||
$('#search-user').userAutocomplete({
|
||||
onSelect: (e, $item, items) => {
|
||||
const selectedObj = items[parseInt($item.data('autocomplete-item'))]
|
||||
nw('user', selectedObj.id, '&quick-access=1');
|
||||
setTimeout(cleanup, 1);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<form data-search="reclamation">
|
||||
<input type="submit" name="default" class="hidden">
|
||||
<div class="form-search search-only">
|
||||
<i class="search-icon glyphicon glyphicon-search"></i>
|
||||
<input type="text" class="form-control search-query" name="search-reclamation" id="search-reclamation"
|
||||
style="width: 100%;" placeholder="Najít reklamaci">
|
||||
<script>
|
||||
$('#search-reclamation').adminAutoComplete({
|
||||
type: 'Reclamations',
|
||||
{literal}
|
||||
subtemplates: {
|
||||
menuItem: '<div tabindex="-1" data-autocomplete-item="{{=index}}">' +
|
||||
'<p>Reklamace č. <strong>{{!item.code}}</strong><br><small>{{? item.invoice_firm}}{{!item.invoice_firm}}, {{?}}{{!item.customer_name}} </small></p>' +
|
||||
'{{#def.buttons}}' +
|
||||
'</div>' +
|
||||
'{{#def.bottom}}',
|
||||
},
|
||||
{/literal}
|
||||
select: function(e, data) {
|
||||
var item = data.data.items[data.item.data('autocomplete-item')];
|
||||
nw('Reclamations', item.id, '&quick-access=1');
|
||||
setTimeout(cleanup, 1);
|
||||
return false;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<form data-search="return">
|
||||
<input type="submit" name="default" class="hidden">
|
||||
<div class="form-search search-only">
|
||||
<i class="search-icon glyphicon glyphicon-search"></i>
|
||||
<input type="text" class="form-control search-query" name="search-return" id="search-return"
|
||||
style="width: 100%;" placeholder="Najít vratku">
|
||||
|
||||
<script>
|
||||
$('#search-return').adminAutoComplete({
|
||||
type: 'returns',
|
||||
{literal}
|
||||
subtemplates: {
|
||||
menuItem: '<div tabindex="-1" data-autocomplete-item="{{=index}}">' +
|
||||
'<p>Vratka č. <strong>{{!item.code}}</strong><br><small>{{? item.customer_name}}{{!item.customer_name}}, {{?}}{{!item.customer_name}} </small></p>' +
|
||||
'{{#def.buttons}}' +
|
||||
'</div>' +
|
||||
'{{#def.bottom}}',
|
||||
},
|
||||
{/literal}
|
||||
select: function(e, data) {
|
||||
var item = data.data.items[data.item.data('autocomplete-item')];
|
||||
nw('Returns', item.id, '&quick-access=1');
|
||||
setTimeout(cleanup, 1);
|
||||
return false;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="favourites-filters" class="col-md-12 quick-access-filters">
|
||||
{foreach $body.filters.storage as $filter}
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type={$filter.type}','launch.php?s=list.php&type={$filter.type}&filter={$filter.id}')"
|
||||
class="btn btn-sm"
|
||||
style="background-color: {$filter.color};border-color: {$filter.color}"
|
||||
title="{$filter.description}">{$filter.name}
|
||||
</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- OBSAH HLAVNIHO OKNA -->
|
||||
<div id="main_content">
|
||||
<div id="left_content" style="display:none">
|
||||
<iframe name="leftFrame" src="{if $body.left !== 'blank'}{$body.left}{/if}"></iframe>
|
||||
<a class="btn side-hide" id="left-content-hider"><span class="glyphicon glyphicon-chevron-left"></span></a>
|
||||
</div>
|
||||
<div id="right_content">
|
||||
<iframe name="mainFrame" src="{$body.right}"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// History Management
|
||||
History.init();
|
||||
|
||||
var hash = History.getHash();
|
||||
if (hash && hash.substr(0, 10) == 'launch.php')
|
||||
document.location.replace(hash);
|
||||
else
|
||||
History.replaceState({
|
||||
left: $('iframe[name=leftFrame]').attr('src'),
|
||||
right: $('iframe[name=mainFrame]').attr('src')
|
||||
}, "{$body.title}", null);
|
||||
|
||||
History.Adapter.bind(window, 'statechange', function() { // Note: We are using statechange instead of popstate
|
||||
var state = History.getState(); // Note: We are using History.getState() instead of event.state
|
||||
History.log(state.data, state.title, state.url);
|
||||
nf(state.data.left, state.data.right);
|
||||
});
|
||||
|
||||
// Menu links
|
||||
$('.navbar-default').on('click', 'a[data-right]', function(e) {
|
||||
var $this = $(this);
|
||||
nf('launch.php?' + $this.data('left'), 'launch.php?' + $this.data('right'), undefined, $this.text());
|
||||
return false;
|
||||
});
|
||||
|
||||
// Quick access
|
||||
function cleanup() {
|
||||
$('#search input[type=text]').val('');
|
||||
}
|
||||
|
||||
function refreshFavouritesFilters() {
|
||||
$('#favourites-filters').load(window.location + ' #favourites-filters');
|
||||
}
|
||||
|
||||
$('#quick-access').on('click', 'input[type=text]', function(e) {
|
||||
var $menuItem = $(e.delegateTarget);
|
||||
if (!$menuItem.is('.open'))
|
||||
$menuItem.find('a[data-toggle]').click();
|
||||
$(e.target).focus();
|
||||
});
|
||||
|
||||
$('#quick-access [data-search]').on('keydown', 'input[type=text]', function(e) {
|
||||
if (e.key == "Enter") {
|
||||
var type = $(this.form).data("search") + "s";
|
||||
nf("launch.php?s=menu.php&type=" + type, "launch.php?s=list.php&type=" + type + "&idCode=" + encodeURIComponent($(this).val()));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function handleShortcut(e) {
|
||||
if (e.key == 'F1') {
|
||||
window.focus();
|
||||
$('#quick-access > a').click();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.key == 'F2') {
|
||||
window.focus();
|
||||
$('#search-product').click().focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.key == 'F3') {
|
||||
window.focus();
|
||||
$('#search-order').click().focus();
|
||||
return false;
|
||||
}
|
||||
if (e.key == 'F4') {
|
||||
window.focus();
|
||||
$('#search-user').click().focus();
|
||||
return false;
|
||||
}
|
||||
if (e.key == 'F6') {
|
||||
window.focus();
|
||||
$('#search-reclamation').click().focus();
|
||||
return false;
|
||||
}
|
||||
if (e.key == 'F7') {
|
||||
window.focus();
|
||||
$('#search-return').click().focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var $body = $('body');
|
||||
$body.keydown(handleShortcut);
|
||||
|
||||
{if isDevelopment()}
|
||||
// Loading indicator
|
||||
(function($) {
|
||||
var $mainIframe = $('iframe[name=mainFrame]');
|
||||
|
||||
function load_start() {
|
||||
$body.addClass('loading');
|
||||
}
|
||||
|
||||
function load_stop() {
|
||||
$body.removeClass('loading');
|
||||
|
||||
this.contentWindow.onbeforeunload = load_start;
|
||||
}
|
||||
|
||||
load_start();
|
||||
$mainIframe.on('load', load_stop);
|
||||
})($);
|
||||
{/if}
|
||||
</script>
|
||||
{literal}
|
||||
<script>!function(e, t, n) {
|
||||
function a() {
|
||||
var e = t.getElementsByTagName("script")[0], n = t.createElement("script");
|
||||
n.type = "text/javascript", n.async = !0, n.src = "https://beacon-v2.helpscout.net", e.parentNode.insertBefore(n, e)
|
||||
}
|
||||
|
||||
if (e.Beacon = n = function(t, n, a) {
|
||||
e.Beacon.readyQueue.push({method: t, options: n, data: a})
|
||||
}, n.readyQueue = [], "complete" === t.readyState) return a();
|
||||
e.attachEvent ? e.attachEvent("onload", a) : e.addEventListener("load", a, !1)
|
||||
}(window, document, window.Beacon || function() {
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
window.Beacon('init', 'e8d8d426-0404-43e8-b43c-bd14c673ba3a');
|
||||
window.Beacon('identify', {/literal}{helpscout_beacon_identity}{literal});
|
||||
</script>
|
||||
<script>
|
||||
$('[data-beacon]').on('click', function() {
|
||||
Beacon('open');
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block onready append}
|
||||
|
||||
//prejmenovani hlavniho okna
|
||||
this.window.name = 'EshopMainFrame';
|
||||
|
||||
function showLeftPane(show) {
|
||||
$('#left_content').toggle(show);
|
||||
}
|
||||
|
||||
this.window.leftFrame = $('iframe[name=leftFrame]')[0].contentWindow;
|
||||
|
||||
if (localStorage.getItem('IsLeftContentCollapsed') == 'yes') {
|
||||
$('#left_content').toggleClass('collapsed');
|
||||
$('#left-content-hider').toggleClass('collapsed');
|
||||
}
|
||||
$('#left-content-hider').click(function() {
|
||||
$('#left_content').toggleClass('collapsed');
|
||||
$(this).toggleClass('collapsed');
|
||||
localStorage.setItem('IsLeftContentCollapsed', $(this).is('.collapsed') ? 'yes' : 'no');
|
||||
});
|
||||
|
||||
var bodyLeft = '{$body.left}';
|
||||
if (bodyLeft === 'blank' || !bodyLeft) {
|
||||
window.top.showLeftPane(false);
|
||||
}
|
||||
|
||||
window.FavicoInit();
|
||||
|
||||
{/block}
|
||||
</script>
|
||||
16
admin/templates/massprocess/cp.tpl
Normal file
16
admin/templates/massprocess/cp.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
{foreach $orders as $order}
|
||||
{strip}"{$order.id}";
|
||||
"{$order.to_pay|round:2}";
|
||||
"50000";
|
||||
"{if strpos(mb_strtolower($order.delivery_type_name, 'UTF-8'), "expresní příplatek") !== false}BODE{else}{if strpos(mb_strtolower($order.delivery_type_name, 'UTF-8'), "na poštu") === false}BODR{else}BONP{/if}{/if}";
|
||||
"{$order.delivery_name nofilter} {$order.delivery_surname nofilter}{if $order.delivery_firm} {$order.delivery_firm nofilter}{/if}";
|
||||
"{$order.delivery_name nofilter} {$order.delivery_surname nofilter}{if $order.delivery_firm} {$order.delivery_firm nofilter}{/if}";
|
||||
"{$order.delivery_street|replace:'"':"'" nofilter}";
|
||||
"{$order.delivery_zip}";
|
||||
"{$order.delivery_city}";
|
||||
"{$order.delivery_suburb}";
|
||||
"{$order.delivery_country}";
|
||||
"{$order.invoice_phone}";
|
||||
"{$order.invoice_email}";
|
||||
"{if $order.note_admin.delivery_data.time_zone}B{else}A{/if}"{/strip}{"\r"}
|
||||
{/foreach}
|
||||
102
admin/templates/massprocess/dpd.tpl
Normal file
102
admin/templates/massprocess/dpd.tpl
Normal file
@@ -0,0 +1,102 @@
|
||||
{strip}
|
||||
"";
|
||||
"Jmeno Prijmeni (nazev firmy)";
|
||||
"";
|
||||
"DIC";
|
||||
"Stat (CZ/SK)";
|
||||
"Ulice";
|
||||
"C.p.";
|
||||
"Mesto";
|
||||
"PSC";
|
||||
"Telefon";
|
||||
"Email";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"Produkt";
|
||||
"";
|
||||
"Kód objednávky";
|
||||
"Dobírka";
|
||||
"CZK";
|
||||
"Typ platby";
|
||||
"Poznámka";
|
||||
{/strip}
|
||||
{foreach $orders as $order}
|
||||
{strip}
|
||||
"";
|
||||
"{$order.delivery_name} {$order.delivery_surname}{if $order.delivery_firm} {$order.delivery_firm}{/if}";
|
||||
"";
|
||||
"";
|
||||
"{if $order.delivery_country|mb_stristr:"Česk" || $order.delivery_country|stristr:"CZ" || $order.delivery_country|stristr:"ČR" || empty($order.delivery_country)}CZ
|
||||
{elseif $order.delivery_country|stristr:"Slovensk" || $order.delivery_country|strstr:"SK"}SK{/if}";
|
||||
"{$order.delivery_street}";
|
||||
"{$order.delivery_suburb}";
|
||||
"{$order.delivery_city}";
|
||||
"{$order.delivery_zip|replace:" ":""}";
|
||||
"{$order.invoice_phone|replace:'+420':''|replace:' ': ''}";
|
||||
"{$order.invoice_email}";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"40054";
|
||||
"";
|
||||
"{$order.order_no}";
|
||||
"{round($order.to_pay)}";
|
||||
"CZK";
|
||||
"1";
|
||||
"{$order.comment|html_entity_decode}"
|
||||
{/strip}
|
||||
{/foreach}
|
||||
|
||||
{* Šablona Standardní II
|
||||
"{$order.delivery_name} {$order.delivery_surname}{if $order.delivery_firm} {$order.delivery_firm}{/if}";
|
||||
"{if $order.delivery_country|mb_stristr:"Česk" || $order.delivery_country|stristr:"CZ" || $order.delivery_country|stristr:"ČR" || empty($order.delivery_country)}CZ
|
||||
{elseif $order.delivery_country|stristr:"Slovensk" || $order.delivery_country|strstr:"SK"}SK{/if}";
|
||||
"{$order.delivery_city}";
|
||||
"{$order.delivery_street}";
|
||||
"{$order.delivery_suburb}";
|
||||
"{$order.delivery_zip|replace:" ":""}";
|
||||
"{$order.invoice_phone}";
|
||||
"{$order.invoice_email}";
|
||||
"1";
|
||||
"{$order.to_pay|round:$dbcfg.price_round}";
|
||||
"CZK";
|
||||
"1";
|
||||
" ";
|
||||
" " *}
|
||||
|
||||
{*
|
||||
generuje se csv, pak se v php konvertuje do xls
|
||||
Format dat pro DPD formát "Import zasilek standardni II xls":
|
||||
|
||||
|
||||
Jméno příjemce;
|
||||
Země příjemce musí se nakonfigorovat jako: mezinárodní kód CZ, SK, PL, DE, … nebo id IT4EM 605, … (POVINNÉ POLE);
|
||||
Město příjemce(POVINNÉ POLE);
|
||||
Ulice příjemce(POVINNÉ POLE);
|
||||
Č. p. příjemce;
|
||||
PSČ příjemce bez mezer(POVINNÉ POLE);
|
||||
Telefon příjemce;
|
||||
Email příjemce;
|
||||
Produkt
|
||||
40066 / DPD 10:00
|
||||
40067 / DPD 12:00
|
||||
1 / DPD CLASSIC
|
||||
40042 / DPD CLASSIC Intercontinental
|
||||
40043 / DPD GUARANTEE
|
||||
50101 / DPD ParcelShop
|
||||
40054 / DPD Private
|
||||
40040 / DPDBox
|
||||
40048 / DPDPack
|
||||
40041 / Guarantee DPDBox
|
||||
40049 / Guarantee DPDPack
|
||||
40060 / Výměnná zásilka (POVINNÉ POLE)
|
||||
;
|
||||
COD částka používat pouze s desetinou tečkou;
|
||||
COD Měna;
|
||||
COD typ platby 1 = hotovost 2 = platební kartou, 0=bez platby;
|
||||
COD variabilní symbol;
|
||||
Hmotnost;
|
||||
*}
|
||||
52
admin/templates/massprocess/ppl.tpl
Normal file
52
admin/templates/massprocess/ppl.tpl
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ArrayOfPPLSprint>
|
||||
{foreach $orders as $o}
|
||||
<PPLSprint>
|
||||
<PackageIdPPL/>
|
||||
<DCOD/>
|
||||
<PackageType>16</PackageType>
|
||||
<PickupDate>{$o.date|replace:" ":"T"}</PickupDate>
|
||||
<PickupTimeFrom>01:00</PickupTimeFrom>
|
||||
<PickupTimeTo>14:00</PickupTimeTo>
|
||||
<PickupType>PT</PickupType>
|
||||
<DelivTimeFrom>08:00</DelivTimeFrom>
|
||||
<DelivTimeTo>11:00</DelivTimeTo>
|
||||
<CountOfEuroPal>0</CountOfEuroPal>
|
||||
<Email>{$o.invoice_email}</Email>
|
||||
<GoodsDesc>Popis zbozi.</GoodsDesc>
|
||||
<CustRef>{$o.id}</CustRef>
|
||||
<InsuranceValue>0</InsuranceValue>
|
||||
<CodValue>{$o.to_pay}</CodValue>
|
||||
<CodCurCode>CZK</CodCurCode>
|
||||
<CodVarCode>{$o.id}</CodVarCode>
|
||||
<SendName>{$dbcfg.shop_firm_name}</SendName>
|
||||
<SendStreet>{$dbcfg.shop_address}</SendStreet>
|
||||
<SendCity>Mesto</SendCity>
|
||||
<SendZipCode>{$zip.0}</SendZipCode>
|
||||
<SendContact>{$dbcfg.shop_email}</SendContact>
|
||||
<SendPhone>{$dbcfg.shop_phone}</SendPhone>
|
||||
<RecName>{$o.delivery_name} {$o.delivery_surname}{if $o.delivery_firm} {$o.delivery_firm}{/if}</RecName>
|
||||
<RecStreet>{$o.delivery_street} {$o.delivery_suburb}</RecStreet>
|
||||
<RecCity>{$o.delivery_city}</RecCity>
|
||||
<RecZipCode>{$o.delivery_zip}</RecZipCode>
|
||||
<RecContact>{$o.delivery_name}</RecContact>
|
||||
<RecPhone>{$o.invoice_phone}</RecPhone>
|
||||
<CrgManId>2</CrgManId>
|
||||
<PackageItems>
|
||||
<PPLSprintItem>
|
||||
<LPNumber/>
|
||||
<CaseDescription>Balík</CaseDescription>
|
||||
<Weight>1</Weight>
|
||||
<Length>0</Length>
|
||||
<Height>0</Height>
|
||||
<Width>0</Width>
|
||||
</PPLSprintItem>
|
||||
</PackageItems>
|
||||
<ErrorCode>0</ErrorCode>
|
||||
</PPLSprint>
|
||||
{/foreach}
|
||||
</ArrayOfPPLSprint>
|
||||
|
||||
{*
|
||||
XML podle formátu http://klient.ppl.cz/help.aspx#format_palety_xml
|
||||
*}
|
||||
134
admin/templates/menu.tpl
Normal file
134
admin/templates/menu.tpl
Normal file
@@ -0,0 +1,134 @@
|
||||
{extends "frame.tpl"}
|
||||
|
||||
{block body_class}class="body-menu"{/block}
|
||||
|
||||
{block functions append}
|
||||
{function name="inversion" field=""}
|
||||
<label class="input-group-addon" title="{'inversionInfo'|translate:'filter'}">
|
||||
<input class="input" type="checkbox" name="{$field}_invert" value="1">
|
||||
<span class="bi bi-dash-circle-fill"></span>
|
||||
</label>
|
||||
{/function}
|
||||
{/block}
|
||||
|
||||
{block name="title"}
|
||||
{translate_type type=$type}
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon {block list_icon}glyphicon-tags{/block}"></i><span>{translate_type type=$type}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type={$type}');"><i class="glyphicon glyphicon-list"></i> <span>{'toolbar_list'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('{$type}', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'toolbar_add'|translate}</span></a></li>
|
||||
{/block}
|
||||
</ul>
|
||||
|
||||
{/block}
|
||||
|
||||
<script type="text/javascript">
|
||||
{block name="onready" append}
|
||||
// Opening / Closing parts
|
||||
function getOpenedPills(name)
|
||||
{
|
||||
try{
|
||||
return JSON.parse(localStorage.getItem("menu-"+name+"-opened")) || {};
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
function setOpenedPills(name, index, value)
|
||||
{
|
||||
var items = getOpenedPills(name);
|
||||
if (value)
|
||||
items[index] = value;
|
||||
else
|
||||
delete items[index];
|
||||
|
||||
localStorage.setItem("menu-"+name+"-opened", JSON.stringify(items));
|
||||
}
|
||||
|
||||
$(document).on('click', '.opener', function(){
|
||||
var index = $(".opener").index(this);
|
||||
var $pill = $(".pill-content").eq(index);
|
||||
$pill.toggleClass("hidden");
|
||||
|
||||
if (!$pill.is('.opener-no-remember')) {
|
||||
setOpenedPills('{$type}', index, !$pill.is('.hidden'));
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Reset btn - chosen
|
||||
$('input[type="reset"], button[type="reset"]').click(function() {
|
||||
$(".selecter").val('').trigger("chosen:updated");
|
||||
setTimeout(() => {
|
||||
$(this).closest('form').submit();
|
||||
}, 10);
|
||||
});
|
||||
|
||||
|
||||
var opened = getOpenedPills('{$type}');
|
||||
if (Object.keys(opened).length > 0)
|
||||
{
|
||||
$pills = $(".pill-content:not(.always-visible)");
|
||||
for (index in opened)
|
||||
$pills.eq(index).toggleClass("hidden");
|
||||
}
|
||||
|
||||
// Search form
|
||||
var $form = $('[data-search=form]');
|
||||
if ($form.length)
|
||||
{
|
||||
function isMassEditActive() {
|
||||
const mainSearchParams = new URL($("[name='mainFrame']", window.parent.document).contents().get(0).location.href).searchParams;
|
||||
return mainSearchParams.get('s') === 'listEdit.php';
|
||||
}
|
||||
|
||||
function submitSingle($item)
|
||||
{
|
||||
var $always = $form.find('[data-search=always]'),
|
||||
$itemInputs = $item.find(':input');
|
||||
|
||||
var queryString = $.merge($always, $itemInputs).serialize();
|
||||
|
||||
if (isMassEditActive()) {
|
||||
const searchParams = new URLSearchParams(queryString);
|
||||
searchParams.set('s', 'listEdit.php');
|
||||
queryString = searchParams.toString();
|
||||
}
|
||||
|
||||
const url = 'launch.php?' + queryString;
|
||||
|
||||
nf(null, url);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$form.on('keypress', '[data-search=item] :input', function(e) {
|
||||
if (e.key == "Enter" && e.ctrlKey == false && e.shiftKey == false)
|
||||
{
|
||||
return submitSingle($(e.target).closest('[data-search=item]'));
|
||||
}
|
||||
}).on('submit', function(e) {
|
||||
var $btn = $(e.target).find(':input[type=submit]:focus'),
|
||||
$item = $btn.closest('[data-search=item]');
|
||||
if ($item.length) {
|
||||
return submitSingle($item);
|
||||
} else if (isMassEditActive()) {
|
||||
$(this).find("[name='s']").val('listEdit.php');
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
if (window.top.showLeftPane) {
|
||||
window.top.showLeftPane(true);
|
||||
}
|
||||
{/block}
|
||||
</script>
|
||||
12
admin/templates/menu/admins.tpl
Normal file
12
admin/templates/menu/admins.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
{if {find_right name="OTH_ADM_"}}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-user"></i><span>{'AdminsMenu'|translate}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=admins');"><i class="glyphicon glyphicon-list"></i> <span>{'AdminsMenu'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('admin', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'AddAdministrator'|translate}</span></a></li>
|
||||
</ul>
|
||||
{/if}
|
||||
{/block}
|
||||
34
admin/templates/menu/artauthors.tpl
Normal file
34
admin/templates/menu/artauthors.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block "content"}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="nav-header"><i class=" glyphicon glyphicon-book"></i><span>{'allitems'|translate}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=artauthors');"><i class="glyphicon glyphicon-list"></i> <span>{'authorList'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('artauthor', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'addAuthor'|translate}</span></a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav nav-pills nav-stacked small-hidden">
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
|
||||
<li class="pill-content">
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="name" placeholder="{'searchName'|translate}"/>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" border="0" class="btn btn-secondary btn-sm" title="Vyhledat"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="s" value="list.php">
|
||||
<input type="hidden" name="type" value="artauthors" />
|
||||
|
||||
<input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
|
||||
</form>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{/block}
|
||||
130
admin/templates/menu/articles.tpl
Normal file
130
admin/templates/menu/articles.tpl
Normal file
@@ -0,0 +1,130 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-book"></i><span>{'articles'|translate}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=articles');"><i class="glyphicon glyphicon-list"></i> <span>{'articleList'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('article', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'addArticle'|translate}</span></a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked small-hidden">
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-filter"></i><span>{'filter'|translate}</span></li>
|
||||
{if {find_module name="articles_sections"}}
|
||||
<li class="with_caret"><a href="#" class="opener"><span>{'filterBySections'|translate}</span></a></li>
|
||||
<li class="pill-content hidden">
|
||||
<div class="tree">
|
||||
{include file='../menuTree.tpl'}
|
||||
{menuTree data=$article_sec}
|
||||
</div>
|
||||
</li>
|
||||
{/if}
|
||||
<li><a href="launch.php?s=list.php&type=articles&figure=N" target="mainFrame"><span>{'filterHidden'|translate}</span></a></li>
|
||||
<li><a href="launch.php?s=list.php&type=articles&figure=Y" target="mainFrame"><span>{'filterDisplayed'|translate}</span></a></li>
|
||||
{*<li class="with_caret "><a href="#" class="opener"><span>Podle autorů</span></a></li>
|
||||
<li class="pill-content hidden ">
|
||||
<div class="nav-sub nav-pills">
|
||||
<ul>
|
||||
{foreach from=$article_aut item=author}
|
||||
<li>
|
||||
<a onmousedown="_XP_selectItem(event);" target="mainFrame" href="launch.php?s=list.php&type=articles&IDauth={$author.id}">
|
||||
{$author.nick}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</li>*}
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
|
||||
<li class="with_caret "><a href="#" class="opener"><span>{'searchBasic'|translate}</span></a></li>
|
||||
<li class="pill-content hidden">
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="IDa" maxlength="10" value="" onKeyPress="checkInputData('int')" placeholder="{'searchIdPlaceholder'|translate}"/>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" border="0" class="btn btn-primary btn-sm" title="{'lookUp'|translate}"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="title" value="" placeholder="{'searchTitlePlaceholder'|translate}"/>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" border="0" class="btn btn-primary btn-sm" title="{'lookUp'|translate}"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select name="figure[]" multiple="multiple" class="selecter" data-placeholder="{'searchFigurePlaceholder'|translate}">
|
||||
<option value="Y">Viditelný</option>
|
||||
<option value="N">Skrytý</option>
|
||||
</select>
|
||||
{inversion field="figure"}
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />
|
||||
|
||||
<input type="reset" value="Vymazat" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="Hledat" class="btn btn-primary btn-sm"/>
|
||||
</form>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="with_caret "><a href="#" class="opener"><span>{'searchDate'|translate}</span></a></li>
|
||||
<li class="pill-content hidden ">
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="dateFrom">{'searchDateFrom'|translate}</label>
|
||||
<input type="text" class="form-control input-sm" name="dateFrom" id="dateFrom" maxlength="10" value="{$dateFrom|format_date:'admin'}" placeholder="{'searchDateFromPlaceholder'|translate}" autocomplete="off"/>
|
||||
{insert_calendar selector='#dateFrom' format='date'}
|
||||
<label for="dFND"><input type="checkbox" name="dateFromNotDecide" value="ON" id="dFND" checked="checked" />{'notDecide'|translate}</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="dateTo">{'searchDateTo'|translate}</label>
|
||||
<input type="text" class="form-control input-sm" name="dateTo" id="dateTo" maxlength="10" value="{$dateFrom|format_date:'admin'}" placeholder="{'searchDateToPlaceholder'|translate}" autocomplete="off"/>
|
||||
{insert_calendar selector='#dateTo' format='date'}
|
||||
<label for="dTND"><input type="checkbox" name="dateToNotDecide" value="ON" id="dTND" checked="checked" />{'notDecide'|translate}</label>
|
||||
</div>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />
|
||||
<input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'find'|translate}" class="btn btn-primary btn-sm"/>
|
||||
</form>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="with_caret "><a href="#" class="opener"><span>{'searchTag'|translate}</span></a></li>
|
||||
<li class="pill-content hidden ">
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
<div class="form-group">
|
||||
{print_select name="tags[]" param="data-type='articles_tags' id='tags' multiple='multiple'"}
|
||||
<script>
|
||||
articles_applyChosen($('#tags'));
|
||||
|
||||
function articles_applyChosen($selector) {
|
||||
$selector.ajaxChosen({
|
||||
minTermLength: 0,
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: 'launch.php?s=autocomplete.php&type=' + $selector.data('type')
|
||||
}, function (data) {
|
||||
return data;
|
||||
}, {
|
||||
width: '100%',
|
||||
allow_single_deselect: true,
|
||||
placeholder_text_single: 'Vyberte možnost',
|
||||
placeholder_text_multiple: 'Vyberte několik možností'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="articles" />
|
||||
<input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'find'|translate}" class="btn btn-primary btn-sm"/>
|
||||
</form>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{/block}
|
||||
7
admin/templates/menu/artsections.tpl
Normal file
7
admin/templates/menu/artsections.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class=" glyphicon glyphicon-book"></i><span>{translate_type type=$type}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type={$type}');"><i class="glyphicon glyphicon-list"></i> <span>{'sectionList'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('{$type}', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'addSection'|translate}</span></a></li>
|
||||
{/block}
|
||||
7
admin/templates/menu/automatic_import.tpl
Normal file
7
admin/templates/menu/automatic_import.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-floppy-save"></i><span>Automat. import</li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=automatic_import');"><i class="glyphicon glyphicon-list"></i> <span>Seznam importů</span></a></li>
|
||||
<li><a href="javascript:nw('automatic_import', '0');"><i class="glyphicon glyphicon-plus"></i> <span>Přidat import</span></a></li>
|
||||
{/block}
|
||||
7
admin/templates/menu/currencies.tpl
Normal file
7
admin/templates/menu/currencies.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-usd"></i><span>{translate_type type=$type}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=currencies');"><i class="glyphicon glyphicon-list"></i> <span>Seznam měn</span></a></li>
|
||||
<li><a href="javascript:nw('currencies', '0');"><i class="glyphicon glyphicon-plus"></i> <span>Přidat měnu</span></a></li>
|
||||
{/block}
|
||||
46
admin/templates/menu/dbbackup.tpl
Normal file
46
admin/templates/menu/dbbackup.tpl
Normal file
@@ -0,0 +1,46 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="content"}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-repeat"></i><span>{translate_type type=$type}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=dbbackup');"><i class="glyphicon glyphicon-list"></i> <span>{'DatabaseBackups'|translate}</span></a></li>
|
||||
<li><a href="launch.php?s=dbbackup.php&acn=add" target="mainFrame" data-add><i class="glyphicon glyphicon-plus"></i> <span>{'CreateBackup'|translate}</span></a></li>
|
||||
<li><a href="launch.php?s=list.php&type=dbbackup&acn=exportDataFiles" target="mainFrame" onclick="return confirm('Opravdu chcete exportovat všechny data? Výsledný ZIP může mít velikost stovek GB.')"><i class="glyphicon glyphicon-download"></i> <span>{'ExportDataFiles'|translate}</span></a></li>
|
||||
{if isSuperuser()}
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-upload"></i><span>{'uploadBackup'|translate}</span></li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
{if isSuperuser()}
|
||||
<ul class="nav nav-pills nav-stacked small-hidden">
|
||||
<li class="pill-content">
|
||||
<div class="nav-sub nav-pills">
|
||||
<form target="mainFrame" enctype="multipart/form-data" method="POST" action="launch.php?s=dbbackup.php&acn=upload" class="form-inline">
|
||||
<div class="form-group">
|
||||
<input type="file" required class="filestyle" name="upload_db" data-iconName="glyphicon-folder-open" data-value='ok' data-buttonText="Nahrát"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'upload'|translate}" class="btn btn-primary btn-sm"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
$('[data-add]').click(function() {
|
||||
|
||||
var now = new Date(),
|
||||
name = 'db' + $.datepicker.formatDate('yy-mm-dd_', now) + now.getHours()+"-"+now.getMinutes()+"-"+now.getSeconds();
|
||||
|
||||
var new_name = window.prompt('Zadejte jméno zálohy', name);
|
||||
|
||||
if (new_name)
|
||||
window.top.mainFrame.location.replace('launch.php?s=dbbackup.php&acn=add&name=' + new_name);
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
51
admin/templates/menu/delivery.tpl
Normal file
51
admin/templates/menu/delivery.tpl
Normal file
@@ -0,0 +1,51 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-plane"></i><span>{'DeliveryMethod'|translate}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=delivery');"><i class="glyphicon glyphicon-list"></i> <span>{'DeliveryMethod'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('delivery', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'AddDeliveryMethod'|translate}</span></a></li>
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
{if findModule('eshop_delivery')}
|
||||
<div class="form-group">
|
||||
<label>{'figure'|translate}</label>
|
||||
<select name="figure" class="form-control input-sm">
|
||||
<option value="" selected>{'all'|translate}</option>
|
||||
<option value="Y">{'visible'|translate}</option>
|
||||
<option value="N">{'hidden'|translate}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select data-autocomplete="deliveries" name="delivery[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'deliveryName'|translate}">
|
||||
</select>
|
||||
{inversion field="delivery"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select data-autocomplete="payments" name="payment[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'deliveryPay'|translate}">
|
||||
</select>
|
||||
{inversion field="payment"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select data-autocomplete="countries" name="country[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'deliveryCountry'|translate}">
|
||||
</select>
|
||||
{inversion field="country"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<input type="reset" id="resetBtn" value="{'delete'|translate:"orders"}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'searchBtn'|translate:"orders"}" class="btn btn-primary btn-sm"/>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="{$type}"/>
|
||||
</div>
|
||||
</form>
|
||||
</ul>
|
||||
{/block}
|
||||
64
admin/templates/menu/deliveryDelivery.tpl
Normal file
64
admin/templates/menu/deliveryDelivery.tpl
Normal file
@@ -0,0 +1,64 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-tags"></i><span>{translate_type type=$type}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=deliveryDelivery');"><i class="glyphicon glyphicon-list"></i> <span>{'deliveryDelivery'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('deliveryDelivery', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'AddDeliveryMethod'|translate}</span></a></li>
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
{if findModule('eshop_delivery')}
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="name" maxlength="100" value=""
|
||||
placeholder="{'deliverySearch'|translate}">
|
||||
<input type="hidden" name="type" value="deliveryDelivery"/>
|
||||
<input type="hidden" name="s" value="list.php">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i
|
||||
class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control input-sm" name="nameCart" maxlength="100" value=""
|
||||
placeholder="{'deliverySearchCart'|translate}">
|
||||
<input type="hidden" name="type" value="deliveryDelivery"/>
|
||||
<input type="hidden" name="s" value="list.php">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" border="0" class="btn btn-primary btn-sm" title="Vyhledat"><i
|
||||
class="glyphicon glyphicon-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
|
||||
<select name="id_delivery[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'deliveryType'|translate}">
|
||||
{foreach Delivery::listClasses() as $id => $delivery}
|
||||
<option value="{$id}">{$delivery}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{inversion field="id_delivery"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select data-autocomplete="countries" name="country[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'deliveryCountry'|translate}">
|
||||
</select>
|
||||
{inversion field="country"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="form-group">
|
||||
<input type="reset" id="resetBtn" value="{'delete'|translate:"orders"}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'searchBtn'|translate:"orders"}" class="btn btn-primary btn-sm"/>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="{$type}"/>
|
||||
</div>
|
||||
</form>
|
||||
</ul>
|
||||
{/block}
|
||||
39
admin/templates/menu/deliveryPayment.tpl
Normal file
39
admin/templates/menu/deliveryPayment.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-tags"></i><span>{'deliveryPayment'|translate}</span></li>
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=deliveryPayment');"><i class="glyphicon glyphicon-list"></i> <span>{'deliveryPayment'|translate}</span></a></li>
|
||||
<li><a href="javascript:nw('deliveryPayment', '0');"><i class="glyphicon glyphicon-plus"></i> <span>{'AddDeliveryPayment'|translate}</span></a></li>
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-search"></i><span>{'search'|translate}</span></li>
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
{if findModule('eshop_delivery')}
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select data-autocomplete="payments" name="paymentName[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'paymentName'|translate}">
|
||||
</select>
|
||||
{inversion field="paymentName"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
|
||||
<select name="paymentType[]" multiple="multiple" class="selecter"
|
||||
data-placeholder="{'paymentType'|translate}">
|
||||
{foreach Payment::listClasses() as $id => $payment}
|
||||
<option value="{$id}">{$payment}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{inversion field="paymentType"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="form-group">
|
||||
<input type="reset" id="resetBtn" value="{'delete'|translate:"orders"}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'searchBtn'|translate:"orders"}" class="btn btn-primary btn-sm"/>
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="{$type}"/>
|
||||
</div>
|
||||
</form>
|
||||
</ul>
|
||||
{/block}
|
||||
46
admin/templates/menu/discounts.tpl
Normal file
46
admin/templates/menu/discounts.tpl
Normal file
@@ -0,0 +1,46 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="content"}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-bookmark"></i><span>{'SubscriptionDiscounts'|translate}</span></li>
|
||||
<li class="nav-header smaller"><span>{'DiscountList'|translate}</span></li>
|
||||
{foreach $condition_types as $key => $type}
|
||||
<li><a href="javascript:nf('', 'launch.php?s=list.php&type=discounts&condition_type={$key}');"><i class="glyphicon glyphicon-list"></i> <span>{ucfirst($type|translate)}</span><i class="glyphicon glyphicon-plus pull-right" onclick="javascript:nw('discount', '0', '{$key}');" title="{'DiscountAdd'|translate}"></i></a></li>
|
||||
{/foreach}
|
||||
|
||||
<li class="nav-header smaller"><i class="glyphicon glyphicon-filter"></i><span>{'filter'|translate}</span></li>
|
||||
<li class="pill-content">
|
||||
<ul class="nav-sub nav-pills">
|
||||
<form target="mainFrame" method="get" action="launch.php" class="form-inline">
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<select class="selecter" multiple="multiple" name="onlyActive" data-placeholder="{'selectStatus'|translate}">
|
||||
<option value="1">{'onlyActive'|translate}</option>
|
||||
<option value="2">{'onlyInactive'|translate}</option>
|
||||
</select>
|
||||
{inversion field="onlyActive"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<input type="text" class="form-control input-sm disable-spinner" name="descr" maxlength="100" value="" placeholder="{'searchDescr'|translate}">
|
||||
{inversion field="descr"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group invert">
|
||||
<input type="text" class="form-control input-sm disable-spinner" name="condition_value" maxlength="19" value="" placeholder="{'searchValue'|translate}">
|
||||
{inversion field="condition_value"}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="s" value="list.php"><input type="hidden" name="type" value="discounts" />
|
||||
<input type="reset" value="{'delete'|translate}" class="btn btn-danger btn-sm"/>
|
||||
<input type="submit" value="{'searchBtn'|translate}" class="btn btn-primary btn-sm"/>
|
||||
</div>
|
||||
</form>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
{/block}
|
||||
28
admin/templates/menu/export.tpl
Normal file
28
admin/templates/menu/export.tpl
Normal file
@@ -0,0 +1,28 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-floppy-open"></i><span> {'Exports'|translate}</span></li>
|
||||
{if {find_module name="products"}}
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=export_products');"><i class="glyphicon glyphicon-list"></i> <span>{'ExportOfProducts'|translate}</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=export_selling_products');"><i class="glyphicon glyphicon-list"></i> <span>{'ExportOfSellingProducts'|translate}</span></a>
|
||||
</li>
|
||||
{/if}
|
||||
{if {find_module name="orders"}}
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=export_orders');"><i class="glyphicon glyphicon-list"></i> <span>{'ExportOrders'|translate}</span></a>
|
||||
</li>
|
||||
{/if}
|
||||
{ifmodule INVOICES}
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=export_invoices');"><i class="glyphicon glyphicon-list"></i> <span>{'ExportInvoices'|translate}</span></a>
|
||||
</li>
|
||||
{/ifmodule}
|
||||
{if {find_module name="eshop_users"}}
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=export_users');"><i class="glyphicon glyphicon-list"></i> <span>{'ExportUsers'|translate}</span></a>
|
||||
</li>
|
||||
{/if}
|
||||
{/block}
|
||||
17
admin/templates/menu/import.tpl
Normal file
17
admin/templates/menu/import.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="menu-items"}
|
||||
<li class="nav-header"><i class="glyphicon glyphicon-floppy-save"></i><span>Import</span></li>
|
||||
<?if(findModule('products')) { ?>
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=import&what=products');"><i class="glyphicon glyphicon-list"></i> <span>Import zboží</span></a>
|
||||
</li>
|
||||
<?if(findModule('eshop_users')) { ?>
|
||||
<li>
|
||||
<a href="javascript:nf('', 'launch.php?s=board.php&type=import&what=users');"><i class="glyphicon glyphicon-list"></i> <span>Import uživatelů</span></a>
|
||||
</li>
|
||||
<?if(findModule('automatic_import')) { ?>
|
||||
<li>
|
||||
<a href="javascript:nf('launch.php?s=menu.php&type=automatic_import', 'launch.php?s=list.php&type=automatic_import');"><i class="glyphicon glyphicon-list"></i> <span>Automatický import</span></a>
|
||||
</li>
|
||||
{/block}
|
||||
5
admin/templates/menu/index.tpl
Normal file
5
admin/templates/menu/index.tpl
Normal file
@@ -0,0 +1,5 @@
|
||||
{extends "../menu.tpl"}
|
||||
|
||||
{block name="content"}
|
||||
|
||||
{/block}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user