Files
crm.clientright.ru/layouts/v7/modules/Documents/FilePreview.tpl
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

100 lines
6.4 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{*+**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
************************************************************************************}
{strip}
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="filePreview container-fluid">
<div class="modal-header row">
<div class="filename {if $FILE_PREVIEW_NOT_SUPPORTED neq 'yes'} col-lg-7 {else} col-lg-7 {/if}">
<h3 style="margin-top:0px;"><b>{$FILE_NAME}</b></h3>
</div>
{if $FILE_PREVIEW_NOT_SUPPORTED neq 'yes'}
<div class="col-lg-4">
<a class="btn btn-default btn-small pull-right" href="{$DOWNLOAD_URL}">{vtranslate('LBL_DOWNLOAD_FILE',$MODULE_NAME)}</a>
</div>
{/if}
<div class="col-lg-1">
<button data-dismiss="modal" class="close pull-right" title="close">
<span aria-hidden="true" class='fa fa-close'></span></button>
{* Кнопка редактирования - показываем для ВСЕХ файлов *}
<div class="col-lg-2">
<button type="button" class="btn btn-success btn-small pull-right" onclick="openNextcloudEditor('{$RECORD_ID}', '{$FILE_NAME|escape:'javascript'}')" style="margin-right: 5px;" title="Редактировать в Nextcloud">
<i class="fa fa-edit"></i> Редактировать
</button>
</div>
</div>
</div>
<div class="modal-body row" style="height:550px;">
{if $FILE_PREVIEW_NOT_SUPPORTED eq 'yes'}
<div class="well" style="height:100%;">
<center>
<b>{vtranslate('LBL_PREVIEW_NOT_AVAILABLE',$MODULE_NAME)}</b>
<br><br><br>
<a class="btn btn-default btn-large" href="{$DOWNLOAD_URL}">{vtranslate('LBL_DOWNLOAD_FILE',$MODULE_NAME)}</a>
<br><br><br><br>
<div class='span11 offset1 alert-info' style="padding:10px">
<span class='span offset1 alert-info'>
<i class="icon-info-sign"></i>
{vtranslate('LBL_PREVIEW_SUPPORTED_FILES',$MODULE_NAME)}
</span>
</div>
<br>
</center>
</div>
{else}
{if $BASIC_FILE_TYPE eq 'yes'}
<div style="overflow:auto;height:100%;">
<pre>
{htmlentities($FILE_CONTENTS)}
</pre>
</div>
{else if $OPENDOCUMENT_FILE_TYPE eq 'yes'}
<iframe id="viewer" src="libraries/jquery/Viewer.js/#../../../{$DOWNLOAD_URL}" width="100%" height="100%" allowfullscreen webkitallowfullscreen></iframe>
{else if $PDF_FILE_TYPE eq 'yes'}
{* SalesPlatform.ru begin *}
{* <iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={$SITE_URL}/{$FILE_PATH}" height="100%" width="100%"></iframe> *}
<iframe id='viewer' src="libraries/jquery/pdfjs/web/viewer.html?file={urlencode($SITE_URL)}/{urlencode($DOWNLOAD_URL)}" height="100%" width="100%"></iframe>
{* SalesPlatform.ru ned *}
{else if $IMAGE_FILE_TYPE eq 'yes'}
<div style="overflow:auto;height:100%;width:100%;float:left;background-image: url({$DOWNLOAD_URL});background-color: #EEEEEE;background-position: center 25%;background-repeat: no-repeat;display: block; background-size: contain;"></div>
{else if $AUDIO_FILE_TYPE eq 'yes'}
<div style="overflow:auto;height:100%;width:100%;float:left;background-color: #EEEEEE;background-position: center 25%;background-repeat: no-repeat;display: block;text-align: center;">
<div style="display: inline-block;margin-top : 10%;">
<audio controls>
<source src="{$SITE_URL}/{$DOWNLOAD_URL}" type="{$FILE_TYPE}">
</audio>
</div>
</div>
{else if $VIDEO_FILE_TYPE eq 'yes'}
<div style="overflow:auto;height:100%;">
<link href="libraries/jquery/video-js/video-js.css" rel="stylesheet">
<script src="libraries/jquery/video-js/video.js"></script>
<video class="video-js vjs-default-skin" controls preload="auto" {literal}data-setup="{'techOrder': ['flash', 'html5']}" {/literal}width="100%" height="100%">
<source src="{$SITE_URL}/{$DOWNLOAD_URL}" type='{$FILE_TYPE}' />
</video>
</div>
{/if}
{/if}
</div>
</div>
</div>
</div>
{/strip}
<script>
// Fallback функция если глобальная не загрузилась
if (typeof window.testEditButton !== 'function') {
window.testEditButton = function(recordId, fileName) {
console.log("🔥 ЛОКАЛЬНАЯ КНОПКА НАЖАТА!", recordId, fileName);
alert("🔥 ЛОКАЛЬНАЯ КНОПКА РАБОТАЕТ!\n\nRecord ID: " + recordId + "\nFile Name: " + fileName);
};
console.log("✅ Создана локальная версия testEditButton в FilePreview");
}
</script>