- Создан API create_document_with_text.php для создания DOCX/XLSX/PPTX с текстом от AI - Поддержка Markdown форматирования (заголовки, жирный, курсив, списки, код) - Установлен PHPWord для красивого форматирования документов - Исправлены пути сохранения (crm2/CRM_Active_Files/... без /crm/ в начале) - Замена пробелов на подчеркивания в именах папок - Создана документация для AI и разработчиков - Добавлены API для работы с шаблонами Nextcloud
49 lines
4.9 KiB
PHP
49 lines
4.9 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/Project/DetailViewHeaderTitle.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:1680914533690777d81352a5-09464612%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'd16fa581c270f97702993fa802fef56e82efcb1d' =>
|
|
array (
|
|
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Project/DetailViewHeaderTitle.tpl',
|
|
1 => 1762096901,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '1680914533690777d81352a5-09464612',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'variables' =>
|
|
array (
|
|
'SELECTED_MENU_CATEGORY' => 0,
|
|
'RECORD' => 0,
|
|
'MODULE_MODEL' => 0,
|
|
'NAME_FIELD' => 0,
|
|
'FIELD_MODEL' => 0,
|
|
'MODULE' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_690777d81415b',
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_690777d81415b')) {function content_690777d81415b($_smarty_tpl) {?>
|
|
<div class="col-lg-6 col-md-6 col-sm-6"><div class="record-header clearfix"><div class="hidden-sm hidden-xs recordImage bgproject app-<?php echo $_smarty_tpl->tpl_vars['SELECTED_MENU_CATEGORY']->value;?>
|
|
"><div class="name"><span><strong> <i class="vicon-project"></i> </strong></span></div></div><div class="recordBasicInfo"><div class="info-row"><h4><div class="recordLabel pushDown" title="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getName();?>
|
|
"><?php $_smarty_tpl->tpl_vars['NAME_FIELD'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getNameFields(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['NAME_FIELD']->key => $_smarty_tpl->tpl_vars['NAME_FIELD']->value){
|
|
$_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = true;
|
|
?><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getField($_smarty_tpl->tpl_vars['NAME_FIELD']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getPermissions()){?><span class="<?php echo $_smarty_tpl->tpl_vars['NAME_FIELD']->value;?>
|
|
"><?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get($_smarty_tpl->tpl_vars['NAME_FIELD']->value);?>
|
|
</span> <?php }?><?php } ?></div></h4></div><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path("DetailViewHeaderFieldsView.tpl",$_smarty_tpl->tpl_vars['MODULE']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
|
|
<div class="info-row" style="margin-top: 10px;"><button type="button" class="btn btn-info btn-sm" onclick="openProjectFolder('<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
', '<?php echo strtr($_smarty_tpl->tpl_vars['RECORD']->value->get("projectname"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
|
|
')" title="Открыть папку проекта в Nextcloud"><i class="fa fa-folder-open"></i> Папка в Nextcloud</button><button type="button" class="btn btn-default btn-sm" onclick="createFileInNextcloud('Project', '<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
', '<?php echo strtr($_smarty_tpl->tpl_vars['RECORD']->value->get("projectname"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
|
|
', 'docx')" title="Создать Word документ в Nextcloud" style="margin-left: 5px;"><i class="fa fa-file-word-o" style="color: #2b579a;"></i></button><button type="button" class="btn btn-default btn-sm" onclick="createFileInNextcloud('Project', '<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
', '<?php echo strtr($_smarty_tpl->tpl_vars['RECORD']->value->get("projectname"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
|
|
', 'xlsx')" title="Создать Excel таблицу в Nextcloud" style="margin-left: 2px;"><i class="fa fa-file-excel-o" style="color: #217346;"></i></button><button type="button" class="btn btn-default btn-sm" onclick="createFileInNextcloud('Project', '<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
', '<?php echo strtr($_smarty_tpl->tpl_vars['RECORD']->value->get("projectname"), array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\/" ));?>
|
|
', 'pptx')" title="Создать PowerPoint презентацию в Nextcloud" style="margin-left: 2px;"><i class="fa fa-file-powerpoint-o" style="color: #d24726;"></i></button></div><script type="text/javascript" src="crm_extensions/nextcloud_editor/js/nextcloud-editor.js?v=20251102c"></script></div></div></div><?php }} ?>
|