* Finish task #105785.

This commit is contained in:
tianshujie
2023-11-10 11:19:24 +08:00
parent 6de0ea3e71
commit d35eddd477
6 changed files with 59 additions and 2 deletions
+14
View File
@@ -530,4 +530,18 @@ class file extends control
fclose($handle);
}
}
/**
* 关闭升级到企业版提示。
* Close the biz guide.
*
* @param string $moduleName
* @access public
* @return void
*/
public function ajaxcloseBizGuide($moduleName)
{
$path = "{$this->app->user->account}.{$moduleName}.closeBizGuide@rnd";
$this->loadModel('setting')->setItem($path, 1);
}
}
+1
View File
@@ -72,6 +72,7 @@ $lang->file->errorSuffix = 'Format ist falsch. Nur .zip Dateien!';
$lang->file->errorExtract = 'Entpacken fehlgeschlagen. Die Datei ist vermutlich defekt.';
$lang->file->fileNotFound = 'The file was not found. The physical file might have been deleted!';
$lang->file->fileContentEmpty = 'The file is empty. Check the file and upload it again.';
$lang->file->bizGuide = 'To utilize Excel import/export, upgrade to ZenTao %s edition on our website';
$lang->file->uploadError[1] = 'The uploaded filesize exceeds the limit. Please change the upload_max_filesize and post_max_size options in php.ini';
$lang->file->uploadError[2] = 'The size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form';
+1
View File
@@ -72,6 +72,7 @@ $lang->file->errorSuffix = 'Format is incorrect. .zip files ONLY!';
$lang->file->errorExtract = 'Extracting files failed. Files might be damaged or there might be invalid files in the zip package.';
$lang->file->fileNotFound = 'The file was not found. The physical file might have been deleted!';
$lang->file->fileContentEmpty = 'The file is empty. Check the file and upload it again.';
$lang->file->bizGuide = 'To utilize Excel import/export, upgrade to ZenTao %s edition on our website';
$lang->file->uploadError[1] = 'The uploaded filesize exceeds the limit. Please change the upload_max_filesize and post_max_size options in php.ini';
$lang->file->uploadError[2] = 'The size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form';
+1
View File
@@ -72,6 +72,7 @@ $lang->file->errorSuffix = 'Format incorrect. Fichiers .zip SEULEMENT !';
$lang->file->errorExtract = "Echec de l'extraction des fichiers. Les fichiers peuvent être endommagé ou il y a un fichier invalide dans le zip.";
$lang->file->fileNotFound = 'Fichier non trouvé. Le fichier physique a peut-être été supprimé par innadvertance !';
$lang->file->fileContentEmpty = 'The file is empty. Check the file and upload it again.';
$lang->file->bizGuide = 'To utilize Excel import/export, upgrade to ZenTao %s edition on our website';
$lang->file->uploadError[1] = 'The uploaded filesize exceeds the limit. Please change the upload_max_filesize and post_max_size options in php.ini';
$lang->file->uploadError[2] = 'The size of the uploaded file exceeds the value specified by the MAX_FILE_SIZE option in the HTML form';
+1
View File
@@ -72,6 +72,7 @@ $lang->file->errorSuffix = '压缩包格式错误,只能上传zip压缩
$lang->file->errorExtract = '解压缩失败!可能文件已经损坏,或压缩包里含有非法上传文件。';
$lang->file->fileNotFound = '未找到该文件,可能物理文件已被删除!';
$lang->file->fileContentEmpty = '上传文件内容为空,请检查后重新上传。';
$lang->file->bizGuide = '如需使用EXCEL导入导出功能,可到官网升级到%s';
$lang->file->uploadError[1] = "上传的文件大小超过了限制,请修改 php.ini 中 upload_max_filesize 与 post_max_size 选项限制的值";
$lang->file->uploadError[2] = '上传文件的大小超过了 HTML 表单中 MAX_FILE_SIZE 选项指定的值';
+41 -2
View File
@@ -22,7 +22,23 @@
#mainContent .c-name {width:120px;}
#mainContent .c-fileName {width:300px;}
#mainContent .actionBox {text-align: center;}
</style>
<?php if($config->edition == 'open' && empty($config->{$this->moduleName}->closeBizGuide)):?>
<style>
#mainContent .actionBox {text-align: left;}
#submit {margin-left: 130px;}
#exportTable .bizGuideBox {display: inline; padding-left: 10px;}
#exportTable .bizGuideBox > span {color: #838a9d; vertical-align: sub;}
#exportTable .bizGuideBox > span > a {vertical-align: baseline;}
#exportTable .bizGuideBox > a .icon-close {font-size: 12px;}
</style>
<?php if(common::checkNotCN()):?>
<style>
#submit {margin-left: 40px;}
</style>
<?php endif;?>
<?php endif;?>
<script>
function setDownloading()
{
@@ -255,6 +271,20 @@ $(document).ready(function()
})
}
});
/**
* 关闭升级到企业版提示。
* Close the biz guide.
*
* @access public
* @return void
*/
function closeBizGuide()
{
var closeBizGuideLink = '<?php echo $this->createLink('file', 'ajaxcloseBizGuide', 'module=' . $this->moduleName);?>';
$.get(closeBizGuideLink);
$('.bizGuideBox').remove();
}
</script>
<?php
$isCustomExport = (!empty($customExport) and !empty($allExportFields));
@@ -283,7 +313,7 @@ if($isCustomExport)
<h2><?php echo $lang->export;?></h2>
</div>
<form class='main-form' method='post' target='hiddenwin'>
<table class="table table-form">
<table class="table table-form" id='exportTable'>
<tbody>
<tr>
<th class='c-name'><?php echo $lang->file->fileName;?></th>
@@ -348,8 +378,17 @@ if($isCustomExport)
<?php endif?>
<tr>
<th></th>
<td class='text-center'>
<?php $colspan = $config->edition == 'open' && empty($config->{$this->moduleName}->closeBizGuide) ? "colspan='2'" : '';?>
<td class='actionBox' <?php echo $colspan?>>
<?php echo html::submitButton($lang->export, "onclick='setDownloading();'", 'btn btn-primary');?>
<?php if($config->edition == 'open' && empty($config->{$this->moduleName}->closeBizGuide)):?>
<div class='bizGuideBox'>
<?php $bizGuideLink = common::checkNotCN() ? 'https://www.zentao.pm/page/zentao-pricing.html' : 'https://www.zentao.net/page/enterprise.html';?>
<?php $bizName = html::a($bizGuideLink, $lang->bizName, '', "class='text-primary' target='_blank'");?>
<span><?php echo sprintf($lang->file->bizGuide, $bizName);?></span>
<?php echo html::a('#', "<i class='icon-close'></i>", '', 'class="btn btn-link" id="closeBizGuideButton" onclick=closeBizGuide(this)');?>
</div>
<?php endif;?>
</td>
</tr>
</tbody>