- Создан API create_document_with_text.php для создания DOCX/XLSX/PPTX с текстом от AI - Поддержка Markdown форматирования (заголовки, жирный, курсив, списки, код) - Установлен PHPWord для красивого форматирования документов - Исправлены пути сохранения (crm2/CRM_Active_Files/... без /crm/ в начале) - Замена пробелов на подчеркивания в именах папок - Создана документация для AI и разработчиков - Добавлены API для работы с шаблонами Nextcloud
225 lines
14 KiB
PHP
225 lines
14 KiB
PHP
<?php /* Smarty version Smarty-3.1.7, created on 2025-11-10 22:07:43
|
|
compiled from "/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/VT7/SidebarConfig.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:42654326691237ffeded44-88122476%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'a9fd26e7462cbe079d87a60c40d9985ebb9c1093' =>
|
|
array (
|
|
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Settings/Workflow2/VT7/SidebarConfig.tpl',
|
|
1 => 1711810493,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '42654326691237ffeded44-88122476',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'variables' =>
|
|
array (
|
|
'workflowData' => 0,
|
|
'workflowID' => 0,
|
|
'module' => 0,
|
|
'key' => 0,
|
|
'moduleName' => 0,
|
|
'runningCounter' => 0,
|
|
'errorCounter' => 0,
|
|
'IsInventory' => 0,
|
|
'typesCat' => 0,
|
|
'blockKey' => 0,
|
|
'typekey' => 0,
|
|
'typeVal' => 0,
|
|
'types' => 0,
|
|
'type' => 0,
|
|
'VERSION' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_691237fff281f',
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_691237fff281f')) {function content_691237fff281f($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_replace')) include '/var/www/fastuser/data/www/crm.clientright.ru/libraries/Smarty/libs/plugins/modifier.replace.php';
|
|
?><div class="WFDSidebar settingsgroup">
|
|
<h5 style="overflow:hidden;padding-right:1px;">
|
|
<a href="index.php?module=Workflow2&view=Index&parent=Settings" class="btn btn-default pull-right"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i> <?php echo vtranslate("Back","Settings:Workflow2");?>
|
|
</a>
|
|
<?php echo vtranslate("Settings","Settings:Workflow2");?>
|
|
|
|
</h5>
|
|
<div class="panel">
|
|
<form method="POST" action="#" <?php if ($_smarty_tpl->tpl_vars['workflowData']->value['module_name']!=''){?>onsubmit='return false'<?php }?> role="form">
|
|
<input type="hidden" name="workflow[id]" value="<?php echo $_smarty_tpl->tpl_vars['workflowID']->value;?>
|
|
">
|
|
<?php if ($_smarty_tpl->tpl_vars['workflowData']->value['module_name']==''){?>
|
|
<div><?php echo vtranslate("Main Module","Settings:Workflow2");?>
|
|
</div>
|
|
<div><select class="chzn-select" style="float:right;height:25px;width:199px;" name="workflow[mainmodule]">
|
|
<?php $_smarty_tpl->tpl_vars['moduleName'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['moduleName']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['module']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['moduleName']->key => $_smarty_tpl->tpl_vars['moduleName']->value){
|
|
$_smarty_tpl->tpl_vars['moduleName']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['moduleName']->key;
|
|
?>
|
|
<option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
|
|
"><?php echo $_smarty_tpl->tpl_vars['moduleName']->value;?>
|
|
</option>
|
|
<?php } ?>
|
|
</select></div>
|
|
<?php }else{ ?>
|
|
<div style="font-size:14px;text-transform:uppercase;font-weight:bold;margin:7px 0 10px 0;color:#53697e;"><?php echo vtranslate($_smarty_tpl->tpl_vars['workflowData']->value['module_name'],$_smarty_tpl->tpl_vars['workflowData']->value['module_name']);?>
|
|
</div>
|
|
|
|
<div class="form-group" style="overflow:hidden;">
|
|
<label for="workflow_title"><?php echo vtranslate("Title","Settings:Workflow2");?>
|
|
</label>
|
|
<br/>
|
|
<input type="text" class="form-control" style="float:right;width:100%;" onblur="saveWorkflowTitle();" id="workflow_title" name="workflow[title]" value="<?php echo $_smarty_tpl->tpl_vars['workflowData']->value['title'];?>
|
|
">
|
|
</div>
|
|
<div class="form-group" style="overflow:hidden;">
|
|
<label style="float:left;line-height: 22px;"><?php echo vtranslate("LBL_WORKFLOW_IS_ACTIVE","Settings:Workflow2");?>
|
|
</label>
|
|
<div class="switch">
|
|
<input id="workflowActiveSwitch" class="cmn-toggle cmn-toggle-round" style=" position:absolute !important;" type="checkbox" <?php if ($_smarty_tpl->tpl_vars['workflowData']->value['active']=='1'){?>checked="checked"<?php }?> value='1'>
|
|
<label for="workflowActiveSwitch" style="margin-right:5px;"></label>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
<br>
|
|
<div class="buttonbar center" style="clear:both;margin-bottom:10px;">
|
|
<?php if ($_smarty_tpl->tpl_vars['workflowData']->value['module_name']==''){?>
|
|
<input type="submit" style=";" onclick="saveSetings(<?php echo $_smarty_tpl->tpl_vars['workflowID']->value;?>
|
|
);" name="submitSettings" class="btn btn-primary" value="<?php echo vtranslate("Save Settings","Settings:Workflow2");?>
|
|
">
|
|
<?php }else{ ?>
|
|
<a href="index.php?module=Workflow2&view=Statistic&parent=Settings&workflow=<?php echo $_smarty_tpl->tpl_vars['workflowID']->value;?>
|
|
" class="btn btn-info" target="_blank"><?php echo vtranslate("Statistics","Settings:Workflow2");?>
|
|
</a>
|
|
<?php }?>
|
|
</div>
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['workflowData']->value['module_name']!=''){?>
|
|
<div class="center" style="margin-top:5px;padding-top:10px;color:#999999;height:40px;text-align:center;">
|
|
<div style='text-align:center;width:48%;float:left;' alt='<<?php ?>?php echo getTranslatedString("LBL_CURRENTLY_RUNNING_DESCR", "Workflow2"); ?<?php ?>>' title='<<?php ?>?php echo getTranslatedString("LBL_CURRENTLY_RUNNING_DESCR", "Workflow2"); ?<?php ?>>'>
|
|
<span class='overviewStatisticNumber'><?php echo $_smarty_tpl->tpl_vars['runningCounter']->value;?>
|
|
</span>
|
|
<br>
|
|
<?php echo vtranslate("LBL_CURRENTLY_RUNNING","Settings:Workflow2");?>
|
|
|
|
</div>
|
|
<div onclick='<?php if ($_smarty_tpl->tpl_vars['errorCounter']->value>0){?>window.open("index.php?module=Workflow2&view=ErrorLog&parent=Settings&workflow_id=<?php echo $_smarty_tpl->tpl_vars['workflowID']->value;?>
|
|
", "", "width=700,height=800");<?php }?>' style='float:left;cursor:pointer;text-align:center;width:48%;' alt='<?php echo vtranslate("LBL_LAST_ERRORS_DESCR","Settings:Workflow2");?>
|
|
' title='<?php echo vtranslate("LBL_LAST_ERRORS_DESCR","Settings:Workflow2");?>
|
|
'>
|
|
<span class='overviewStatisticNumber'><?php echo $_smarty_tpl->tpl_vars['errorCounter']->value;?>
|
|
</span>
|
|
<br>
|
|
<?php echo vtranslate("LBL_LAST_ERRORS","Settings:Workflow2");?>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="runningWarning" style="display:<?php if ($_smarty_tpl->tpl_vars['runningCounter']->value>0&&$_smarty_tpl->tpl_vars['workflowData']->value['active']!='1'){?>block<?php }else{ ?>none<?php }?>;">
|
|
<br/>
|
|
<p><?php echo vtranslate('You have deactivate the workflow. But already running instances will be executed nevertheless.','Settings:Workflow2');?>
|
|
</p>
|
|
<button type="button" id="stopAllRunningInstances" class="btb btn-warning"><?php echo vtranslate('stop all running instances','Settings:Workflow2');?>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- if(!empty($_SESSION["mWFB"])) {
|
|
echo "<div style='background-color:#eeeeee;border:1px solid #777777;text-align:center;padding:5px 0;'>Your license only allows ".$_SESSION["mWFB"]." Blocks</div>";
|
|
} -->
|
|
<br><a href='#' onclick='showOptionsContainer();return false;'>+ <?php echo vtranslate("LBL_OPTIONEN","Settings:Workflow2");?>
|
|
</a><br>
|
|
<div id='optionsContainer' style="display:none;">
|
|
<p>
|
|
<label>
|
|
<input class="pull-left" type="checkbox" onclick="refreshBlockIDs();" name="optionShowBlockId" id="optionShowBlockId"> <?php echo vtranslate('show BlockIDs','Settings:Workflow2');?>
|
|
|
|
</label>
|
|
</p>
|
|
</div>
|
|
<?php }?>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<div id="pageOverlay" onclick="closePageOverlay();" style='cursor:url("modules/Workflow2/icons/cross-button.png"), auto;position:fixed;z-index:20000;top:0;left:0;display:none;height:100%;width:100%;background-image:url("modules/Workflow2/icons/modal.png");'><div id='pageOverlayContent' style='position:fixed;cursor:default;top:100px;margin:auto;left:50%;padding:10px;background-color:#ffffff;'> </div></div>
|
|
|
|
<div class="WFDTaskList" id="settingsQuickWidgetContainer">
|
|
<div class="">
|
|
|
|
<?php if ($_smarty_tpl->tpl_vars['workflowData']->value['module_name']!=''){?>
|
|
<input type="text" class="typeSearchBox" style="width:100%;box-sizing: border-box;height:30px;" placeholder="<?php echo vtranslate('search in available types','Settings:Workflow2');?>
|
|
"/>
|
|
<input type="hidden" id="IsInventory" value="<?php if ($_smarty_tpl->tpl_vars['IsInventory']->value==true){?>1<?php }else{ ?>0<?php }?>" />
|
|
<input type="hidden" id="WorkflowTrigger" value="<?php echo $_smarty_tpl->tpl_vars['workflowData']->value['trigger'];?>
|
|
" />
|
|
<input type="hidden" id="WorkflowModule" value="<?php echo $_smarty_tpl->tpl_vars['workflowData']->value['module_name'];?>
|
|
" />
|
|
<?php }?>
|
|
|
|
<?php $_smarty_tpl->tpl_vars['typekey'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['typekey']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['blockKey'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['typesCat']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['typekey']->key => $_smarty_tpl->tpl_vars['typekey']->value){
|
|
$_smarty_tpl->tpl_vars['typekey']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['blockKey']->value = $_smarty_tpl->tpl_vars['typekey']->key;
|
|
?>
|
|
<div class="settingsgroup-panel panel-default taskWidgetContainer" style="display:none;">
|
|
<div id="<?php echo $_smarty_tpl->tpl_vars['blockKey']->value;?>
|
|
_accordion" class="app-nav" role="tab">
|
|
<div class="app-settings-accordion">
|
|
<div class="settingsgroup-accordion">
|
|
<a data-toggle="collapse" data-parent="#accordion" class='collapsed' aria-expanded="false" href="#Settings_sideBar_<?php echo smarty_modifier_replace($_smarty_tpl->tpl_vars['blockKey']->value,' ','_');?>
|
|
">
|
|
<i class="indicator fa fa-chevron-right"></i>
|
|
<span><?php echo $_smarty_tpl->tpl_vars['blockKey']->value;?>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-collapse settingsgroup ulBlock typeContainer collapse" id="Settings_sideBar_<?php echo smarty_modifier_replace($_smarty_tpl->tpl_vars['blockKey']->value,' ','_');?>
|
|
" data-block="<?php echo $_smarty_tpl->tpl_vars['typekey']->value[0][0];?>
|
|
">
|
|
<ul class="list-group widgetContainer">
|
|
<?php $_smarty_tpl->tpl_vars['typeVal'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['typeVal']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['blockType'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['typekey']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['typeVal']->key => $_smarty_tpl->tpl_vars['typeVal']->value){
|
|
$_smarty_tpl->tpl_vars['typeVal']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['blockType']->value = $_smarty_tpl->tpl_vars['typeVal']->key;
|
|
?>
|
|
<?php $_smarty_tpl->tpl_vars['typeVal'] = new Smarty_variable($_smarty_tpl->tpl_vars['typeVal']->value[1], null, 0);?>
|
|
<?php $_smarty_tpl->tpl_vars['type'] = new Smarty_variable($_smarty_tpl->tpl_vars['types']->value[$_smarty_tpl->tpl_vars['typeVal']->value], null, 0);?>
|
|
|
|
<li class="WorkflowTypeContainer" data-singlemodule="<?php echo strtolower(implode($_smarty_tpl->tpl_vars['type']->value->get("singleModule"),','));?>
|
|
" data-search="<?php echo $_smarty_tpl->tpl_vars['typeVal']->value;?>
|
|
<?php echo htmlentities(mb_strtolower($_smarty_tpl->tpl_vars['type']->value->get("text")));?>
|
|
" style='padding-left:10px;border-top:0px;padding-bottom: 5px' onclick="addBlock('<?php echo $_smarty_tpl->tpl_vars['typeVal']->value;?>
|
|
');return false;" data-type="<?php echo $_smarty_tpl->tpl_vars['typeVal']->value;?>
|
|
" data-default="b">
|
|
<a href="#" class="menuItemLabel">
|
|
<?php echo $_smarty_tpl->tpl_vars['type']->value->get("text");?>
|
|
|
|
</a>
|
|
</li>
|
|
<?php } ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<div class='WF2footerSidebar'>
|
|
Workflow Designer <?php echo $_smarty_tpl->tpl_vars['VERSION']->value;?>
|
|
<br/>
|
|
Translation by <a href="<?php echo vtranslate('TRANSLATION_AUTHOR_URL','Workflow2');?>
|
|
"><?php echo vtranslate('TRANSLATION_AUTHOR_NAME','Workflow2');?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php }} ?>
|