- Создан API create_document_with_text.php для создания DOCX/XLSX/PPTX с текстом от AI - Поддержка Markdown форматирования (заголовки, жирный, курсив, списки, код) - Установлен PHPWord для красивого форматирования документов - Исправлены пути сохранения (crm2/CRM_Active_Files/... без /crm/ в начале) - Замена пробелов на подчеркивания в именах папок - Создана документация для AI и разработчиков - Добавлены API для работы с шаблонами Nextcloud
99 lines
11 KiB
PHP
99 lines
11 KiB
PHP
<?php /* Smarty version Smarty-3.1.7, created on 2025-11-02 18:25:12
|
|
compiled from "/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Vtiger/ModuleHeader.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:31013750690777d80e9042-04029556%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'f8f3968364c6d1f4c8de237d833b20ed2ddbfee3' =>
|
|
array (
|
|
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Vtiger/ModuleHeader.tpl',
|
|
1 => 1711810494,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '31013750690777d80e9042-04029556',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'variables' =>
|
|
array (
|
|
'MODULE' => 0,
|
|
'MODULE_MODEL' => 0,
|
|
'DEFAULT_FILTER_ID' => 0,
|
|
'CVURL' => 0,
|
|
'DEFAULT_FILTER_URL' => 0,
|
|
'SELECTED_MENU_CATEGORY' => 0,
|
|
'VIEWID' => 0,
|
|
'CUSTOM_VIEWS' => 0,
|
|
'FILTER_TYPES' => 0,
|
|
'FILTERS' => 0,
|
|
'CVNAME' => 0,
|
|
'RECORD' => 0,
|
|
'MODULE_BASIC_ACTIONS' => 0,
|
|
'BASIC_ACTION' => 0,
|
|
'MODULE_SETTING_ACTIONS' => 0,
|
|
'MODULE_NAME' => 0,
|
|
'SETTING' => 0,
|
|
'FIELDS_INFO' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_690777d811862',
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_690777d811862')) {function content_690777d811862($_smarty_tpl) {?>
|
|
|
|
<div class="col-sm-12 col-xs-12 module-action-bar clearfix coloredBorderTop"><div class="module-action-content clearfix <?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
|
|
-module-action-content"><div class="col-lg-4 col-md-4 module-breadcrumb module-breadcrumb-<?php echo $_REQUEST['view'];?>
|
|
transitionsAllHalfSecond"><?php $_smarty_tpl->tpl_vars['MODULE_MODEL'] = new Smarty_variable(Vtiger_Module_Model::getInstance($_smarty_tpl->tpl_vars['MODULE']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getDefaultViewName()!='List'){?><?php $_smarty_tpl->tpl_vars['DEFAULT_FILTER_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getDefaultUrl(), null, 0);?><?php }else{ ?><?php $_smarty_tpl->tpl_vars['DEFAULT_FILTER_ID'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getDefaultCustomFilter(), null, 0);?><?php if ($_smarty_tpl->tpl_vars['DEFAULT_FILTER_ID']->value){?><?php $_smarty_tpl->tpl_vars['CVURL'] = new Smarty_variable(("&viewname=").($_smarty_tpl->tpl_vars['DEFAULT_FILTER_ID']->value), null, 0);?><?php $_smarty_tpl->tpl_vars['DEFAULT_FILTER_URL'] = new Smarty_variable(($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getListViewUrl()).($_smarty_tpl->tpl_vars['CVURL']->value), null, 0);?><?php }else{ ?><?php $_smarty_tpl->tpl_vars['DEFAULT_FILTER_URL'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getListViewUrlWithAllFilter(), null, 0);?><?php }?><?php }?><a title="<?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE']->value,$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
" href='<?php echo $_smarty_tpl->tpl_vars['DEFAULT_FILTER_URL']->value;?>
|
|
&app=<?php echo $_smarty_tpl->tpl_vars['SELECTED_MENU_CATEGORY']->value;?>
|
|
'><h4 class="module-title pull-left text-uppercase"> <?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE']->value,$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</h4> </a><?php if ($_SESSION['lvs'][$_smarty_tpl->tpl_vars['MODULE']->value]['viewname']){?><?php $_smarty_tpl->tpl_vars['VIEWID'] = new Smarty_variable($_SESSION['lvs'][$_smarty_tpl->tpl_vars['MODULE']->value]['viewname'], null, 0);?><?php }?><?php if ($_smarty_tpl->tpl_vars['VIEWID']->value){?><?php $_smarty_tpl->tpl_vars['FILTER_TYPES'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FILTER_TYPES']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['CUSTOM_VIEWS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['FILTER_TYPES']->key => $_smarty_tpl->tpl_vars['FILTER_TYPES']->value){
|
|
$_smarty_tpl->tpl_vars['FILTER_TYPES']->_loop = true;
|
|
?><?php $_smarty_tpl->tpl_vars['FILTERS'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FILTERS']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['FILTER_TYPES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['FILTERS']->key => $_smarty_tpl->tpl_vars['FILTERS']->value){
|
|
$_smarty_tpl->tpl_vars['FILTERS']->_loop = true;
|
|
?><?php if ($_smarty_tpl->tpl_vars['FILTERS']->value->get('cvid')==$_smarty_tpl->tpl_vars['VIEWID']->value){?><?php $_smarty_tpl->tpl_vars['CVNAME'] = new Smarty_variable($_smarty_tpl->tpl_vars['FILTERS']->value->get('viewname'), null, 0);?><?php break 1?><?php }?><?php } ?><?php } ?><p class="current-filter-name filter-name pull-left cursorPointer" title="<?php echo $_smarty_tpl->tpl_vars['CVNAME']->value;?>
|
|
"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a href='<?php echo $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getListViewUrl();?>
|
|
&viewname=<?php echo $_smarty_tpl->tpl_vars['VIEWID']->value;?>
|
|
&app=<?php echo $_smarty_tpl->tpl_vars['SELECTED_MENU_CATEGORY']->value;?>
|
|
'> <?php echo vtranslate($_smarty_tpl->tpl_vars['CVNAME']->value,$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</a> </p><?php }?><?php $_smarty_tpl->tpl_vars['SINGLE_MODULE_NAME'] = new Smarty_variable(('SINGLE_').($_smarty_tpl->tpl_vars['MODULE']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['RECORD']->value&&$_REQUEST['view']=='Edit'){?><p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('label');?>
|
|
"> <?php echo vtranslate('LBL_EDITING',$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
: <?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('label');?>
|
|
</a></p><?php }elseif($_REQUEST['view']=='Edit'){?><p class="current-filter-name filter-name pull-left "><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a> <?php echo vtranslate('LBL_ADDING_NEW',$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</a></p><?php }?><?php if ($_REQUEST['view']=='Detail'){?><p class="current-filter-name filter-name pull-left"><span class="fa fa-angle-right pull-left" aria-hidden="true"></span><a title="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('label');?>
|
|
"> <?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('label');?>
|
|
</a></p><?php }?></div><div class="col-lg-8 col-md-8 pull-right"><div id="appnav" class="navbar-right"><ul class="nav navbar-nav"><?php $_smarty_tpl->tpl_vars['BASIC_ACTION'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['BASIC_ACTION']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['MODULE_BASIC_ACTIONS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['BASIC_ACTION']->key => $_smarty_tpl->tpl_vars['BASIC_ACTION']->value){
|
|
$_smarty_tpl->tpl_vars['BASIC_ACTION']->_loop = true;
|
|
?><?php if ($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getLabel()=='LBL_IMPORT'){?><li><button id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
|
|
_basicAction_<?php echo Vtiger_Util_Helper::replaceSpaceWithUnderScores($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getLabel());?>
|
|
" type="button" class="btn addButton btn-default module-buttons"<?php if (stripos($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl(),'javascript:')===0){?>onclick='<?php echo substr($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl(),strlen("javascript:"));?>
|
|
;'<?php }else{ ?>onclick="Vtiger_Import_Js.triggerImportAction('<?php echo $_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl();?>
|
|
')"<?php }?>><div class="fa <?php echo $_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getIcon();?>
|
|
" aria-hidden="true"></div> <?php echo vtranslate($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getLabel(),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</button></li><?php }else{ ?><li><button id="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
|
|
_listView_basicAction_<?php echo Vtiger_Util_Helper::replaceSpaceWithUnderScores($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getLabel());?>
|
|
" type="button" class="btn addButton btn-default module-buttons"<?php if (stripos($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl(),'javascript:')===0){?>onclick='<?php echo substr($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl(),strlen("javascript:"));?>
|
|
;'<?php }else{ ?>onclick='window.location.href = "<?php echo $_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getUrl();?>
|
|
&app=<?php echo $_smarty_tpl->tpl_vars['SELECTED_MENU_CATEGORY']->value;?>
|
|
"'<?php }?>><div class="fa <?php echo $_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getIcon();?>
|
|
" aria-hidden="true"></div> <?php echo vtranslate($_smarty_tpl->tpl_vars['BASIC_ACTION']->value->getLabel(),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</button></li><?php }?><?php } ?><?php if (count($_smarty_tpl->tpl_vars['MODULE_SETTING_ACTIONS']->value)>0){?><li><div class="settingsIcon"><button type="button" class="btn btn-default module-buttons dropdown-toggle" data-toggle="dropdown" aria-expanded="false" title="<?php echo vtranslate('LBL_SETTINGS',$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
"><span class="fa fa-wrench" aria-hidden="true"></span> <?php echo vtranslate('LBL_CUSTOMIZE','Reports');?>
|
|
<span class="caret"></span></button><ul class="detailViewSetting dropdown-menu"><?php $_smarty_tpl->tpl_vars['SETTING'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['SETTING']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['MODULE_SETTING_ACTIONS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['SETTING']->key => $_smarty_tpl->tpl_vars['SETTING']->value){
|
|
$_smarty_tpl->tpl_vars['SETTING']->_loop = true;
|
|
?><li id="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
|
|
_listview_advancedAction_<?php echo $_smarty_tpl->tpl_vars['SETTING']->value->getLabel();?>
|
|
"><a href=<?php echo $_smarty_tpl->tpl_vars['SETTING']->value->getUrl();?>
|
|
><?php echo vtranslate($_smarty_tpl->tpl_vars['SETTING']->value->getLabel(),$_smarty_tpl->tpl_vars['MODULE_NAME']->value,vtranslate($_smarty_tpl->tpl_vars['MODULE_NAME']->value,$_smarty_tpl->tpl_vars['MODULE_NAME']->value));?>
|
|
</a></li><?php } ?></ul></div></li><?php }?></ul></div></div></div><?php if ($_smarty_tpl->tpl_vars['FIELDS_INFO']->value!=null){?><script type="text/javascript">var uimeta = (function () {var fieldInfo = <?php echo $_smarty_tpl->tpl_vars['FIELDS_INFO']->value;?>
|
|
;return {field: {get: function (name, property) {if (name && property === undefined) {return fieldInfo[name];}if (name && property) {return fieldInfo[name][property]}},isMandatory: function (name) {if (fieldInfo[name]) {return fieldInfo[name].mandatory;}return false;},getType: function (name) {if (fieldInfo[name]) {return fieldInfo[name].type}return false;}},};})();</script><?php }?></div>
|
|
<?php }} ?>
|